chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] newbie question about numbers


From: Hugo Arregui
Subject: Re: [Chicken-users] newbie question about numbers
Date: Thu, 18 Feb 2010 13:23:44 -0300

I am using Chicken Version 4.3.0 with Arch Linux.

I'll try with a newer version, and see what happens.

Thanks,
Hugo.

On Wed, Feb 17, 2010 at 10:45 PM, Kon Lovett <address@hidden> wrote:
> Sorry, don't know what to tell you. 'flonum-print-precision' appears to be
> undocumented in the current manual. However, the code in
> 'C_number_to_string' (the actual primitive for 'number->string') makes use
> of the value. Both the core printer and the numbers printer use this
> routine.
>
> When 'gcvt' is available it is used in preference to the 'printf' family.
> The only platform I know of that states it doesn't have 'gcvt' is MacOS X;
> it does but deprecated. I don't know about your platform. I am using Chicken
> Version 4.3.5 w/ MacoS 10.5 so YMMV.
>
> On Feb 17, 2010, at 1:49 PM, Hugo Arregui wrote:
>
>> On Wed, Feb 17, 2010 at 6:08 PM, Kon Lovett <address@hidden> wrote:
>>>
> <snip>
>>>
>>> #;9> (exact->inexact (/ 1 7))
>>> 0.142857142857142849212692681248881854116916656494140625
>>> #;10> (flonum-print-precision 15)
>>> 100
>>> #;11> (exact->inexact (/ 1 7))
>>> 0.142857142857143
>>
>> But I don't see the same results:
>>
>> #;1> (flonum-print-precision)
>> 15
>> #;2> (/ 1 7)
>> 0.142857142857143
>> #;3> (flonum-print-precision 23)
>> 15
>> #;4> (/ 1 7)
>> 0.14285714285714285
>> #;5> (flonum-print-precision 100)
>> 23
>> #;6> (/ 1 7)
>> 0.14285714285714285
>> #;7>
>>
>> Cheers,
>> Hugo.
>
> Best Wishes,
> Kon
>
>
>




reply via email to

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