mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-rational (rat_mul_b): should not normalize multiplication results
This commit is contained in:
@@ -838,8 +838,8 @@ rat_mul_b(mrb_state *mrb, mrb_value x, mrb_value y)
|
||||
rat_type_error(mrb, y);
|
||||
}
|
||||
|
||||
mrb_value a = mrb_bint_mul(mrb, mrb_as_bint(mrb, rat_numerator(mrb, x)), num);
|
||||
mrb_value b = mrb_bint_mul(mrb, mrb_as_bint(mrb, rat_denominator(mrb, x)), den);
|
||||
mrb_value a = mrb_bint_mul_n(mrb, mrb_as_bint(mrb, rat_numerator(mrb, x)), num);
|
||||
mrb_value b = mrb_bint_mul_n(mrb, mrb_as_bint(mrb, rat_denominator(mrb, x)), den);
|
||||
return rational_new_b(mrb, a, b);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user