Fix double floating point error in dtoa.c

When running an optimized build, compiler optimizations cause loss of
precision unless we force the expression to use a double type.
This commit is contained in:
Vicențiu Ciorbaru 2017-11-23 13:03:23 +02:00 committed by Vicențiu Ciorbaru
parent f9f976b217
commit b2a102fb58

View file

@ -1290,7 +1290,7 @@ static double ratio(Bigint *a, Bigint *b)
dval(&db)= b2d(b, &kb);
k= ka - kb + 32*(a->wds - b->wds);
if (k > 0)
word0(&da)+= k*Exp_msk1;
word0(&da)+= k*Exp_msk1 * 1.0;
else
{
k= -k;