msvcrt: Use Dragon4 algorithm to fix inconsistent rounding behaviour for sprintf and add tests. The Dragon4 algorithm implementation is based on http://www.ryanjuckett.com/programming/printing-floating-point-numbers/.
piotr at codeweavers.com
Mon Mar 30 06:10:46 CDT 2015
On 03/30/15 10:28, YongHao Hu wrote:
> Excuse me,
> Is there anything to do to improve this patch?
I'm simply not sure what to think about this patch. Printf with this
patch is not always producing the same output as native dll. You can see
the difference calling printf with big precision (as far as I remember
native never displays more than 18 digits and fills the rest with '0').
Because of that I'm not sure if this algorithm is really needed here.
The bug with different rounding can be probably fixed by printing the
double with bigger precision and doing the rounding our self. On the
other hand there are some advantages of making it not depending on host
system standard library.
More information about the wine-devel