It seems that the % operator and divmod method behave differently from Ruby when used with negative numbers.
mruby: 1.0e+20
Ruby 3.3: 99999999999999999999
mruby: [NaN, NaN]
Ruby 3.3: [-1, 99999999999999999999]
The problem is probably caused by mruby converting bigints to float at some point.
Test cases are placed in this pull request: #6444
It seems that the
%operator anddivmodmethod behave differently from Ruby when used with negative numbers.mruby:
1.0e+20Ruby 3.3:
99999999999999999999mruby:
[NaN, NaN]Ruby 3.3:
[-1, 99999999999999999999]The problem is probably caused by mruby converting bigints to float at some point.
Test cases are placed in this pull request: #6444