You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a further edge case where the exponent can overflow when
increased by the number of tens places in the integer part, or
underflow when decreased by the number of leading zeros in the
fractional part if the integer part is zero:
Fix these bugs. The exponent should not wrap and return Infinity (in case of underflow) or 0 (in case of overflow).
There is a merge request.
Impact
This improves the accuracy of floating point parsing on some extreme cases. Most ordinary programs or use cases are not likely to be affected. Users that are affected would presumably be pleased with this change.
Motivation
numberToRangedRational: fix edge cases for exp ≈ (maxBound :: Int)
Currently a negative exponent less than
minBound :: Intresults inInfinity, which is very surprising and obviously wrong.
There is a further edge case where the exponent can overflow when
increased by the number of tens places in the integer part, or
underflow when decreased by the number of leading zeros in the
fractional part if the integer part is zero:
Proposal
Fix these bugs. The exponent should not wrap and return
Infinity(in case of underflow) or0(in case of overflow).There is a merge request.
Impact
This improves the accuracy of floating point parsing on some extreme cases. Most ordinary programs or use cases are not likely to be affected. Users that are affected would presumably be pleased with this change.