#788 closed defect (worksforme)
#e1.0000000000000001 evaluates to 1.0 with numbers on the REPL
Reported by: | Christian Kellermann | Owned by: | sjamaan |
---|---|---|---|
Priority: | major | Milestone: | 4.9.0 |
Component: | extensions | Version: | 4.7.x |
Keywords: | numbers reader syntax | Cc: | |
Estimated difficulty: |
Description
CHICKEN
(c)2008-2011 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 4.7.5 (rev 5518972)
openbsd-unix-gnu-x86 [ manyargs dload ptables ]
compiled 2012-02-04 on necronomicon.my.domain (OpenBSD)
#;1> #e1.0000000000000001
1
#;2> (use numbers)
; loading /home/ckeen/chickens/master/lib/chicken/6/numbers.import.so ...
; loading /home/ckeen/chickens/master/lib/chicken/6/chicken.import.so ...
; loading /home/ckeen/chickens/master/lib/chicken/6/foreign.import.so ...
; loading /home/ckeen/chickens/master/lib/chicken/6/numbers.so ...
#;3> #e1.0000000000000001
1.0
I was expecting a fraction and Peter too:
21:34 < sjamaan> #;1> (use numbers)
21:34 < sjamaan> #;2> #e1.0000000000000001
21:34 < sjamaan> 10000000000000001/10000000000000000
I forgot to add this to the changelog on the wiki, but the fix for exactness prefix handling is only available in trunk, not in numbers 2.7. It only works with the 4.7.4 dev snapshot anyway (or some master version between 4.7.3 and 4.7.4, of course). I will make a new numbers release ASAP (I need to get the numbers tests compiled first, or else maybe I could disable the types database I guess)
I've tested this on call-cc.org (which is also 32-bits, which we originally thought was the cause of this since it worked on 64-bits) and I've updated the changelog to reflect the fact that this only works in trunk.