Scheme numeric reader of exact exponential constants
As reported by jcowan
on LiberaChat's #lisp
, the constant number #e1e500
should be read as (expt 10 500)
, not as (exact 1e500)
, and should thus produce a bignum. Currently, it errors due to the finite range of double floats. The other exponential letters in §6.2.5 of the R7RS standard such as f
for single floats or d
for double floats will maintain the old behavior. Thus, #e1.0e500
and #e#1d500
will still overflow (although it is unclear if the first one should). The new behavior must also work when base-10 is specified, i.e. #d#e1e500
and #e#d1e500
.