3 ms·
The tweet we're discussing: > python, unlike C, had the mod operator always return a positive number, even if the first argument is negative That is true for
by the_mitsuhiko 5y ago
The tweet we're discussing:
> python, unlike C, had the mod operator always return a positive number, even if the first argument is negative
That is true for Rust's rem_euclid as well: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=59080e23e6c7dcf60e5ef766b52e1d20 https://play.rust-lang.org/?version=stable&mode=debug&editio...