[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: big number printout
From: |
Marijn Schouten (hkBst) |
Subject: |
Re: big number printout |
Date: |
Wed, 02 Jul 2008 23:22:27 +0200 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080620) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ludovic Courtès wrote:
> Hi,
>
> "Bill Schottstaedt" <address@hidden> writes:
>
>> Not sure this is a bug, but it is confusing:
>>
>> guile> (version)
>> "1.8.5"
>> guile> (+ 40816513889983671.0 3.0)
>> 40816513889983700.0
>
> You're exceeding the precision of a float or double (whichever is used
> for reals):
>
> guile> 40816513889983671.0
> 40816513889983700.0 <--- rounded up
> guile> 40816513889983671
> 40816513889983671 <--- integers are not rounded
>
> FWIW, Bigloo and Ikarus behave similarly, and I don't think there's much
> that can be done.
As I understand it, Bill's test shows that the internal representation does not
lose any precision, even though the exterior representation (the printed value)
is inaccurate. I don't understand how that fits with your explanation.
Marijn
- --
Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-{lisp,ml} on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkhr8ZMACgkQp/VmCx0OL2wPOwCgrXMxiRCGh8wnxL/4Jc9p4PP8
EEEAoKP73vmLN8TrIMDPbimCMnF7jxb+
=NyBt
-----END PGP SIGNATURE-----