3 ms·
perl started this bizarre interpretation of mod, some followed. The rest stayed with the POSIX libc definition.
by rurban 4y ago
perl started this bizarre interpretation of mod, some followed.
The rest stayed with the POSIX libc definition.
- kevin_thibedeau 4y agoAda had both before Perl existed.
- gerikson 4y agoAccording to the Wikipedia page (linked in the article), Perl uses the floored definition of mod, which is promoted by Knuth, and also used by APL, Fortran and Common Lisp. https://en.wikipedia.org/wiki/Modulo https://en.wikipedia.org/wiki/Modulo