Remove unnecessary bit shift in `rational_new_f`.

parent f5e10e29
......@@ -208,7 +208,7 @@ rational_new_f(mrb_state *mrb, mrb_float f0)
if (f == RAT_HUGE_VAL || f > (mrb_float)MRB_INT_MAX) {
rat_overflow(mrb);
}
return rational_new(mrb, ((mrb_int)f)<<n, 1);
return rational_new(mrb, (mrb_uint)f, 1);
}
if (n < -RAT_INT_LIMIT) {
f = ldexp_rat(f, n+RAT_INT_LIMIT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment