larcenists / larceny

Larceny Scheme implementation
Other
202 stars 32 forks source link

(inexact (expt 2 -1024)) returns 0.0 #793

Closed WillClinger closed 7 years ago

WillClinger commented 7 years ago
> (inexact (expt 2 -1023))
1.1125369292536007e-308
> (* .5 (inexact (expt 2 -1023)))
5.562684646268003e-309
> (inexact (expt 2 -1024))
0.0

As shown above, inexact underflows when it could returned a denormalized number.

WillClinger commented 7 years ago

Fixed by changeset 2276a0bd60c67eafce55eeb3ecd09144a275231f