|
From: | Raymond Toy |
Subject: | [Gcl-devel] Re: [ 101603 ] numerical quirks |
Date: | Wed, 11 Dec 2002 00:43:18 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021123 |
Camm Maguire wrote:
Greetings! I'm forwarding your note to the address@hidden list to solicit comments on what a compliant lisp system should do in the instances you note. They all fall under the general rubric of fixed precision floating point arithmetic. Is lisp supposed to be able to handle arbitrary precision floating point?
Not usually.
Does any implementation do this?
Clisp allows long-floats with essentially arbitrary precision. You just do (setf (long-float-digits) 1024) and you have floats with 1024 bits of precision.
I heard rumors once that clisp used gmp for floats too.
I don't think that's true. Clisp has always used it's own implementation. I think it's as good as gmp.
From my understanding of earlier threads, a lisp implementation is not supposed to be able to recognize and return exact answers to special floating point problems, e.g. cos(pi/2), sqrt(-1), etc.
I don't think Lisp is forbidden from doing this. See CLHS, section 12.1.3.3.
Aloha, Ray
[Prev in Thread] | Current Thread | [Next in Thread] |