Closed cuviper closed 2 years ago
I think this may still have double-rounding, but I'm not sure how to avoid that. Perhaps we need to manually create the float from_bits
, but that will need to account for a lot of corner cases. At least this PR is better than the status quo...
Yeah, other implementations of this algorithm use ldexp
to avoid this issue, but while it's in libm
, I don't think it's provided by Rust's stdlib. Maybe worth implementing it here?
Fixes #91.