projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
160a9e4
)
Add an explicit cast to double when using fabs().
author
Dean Rasheed
<
[email protected]
>
Tue, 5 Jan 2021 11:48:45 +0000
(11:48 +0000)
committer
Dean Rasheed
<
[email protected]
>
Tue, 5 Jan 2021 11:48:45 +0000
(11:48 +0000)
Commit
bc43b7c2c0
used fabs() directly on an int variable, which
apparently requires an explicit cast on some platforms.
Per buildfarm.
src/backend/utils/adt/numeric.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/adt/numeric.c
b/src/backend/utils/adt/numeric.c
index 67fbf20a9d2b7386a89c8a30a863134271c9d6ce..fbfae79c355b1243771e7dc674423dd45394c611 100644
(file)
--- a/
src/backend/utils/adt/numeric.c
+++ b/
src/backend/utils/adt/numeric.c
@@
-8433,7
+8433,7
@@
power_var_int(const NumericVar *base, int exp, NumericVar *result, int rscale)
* to around log10(abs(exp)) digits, so work with this many extra digits
* 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.