[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Minor CLISP bug #2
- To: clisp-list@ma2s2.mathematik.uni-karlsruhe.de
- Subject: Re: Minor CLISP bug #2
- From: Raymond Toy <toy@rtp.ericsson.se>
- Date: Fri, 10 Jan 1997 13:58:14 -0500
- Cc: toy@rtp.ericsson.se
- In-reply-to: (Your message of Tue, 07 Jan 1997 18:54:51 +0100.) <9701071739.AA11524@>
- References: <9701071739.AA11524@>
>>>>> "Bruno" == Bruno Haible <haible@ilog.fr> writes:
Bruno> M. Thomas <thommark@access.digex.net> writes:
>> I like CLISP's facility for setting the precision of floating-point
>> numbers. There does appear to be a small glitch, however:
>>
>> > (setf (long-float-digits) 100)
>> 100
>> > (/ pi 2.)
>> 1.5707963267948966192313216916397514421L0
>> > (asin 3.4L0)
>> #C(1.5707964 -1.894559012672297804279889265261663451844L0)
>> ;;; expected both realpart and imagpart to have the specified
>> ;;; long-float precision:
>> ;;; #C(1.5707963267948966192313216916397514421L0
>> -1.894559012672297804279889265261663451844L0)
Bruno> The real part here does not depend on the input, therefore - in theory -
Bruno> it should be pi/2 with infinite precision. This is not representable, so
Bruno> clisp chooses the format contained in the variable *default-float-format*.
Bruno> Try (setq *default-float-format* 'long-float).
I have to disagree here. The real part does in general depend on the
input, otherwise the result might not have been complex.
Also, doesn't ANSI CL say the parts of a complex are supposed to be
the same type? Therefore both should have been long floats.
RAy