Skip to content

Commit

Permalink
Explicit cast uint64_t to double
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkn committed Jan 14, 2021
1 parent f6765b8 commit f0d94e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/bigdecimal/bigdecimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f0d94e6

Please sign in to comment.