Closed jpellegrini closed 11 months ago
Thanks for the report! I agree this would be a better behavior.
We could also do a better job computing exact
for large double's. These should be converted to bignums if they are outside the fixnum range.
We could also do a better job computing
exact
for large double's. These should be converted to bignums if they are outside the fixnum range.
That would be great!
Also, since you mentioned, I see that Cyclone has a bignum?
predicate, but not fixnum?
. Maybe it would be nice to have the latter too?
There is a fixnum?
procedure, though it is a bit buried in SRFI 143 rather than always being included in the REPL environment: https://github.com/justinethier/cyclone/blob/master/docs/api/srfi/143.md
There is a
fixnum?
procedure, though it is a bit buried in SRFI 143 rather than always being included in the REPL environment: https://github.com/justinethier/cyclone/blob/master/docs/api/srfi/143.md
Isn't it convenient / useful enough to have in the REPL environment? (Not really complaining -- it it's there, it's good enough already!)
Added code to signal an error when exact
receives a NAN or infinite value.
Also tightened up support for other types of edge cases involving doubles, bignums, and complex numbers.
Yes, I've just tested and it works fine here! Thanks! I guess this PR can be closed...
Hi! Maybe it would be nice to signal an error instead?
otherwise, weird things like the following will happen...