diff options
author | Dean Rasheed <dean.a.rasheed@gmail.com> | 2021-01-05 11:52:42 +0000 |
---|---|---|
committer | Dean Rasheed <dean.a.rasheed@gmail.com> | 2021-01-05 11:52:42 +0000 |
commit | fead67c24ada8c6a4b661dec6f159dca1447e3d8 (patch) | |
tree | 9124904d6b1aebdc16cbdb8669eacf1f8eac4d75 | |
parent | bc43b7c2c06c32264efe79d0b86abd41236f1d5b (diff) | |
download | postgresql-fead67c24ada8c6a4b661dec6f159dca1447e3d8.tar.gz postgresql-fead67c24ada8c6a4b661dec6f159dca1447e3d8.zip |
Add an explicit cast to double when using fabs().
Commit bc43b7c2c0 used fabs() directly on an int variable, which
apparently requires an explicit cast on some platforms.
Per buildfarm.
-rw-r--r-- | src/backend/utils/adt/numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index 7cf56568f38..682200f636b 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -10290,7 +10290,7 @@ power_var_int(const NumericVar *base, int exp, NumericVar *result, int rscale) * to around log10(abs(exp)) digits, so work with this many extra digits * of precision (plus a few more for good measure). */ - sig_digits += (int) log(fabs(exp)) + 8; + sig_digits += (int) log(fabs((double) exp)) + 8; /* * Now we can proceed with the multiplications. |