[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: [ 101603 ] numerical quirks

From: Raymond Toy
Subject: [Gcl-devel] Re: [ 101603 ] numerical quirks
Date: Wed, 11 Dec 2002 00:48:51 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021123

(expt 2 (expt 2 (expt 2 (expt 2 2)))) causes SBCL and CMUCL to barf.

I think barf is too harsh. They signal a continuable error saying the exponent is rather large and gives you the option of continuing the computation.

Then CMUCL will signal an error saying the integer is too large to fit in a single-float, since 2^65536 is larger than any single-float. It's also larger than the largest possible extended float on an x86, too.


Are they special casing it?  If we don't have to handle this stuff,
I don't think we should bother?

You may want to borrow the special functions used by CMUCL/SBCL. They were written carefully, based on algorithms given by Kahan. The code is reasonably portable.

And I think you should try to do a good job if you are serious about making GCL a viable option. My expectation is that they should be correct as far as possible.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]