Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5777b6e

Browse files
committed
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.
1 parent e15c384 commit 5777b6e

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
@@ -9370,7 +9370,7 @@ power_var_int(const NumericVar *base, int exp, NumericVar *result, int rscale)
93709370
* to around log10(abs(exp)) digits, so work with this many extra digits
93719371
* of precision (plus a few more for good measure).
93729372
*/
9373-
sig_digits += (int) log(fabs(exp)) + 8;
9373+
sig_digits += (int) log(fabs((double) exp)) + 8;
93749374

93759375
/*
93769376
* Now we can proceed with the multiplications.

0 commit comments

Comments
 (0)