float-ratio-float returns 0 for numbers close to least-positive-float
Describe the bug
kernel::float-ratio-float
returns zero (when underflows are
disabled) for numbers that are just less least-positive float. I
think the it should return the least-positive float value instead
because it's closer than 0.
To Reproduce
Steps to reproduce the behavior:
- Evaluate
(kernel::float-ratio-float (/ 4 (expt 10 324)) 'double-float)
- This returns 0d0
Expected behavior
I was kind of expecting 4\times 10^{-324}
to be returned because
that is closer to least-positive-double-float
(4.9406564584124654d-324) than it is to 0.
We have the same issue with single-float
's and double-double-float
's.
Desktop (please complete the following information):
- OS: All
- Version: snapshot-2023-08
Additional context
Add any other context about the problem here.