mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Remove unnecessary bit shift in rational_new_f.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user