summaryrefslogtreecommitdiff
path: root/strings/dtoa.c
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <cvicentiu@gmail.com>2017-11-23 13:03:23 +0200
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2017-12-30 00:20:58 +0200
commitb2a102fb584e55a5c07c25a1caa9575fe1732c14 (patch)
tree20595f97fea978f8d8b2fb86b177dd0b1233e706 /strings/dtoa.c
parentf9f976b217e6a9ad55d52ac8666d594208d9e3da (diff)
downloadmariadb-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.c2
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;