diff options
| author | Dean Rasheed <dean.a.rasheed@gmail.com> | 2021-01-05 11:46:44 +0000 |
|---|---|---|
| committer | Dean Rasheed <dean.a.rasheed@gmail.com> | 2021-01-05 11:46:44 +0000 |
| commit | 0097193b17dd8e1dd85347007da249ed4c395eb5 (patch) | |
| tree | 86afe88712f5ed1357f6ab7575e0152bed5084a5 | |
| parent | 275b190b3ee51e811604e2836f199c080bf1ae37 (diff) | |
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 0bb2a7a9a3d..f51820c5186 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -8265,7 +8265,7 @@ power_var_int(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. |
