Skip to content

Commit f0b9bad

Browse files
committed
Add an explicit cast to double when using fabs().
Commit bc43b7c used fabs() directly on an int variable, which apparently requires an explicit cast on some platforms. Per buildfarm.
1 parent 9a299df commit f0b9bad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/numeric.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8182,7 +8182,7 @@ power_var_int(NumericVar *base, int exp, NumericVar *result, int rscale)
81828182
* to around log10(abs(exp)) digits, so work with this many extra digits
81838183
* of precision (plus a few more for good measure).
81848184
*/
8185-
sig_digits += (int) log(fabs(exp)) + 8;
8185+
sig_digits += (int) log(fabs((double) exp)) + 8;
81868186

81878187
/*
81888188
* Now we can proceed with the multiplications.

0 commit comments

Comments
 (0)