summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/bigdecimal.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bigdecimal/bigdecimal.c')
-rw-r--r--ext/bigdecimal/bigdecimal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index f48f3edb18e..e560c19c063 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -2704,7 +2704,7 @@ rb_uint64_convert_to_BigDecimal(uint64_t uval, RB_UNUSED_VAR(size_t digs), int r
vp->frac[0] = (DECDIG)uval;
}
else {
- const size_t len = (size_t)ceil(log10(uval) / BASE_FIG);
+ const size_t len = (size_t)ceil(log10((double)uval) / BASE_FIG);
vp = VpAllocReal(len);
vp->MaxPrec = len;