mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/bigdecimal] Explicitly cast uint64_t to double
https://github.com/ruby/bigdecimal/commit/f0d94e6843
This commit is contained in:
parent
e129be7592
commit
b4ade73974
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue