[gambit-list] Going through simple math

Robert H sigzero at gmail.com
Thu Apr 1 22:39:15 EDT 2010


On 4/1/10 8:30 PM, Marc Feeley wrote:
>
> On 2010-04-01, at 7:59 PM, Robert H wrote:
>
>>> (- 1.5 1/2)
>> 1.
>>> (* 3 1/2)
>> 3/2
>>> (/ 1.5 3/4)
>> 2.
>>>
>>
>> Is there a reason that Gambit is dropping the trailing zero on those?
>> Just "because"?
>
> Why print more digits than necessary?  All of these external representations are equal
>
> 2.
> 2.0
> 2.00
> 2.000
>
> so why not choose the shortest one?
>
> If you want to switch to the syntax with the single trailing zero (which is what Chez Scheme uses) then you can modify lib/_num.scm so that the line
>
> (##define-macro (macro-chez-fp-syntax) #f)
>
> now reads
>
> (##define-macro (macro-chez-fp-syntax) #t)
>
> Then do a "make".
>
> Marc

I thought as much. I was just curious is all.

Robert




More information about the Gambit-list mailing list