> The following code demonstrates a small loss of precision using qi. I'm
> VS 2013 and boost 1.60.0. The problem is shown near the end where an
> is converted to double.
> The main problem for me is that I'm trying to replace an existing parser
> with qi. The small differences in precision are causing differences in
> regression test suite.
Did You forget to include the reproducing test code? I can't see it
// The cause is the calculation in boost::spirit::traits::scale:
// n = T(acc_n) / pow10<T>(-exp);
// I've expanded the code a bit here:
unsigned long long acc_n = 9022464718061531ul; // 9022464718061531
double d_acc_n = double(acc_n); // 9022464718061532.0 !
double fromInternalCalc = d_acc_n / -10000000000000000.; // -0.90224647180615325