* re: big number printout
@ 2008-07-02 22:36 Bill Schottstaedt
2008-07-03 21:58 ` Neil Jerram
0 siblings, 1 reply; 9+ messages in thread
From: Bill Schottstaedt @ 2008-07-02 22:36 UTC (permalink / raw)
To: bug-guile
just to follow up -- not as an argument, but to add data --
this inaccurate printout happens with smaller numbers
(in the 2^50 range), and as noted by others, the internal
representation seems ok. Here's another example:
guile> 1000000000000007.0
1000000000000010.0
guile> (odd? 1000000000000007.0)
#t
guile> (even? 1000000000000007.0)
#f
("It's an *inexact* integer, ferchrissake")
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: big number printout
2008-07-02 22:36 big number printout Bill Schottstaedt
@ 2008-07-03 21:58 ` Neil Jerram
2008-07-04 0:53 ` Bill Schottstaedt
0 siblings, 1 reply; 9+ messages in thread
From: Neil Jerram @ 2008-07-03 21:58 UTC (permalink / raw)
To: Bill Schottstaedt; +Cc: bug-guile
2008/7/2 Bill Schottstaedt <bil@ccrma.stanford.edu>:
> just to follow up -- not as an argument, but to add data --
> this inaccurate printout happens with smaller numbers
> (in the 2^50 range), and as noted by others, the internal
> representation seems ok. Here's another example:
[...]
Is this an important problem for you in practice? What's the impact?
(Asking for prioritization purposes...)
Thanks,
Neil
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: big number printout
2008-07-03 21:58 ` Neil Jerram
@ 2008-07-04 0:53 ` Bill Schottstaedt
2008-07-04 8:31 ` Neil Jerram
0 siblings, 1 reply; 9+ messages in thread
From: Bill Schottstaedt @ 2008-07-04 0:53 UTC (permalink / raw)
To: Neil Jerram; +Cc: bug-guile
> Is this an important problem for you in practice? What's the impact?
> (Asking for prioritization purposes...)
What? Is this something new that Guile prioritizes bug reports?
Decide for yourself.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: big number printout
2008-07-04 0:53 ` Bill Schottstaedt
@ 2008-07-04 8:31 ` Neil Jerram
2008-07-04 9:18 ` Marijn Schouten (hkBst)
0 siblings, 1 reply; 9+ messages in thread
From: Neil Jerram @ 2008-07-04 8:31 UTC (permalink / raw)
To: Bill Schottstaedt; +Cc: bug-guile
2008/7/4 Bill Schottstaedt <bil@ccrma.stanford.edu>:
>> Is this an important problem for you in practice? What's the impact?
>> (Asking for prioritization purposes...)
>
> What? Is this something new that Guile prioritizes bug reports?
Not "Guile", me. As one of Guile's maintainers, my desire - and to
some extent duty - is to work on fixing/improving the things that
matter most to Guile's users. I have more things to work on than I
have immediate time for, so surely it makes sense to try to
prioritize; doesn't it?
> Decide for yourself.
If the problem is not serious for you, I personally won't get to it
very soon. Of course, it is still fine for anyone else to investigate
this problem too!
Neil
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: big number printout
2008-07-04 8:31 ` Neil Jerram
@ 2008-07-04 9:18 ` Marijn Schouten (hkBst)
0 siblings, 0 replies; 9+ messages in thread
From: Marijn Schouten (hkBst) @ 2008-07-04 9:18 UTC (permalink / raw)
To: bug-guile
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Neil Jerram wrote:
> 2008/7/4 Bill Schottstaedt <bil@ccrma.stanford.edu>:
>>> Is this an important problem for you in practice? What's the impact?
>>> (Asking for prioritization purposes...)
>> What? Is this something new that Guile prioritizes bug reports?
>
> Not "Guile", me. As one of Guile's maintainers, my desire - and to
> some extent duty - is to work on fixing/improving the things that
> matter most to Guile's users. I have more things to work on than I
> have immediate time for, so surely it makes sense to try to
> prioritize; doesn't it?
>
>> Decide for yourself.
>
> If the problem is not serious for you, I personally won't get to it
> very soon. Of course, it is still fine for anyone else to investigate
> this problem too!
>
> Neil
For fun and some more data points:
$ ./invoke.scm -e "(+ 40816513889983671.0 3.0) (= (+ 40816513889983671.0 3.0)
40816513889983674.0)"
Bigloo (3.1a)
40816513889984000.0#t
CHICKEN 3.2.0
4.08165138899837e+16#t
Elk 3.99.7
40816513889983672.0#t
Gambit v4.1.0
4.081651388998367e16#t
Gauche scheme interpreter, version 0.8.13 [utf-8,pthreads]
4.081651388998367e16#t
Guile 1.8.5
40816513889983700.0#t
ikarus is unavailable
kawa is unavailable
larceny is unavailable
MIT/GNU Scheme 7.7.90.+
40816513889983670.#t
Welcome to MzScheme v4.0.1 [3m], Copyright (c) 2004-2008 PLT Scheme Inc.
4.081651388998367e+16#t
RScheme 0.7.3.4-b7u
value := 0.
value := #t
scheme48 1.8
40816513889983670.0
#t
Schoca Shell (Version 0.3.0-cvs) by Christoph Bauer
schoca> ==> #i40816513889983674
==> #t
schoca>
scm 5e4
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
SCM may be distributed under the terms of the GNU General Public Licence;
certain other uses are permitted as well. For details, see the file `COPYING',
which is included in the SCM distribution.
There is no warranty, to the extent permitted by law.
This executable was loaded from "/usr/bin/scm"
40816513889983670.0#f
sigscheme 0.8.3
Error: in read: ill-formatted number: #d40816513889983671.0
Error: known bug: ready? operation is not supported on this port
sscm>
sisc is unavailable
stklos (version 0.98)
4.08165138899837e+16#t
TinyScheme 1.39
> 4.081651389e+16
> #t
>
Things to notice:
*Schoca is the only one to print out the correct integer sum.
*scm is the only one to get the comparison be #f
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
iEYEARECAAYFAkht6ugACgkQp/VmCx0OL2wytACgrWdd5BOyoxjTaFdZXGyFJQTr
ThsAnj/eC6aFgUQhsG2egJtAsQy6aOUF
=w260
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 9+ messages in thread
* big number printout
@ 2008-07-01 14:03 Bill Schottstaedt
2008-07-02 7:30 ` Ludovic Courtès
0 siblings, 1 reply; 9+ messages in thread
From: Bill Schottstaedt @ 2008-07-01 14:03 UTC (permalink / raw)
To: bug-guile
Not sure this is a bug, but it is confusing:
guile> (version)
"1.8.5"
guile> (+ 40816513889983671.0 3.0)
40816513889983700.0
guile> (= (+ 40816513889983671.0 3.0) 40816513889983700.0)
#f
guile> (= (+ 40816513889983671.0 3.0) 40816513889983674.0)
#t
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: big number printout
2008-07-01 14:03 Bill Schottstaedt
@ 2008-07-02 7:30 ` Ludovic Courtès
2008-07-02 21:22 ` Marijn Schouten (hkBst)
0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2008-07-02 7:30 UTC (permalink / raw)
To: bug-guile
Hi,
"Bill Schottstaedt" <bil@ccrma.Stanford.EDU> 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.
Thanks,
Ludovic.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: big number printout
2008-07-02 7:30 ` Ludovic Courtès
@ 2008-07-02 21:22 ` Marijn Schouten (hkBst)
2008-07-03 7:17 ` Ludovic Courtès
0 siblings, 1 reply; 9+ messages in thread
From: Marijn Schouten (hkBst) @ 2008-07-02 21:22 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: bug-guile
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ludovic Courtès wrote:
> Hi,
>
> "Bill Schottstaedt" <bil@ccrma.Stanford.EDU> 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-----
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: big number printout
2008-07-02 21:22 ` Marijn Schouten (hkBst)
@ 2008-07-03 7:17 ` Ludovic Courtès
0 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2008-07-03 7:17 UTC (permalink / raw)
To: bug-guile
Hi,
"Marijn Schouten (hkBst)" <hkBst@gentoo.org> writes:
> 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.
Oh yes, you're right, I had overlooked that second part of the test.
Bigloo and Ikarus behave the same on that part too, but I don't know
what "makes it so".
Thanks,
Ludovic.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-07-04 9:18 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-02 22:36 big number printout Bill Schottstaedt
2008-07-03 21:58 ` Neil Jerram
2008-07-04 0:53 ` Bill Schottstaedt
2008-07-04 8:31 ` Neil Jerram
2008-07-04 9:18 ` Marijn Schouten (hkBst)
-- strict thread matches above, loose matches on Subject: below --
2008-07-01 14:03 Bill Schottstaedt
2008-07-02 7:30 ` Ludovic Courtès
2008-07-02 21:22 ` Marijn Schouten (hkBst)
2008-07-03 7:17 ` Ludovic Courtès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).