diff options
author | Vicențiu Ciorbaru <cvicentiu@gmail.com> | 2017-11-23 13:03:23 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-12-30 00:20:58 +0200 |
commit | b2a102fb584e55a5c07c25a1caa9575fe1732c14 (patch) | |
tree | 20595f97fea978f8d8b2fb86b177dd0b1233e706 /strings/dtoa.c | |
parent | f9f976b217e6a9ad55d52ac8666d594208d9e3da (diff) | |
download | mariadb-git-b2a102fb584e55a5c07c25a1caa9575fe1732c14.tar.gz |
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.
Diffstat (limited to 'strings/dtoa.c')
-rw-r--r-- | strings/dtoa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/dtoa.c b/strings/dtoa.c index 9e0f7f4f43d..eccd05bcf92 100644 --- a/strings/dtoa.c +++ b/strings/dtoa.c @@ -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; |