Skip to content

Commit ab042d0

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 160a9e4 commit ab042d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/numeric.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8433,7 +8433,7 @@ power_var_int(const NumericVar *base, int exp, NumericVar *result, int rscale)
84338433
* to around log10(abs(exp)) digits, so work with this many extra digits
84348434
* of precision (plus a few more for good measure).
84358435
*/
8436-
sig_digits += (int) log(fabs(exp)) + 8;
8436+
sig_digits += (int) log(fabs((double) exp)) + 8;
84378437

84388438
/*
84398439
* Now we can proceed with the multiplications.

0 commit comments

Comments
 (0)