Summary
#e1e500 is not exact (numbers egg, possibly Chicken 5 as well)
Metadata
- Id: ef8f7d1591995a6908c15ad475ff3b4aa11a36b0
- Trac id: 1418
- Type: defect
- Reporter: johnwcowan
- Owner:
- Cc:
- Status: closed
- Component: unknown
- Estimated difficulty:
- Resolution: invalid
- Priority: major
- Milestone: 5.0
- Version: 4.12.0
- Changetime: 2017-09-17 22:39:13 UTC
- Created: 2017-09-17 20:58:48 UTC
- Keywords:
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.
Changes and comments
[2017-09-17 21:48:56 UTC] sjamaan wrote:
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?
[2017-09-17 22:39:13 UTC] sjamaan changed status from new to closed
[2017-09-17 22:39:13 UTC] sjamaan set resolution to invalid
[2017-09-17 22:39:13 UTC] sjamaan wrote:
As discussed on IRC, this was just an old version of numbers, fixed by reinstalling