-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Real generator broken in 1.76 #688
Comments
* NB: bundled Boost tarball reverts a change in Spirit.Karma that made it generate incorrect real number strings (boostorg/spirit#688)
Looks very suspect for this bug. :) I can confirm that reverting #629 fixes the issue. |
* updated Boost to 1.76.0 * NB: bundled Boost tarball reverts a change in the official Spirit.Karma that made it generate incorrect real number strings (boostorg/spirit#688) * NB: after this update, default Boost.Regex linkage is header-only
Oh good, there's already a ticket for this. This hit us pretty hard in production code. |
My guess is that the code @chambm mentioned misses the |
IIRC from my investigation back then: in any mode the value is rounded, for |
Ah, I remembered that my fix also introduces 2 ULP error for max cases in scientific mode which might imply there are should be more, and I did not feel it is an acceptable, so I abandoned the whole idea. |
Since Boost 1.76.0 there is a regression in the outputting of numbers: boostorg/spirit#688 Wt depends on this to serialize doubles to JavaScript. Until Boost incorporates a fix for this issue we will disable the use of Spirit to serialize doubles and use sprintf instead for versions of Boost starting from 1.76.0. Hopefully it will be fixed in 1.78.0, at which point we can update the check.
Since Boost 1.76.0 there is a regression in the outputting of numbers: boostorg/spirit#688 Wt depends on this to serialize doubles to JavaScript. Until Boost incorporates a fix for this issue we will disable the use of Spirit to serialize doubles and use sprintf instead for versions of Boost starting from 1.76.0. Hopefully it will be fixed in 1.78.0, at which point we can update the check.
This fixes issue #688. There's some code that divides the integer part by 10 and increases dim to compensate for it. This code is not applicable to fixed notation, however, since dim is disregarded in that case, causing the result to be off by a factor 10. We can fix this by checking if we're not using fixed notation first, before doing the division. Added a few tests to check for this regression.
This was fixed with the release of boost 1.79.0 and should therefore be closed I think. |
We've upgraded to Boost 1.79.0 from 1.68.0 and have a unit test failure for the following: A double of 3.0000000000000001e-06 is being returned as the following string: "3.000000000e-06" whereas we are expecting "3.0e-06" which is what was returned with Boost 1.68.0. |
Please see also my last comment on #736 which fixed a similar issue but introduced a new issue: |
At Coliru as of 6/3/2021, it incorrectly generates:
At rextester it correctly generates:
I'm not sure when it broke, and it's not broken for every input value, but for fairly mundane values it's very wrong. It seems to have something to do with the number of decimals places.
The text was updated successfully, but these errors were encountered: