It seems that the division of a bigint by a small integer, where one of the operands is negative, is not working correctly.
Non-bigint division behavior:
-10**10 / 3
=> -3333333334
Bigint division behavior:
-10**20 / 3
=> -33333333333333333332
The result should be -33333333333333333334 (Ruby 3.3 and mruby 3.3.0 also give this result).
The problem is probably caused by not correctly handling rounding in the division algorithm.
Test cases are placed in this pull request: #6444
It seems that the division of a bigint by a small integer, where one of the operands is negative, is not working correctly.
Non-bigint division behavior:
Bigint division behavior:
The result should be
-33333333333333333334(Ruby 3.3 and mruby 3.3.0 also give this result).The problem is probably caused by not correctly handling rounding in the division algorithm.
Test cases are placed in this pull request: #6444