Opened 11 months ago
Closed 11 months ago
#1418 closed defect (invalid)
#e1e500 is not exact (numbers egg, possibly Chicken 5 as well)
Reported by: | johnwcowan | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 5.0 |
Component: | unknown | Version: | 4.12.0 |
Keywords: | Cc: | ||
Estimated difficulty: |
Description
Per R5RS and later standards, #e1e500 is the same as 10000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000.
But this is not so in Chicken, which treats #e the same as calling inexact->exact, and so returns +inf.0, which is neither exact nor correct. When #e is present, the result needs to be computed by bignum/ratio arithmetic, even if what follows is a decimal fraction.
Change History (2)
comment:1 Changed 11 months ago by sjamaan
comment:2 Changed 11 months ago by sjamaan
- Resolution set to invalid
- Status changed from new to closed
As discussed on IRC, this was just an old version of numbers, fixed by reinstalling
In CHICKEN 5 and in CHICKEN 4 with the numbers egg, I get 10000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000
Without the numbers egg, it'll return +inf.0 of course...
How did you test this?