gcl-devel
[Top][All Lists]
Advanced

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

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


From: Camm Maguire
Subject: Re: [Gcl-devel] [Maxima] Stable Maxima version on Gentoo
Date: Tue, 15 Jan 2013 16:17:56 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Greetings!  Just a note that I've checked in and uploaded into Debian a
fix for this.  If you have any comments, please let me know.


>(+ 1.234 2.567)

3.801

>


"Stewart W. Wilson" <address@hidden> writes:

> 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.
>
> Best,
> Stewart
>
>
>
>
>
>>Greetings!
>>
>>"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
>

-- 
Camm Maguire                                        address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah



reply via email to

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