1 Matching Annotations
- Sep 2016
-
Local file Local file
-
One key difference here is that, in Haskell (not in all lan-guages), if one or both arguments are negative, the results ofmodwill have the same sign as the divisor, while the result ofremwill have the same sign as the dividend
In other languages:
- Python and Ruby:
%
is the modulus operator, same asmod
in Haskell - JavaScript, Rust, Go:
%
is a remainder operator, so same asrem
- Python and Ruby:
-