<charconv>: fix from_chars("0.fffffffffffff8p-1022")#934
<charconv>: fix from_chars("0.fffffffffffff8p-1022")#934StephanTLavavej merged 2 commits intomicrosoft:masterfrom
Conversation
This commit fixes a bug the computation of floating point exponent when the magnitude of the result before rounding is <= 0.5 ulp smaller than numeric_limits<T>::min(), and after rounding it becomes a normal number.
|
Side note: It appears to me that |
|
Current status: after the US holiday this weekend, I'll need to work on a bit of spaceship stuff to unblock other maintainers, then I should have time to review this (which is mostly a matter of exploring how the fix works and getting my brain to catch up - if I had written this part from scratch I would understand it immediately). |
StephanTLavavej
left a comment
There was a problem hiding this comment.
Looks good to me, including the set of test cases. Thanks!
CaseyCarter
left a comment
There was a problem hiding this comment.
I really hope we never lose the comments in <charconv>.
|
Thanks for finding and fixing this correctness bug! This will ship in VS 2019 16.8 Preview 3. 😸 |
This PR fixes a bug in the computation of floating point exponent for a special case in
from_chars, when the magnitude of the result before rounding is <= 0.5 ulp smaller thannumeric_limits<T>::min(), and after rounding it becomes a normal number.Fixes #931