Language::Befunge::IP::lib::MODU - Modulo Arithmetic extension
The MODU fingerprint (0x4d4f4455) implements some of the finer,
less-well- agreed-upon points of modulo arithmetic.
With positive arguments,
these instructions work exactly the same as
when negative values are involved,
they all work differently.
Create a new MODU instance.
Signed-result modulo: x MOD y = x - FLOOR(x / y) * y
Sam Holden's unsigned-result modulo... No idea who this Sam Holden is or if he has a special algorithm for this, therefore always returning absolute value of standard modulo.
C-language integer remainder: old C leaves negative modulo undefined but C99 defines it as the same sign as the dividend so that's what we're going with.
Copyright (c) 2001-2009 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.