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" <[email protected]> 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" <[email protected]> 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                                      [email protected]
>>==========================================================================
>>"The earth is but one country, and mankind its citizens."  --  Baha'u'llah
>

-- 
Camm Maguire                                        [email protected]
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

_______________________________________________
Gcl-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gcl-devel

Reply via email to