Opened 7 years ago

Closed 7 years 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 7 years ago by sjamaan

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?

comment:2 Changed 7 years ago by sjamaan

Resolution: invalid
Status: newclosed

As discussed on IRC, this was just an old version of numbers, fixed by reinstalling

Note: See TracTickets for help on using tickets.