HF RL Explorer

Fix the mod operator for negative operands

Fix the mod operator for negative operands: a task in MiMo-V2.6-Code: MiMo-V2.6-RL Code (Harbor) (Harbor dataset). The mod operator in the standard library's arithmetic module gives mathematically surprising answers whenever negative numbers are involved. For example, -10 mod 3 currently evaluates…

The task

The `mod` operator in the standard library's arithmetic module gives mathematically surprising answers whenever negative numbers are involved. For example, `-10 mod 3` currently evaluates to `-1` and `10 mod -3` evaluates to `1`, which is the C-style truncated-division remainder (its sign follows the left-hand…

Part of openmodelai/MiMo-V2.6-Code.