perl/t/opbasic
TAKAI Kousuke b9b8c7d2e8 Fixed a bug that % operator returns wrong result when modulo is (IV_MIN - 1)
If $m % $n would generate a result that shall be equal to (IV_MIN - 1),
pp_modulo() used to wrongly convert it into IV and return wrapped
(overflowed) result.

handy.h: Added utility macros for this fix.  I think these macro can
be used in other places, so I put them on .h file.

t/opbasic/arith.t, t/op/64bitint.t: Added tests for this.
2024-04-13 13:30:39 -06:00
..