Content-Length: 259261 | pFad | http://github.com/postgrespro/postgres/commit/fead67c24ada8c6a4b661dec6f159dca1447e3d8

45 Add an explicit cast to double when using fabs(). · postgrespro/postgres@fead67c · GitHub
Skip to content

Commit fead67c

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 bc43b7c commit fead67c

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

1029510295
/*
1029610296
* Now we can proceed with the multiplications.

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/fead67c24ada8c6a4b661dec6f159dca1447e3d8

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy