[Top][All Lists]

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

Re: [Gcl-devel] [Maxima] Stable Maxima version on Gentoo

From: Stewart W. Wilson
Subject: Re: [Gcl-devel] [Maxima] Stable Maxima version on Gentoo
Date: Tue, 02 Oct 2012 17:54:09 -0400

Camm, thanks for your reply.

I find the garbage digits very annoying.  They make it very hard
to read files of numbers by simply printing them (instead of
going in and using format).  

The fix does not seem to be exactly trivial.  Please see the attached
paper by Steele and White from 1990.

It looks like Allegro does indeed avoid the problem, perhaps by
using something like S & W's Dragon4 algorithm.  To me it is worth
paying for Allegro, though I would sure like to see a fix in GCL
or another free implementation.


>"Stewart W. Wilson" <address@hidden> writes:
>> ----------------------------------------------------------
>> I want to use GCL instead of paying for Allegro.
>> But GCL often prints numbers with too many places.
>> Example
>>>(+ 1.234 2.567)
>> 3.8010000000000002
>Alas, there is no *print-?* flag in the lisp standard to my knowledge.
>In fact, there are requirements that an implementation must be able to
>re-read exactly the same float as print out under normal circumstances,
>hence the gcl behavior.  That said, it would be trivial to implement
>some non-standard gcl-specific setting to truncate floats at a given
>number of digits.  I'm posting this to the devel list to see if this
>might be useful to others too.
>Take care,
>Camm Maguire                                       address@hidden
>"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

Attachment: print-fp.pdf
Description: PDF document, version 1.3

reply via email to

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