Add a workaround for Boost Spirit issue #688
Since Boost 1.76.0 there is a regression in the outputting of numbers: https://github.com/boostorg/spirit/issues/688
Updated by Roel Standaert 12 months ago
The bug occurs when it has to round the input up in order to fit into the given precision, so in our
round_js_str we get a
double as input, but ask it to output it with at most 7 decimals.
real_to_s function on the other hand gets a
float as input, and thus already has less precision, so at the very least I can't reproduce the issue with the numbers I used to test
round_js_str. That suggests we may also be able to work around the issue by sacrificing precision beforehand, or increasing precision where we use
If the bug affects
Postgres.C as well, we're a lot less likely to trigger it. I will look further to see if there is any number that will trigger the bug.