1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2016-03-21 19:14:27 +00:00
parent 03d0501f51
commit 520650798c

7
time.c
View file

@ -364,8 +364,7 @@ wmul(wideval_t wx, wideval_t wy)
{
#if WIDEVALUE_IS_WIDER
if (FIXWV_P(wx) && FIXWV_P(wy)) {
wideint_t z;
if (MUL_OVERFLOW_FIXWV_P(FIXWV2WINT(wx), FIXWV2WINT(wy))
if (MUL_OVERFLOW_FIXWV_P(FIXWV2WINT(wx), FIXWV2WINT(wy)))
return WINT2WV(FIXWV2WINT(wx) * FIXWV2WINT(wy));
}
#endif
@ -462,7 +461,7 @@ wdiv(wideval_t wx, wideval_t wy)
wideval_t q;
if (wdivmod0(wx, wy, &q, NULL)) return q;
#endif
return v2w(div(wx, wy));
return v2w(div(w2v(wx), w2v(wy)));
}
static wideval_t
@ -472,7 +471,7 @@ wmod(wideval_t wx, wideval_t wy)
wideval_t r;
if (wdivmod0(wx, wy, NULL, &r)) return r;
#endif
return v2w(mod(wx, wy));
return v2w(mod(w2v(wx), w2v(wy)));
}
static VALUE