1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-28 05:21:27 +03:00

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.
This commit is contained in:
Dean Rasheed 2021-01-05 11:46:44 +00:00
parent 275b190b3e
commit 0097193b17

View File

@ -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 * to around log10(abs(exp)) digits, so work with this many extra digits
* of precision (plus a few more for good measure). * 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. * Now we can proceed with the multiplications.