Language::Befunge::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
% does. However, when negative values are involved, they all work differently.
Create a new MODU instance.
- $mod = M( $x, $y )
Signed-result modulo: x MOD y = x - FLOOR(x / y) * y
- $mod = U( $x, $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.
- $mod = R( $x, $y )
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.
This software is copyright (c) 2003 by Jerome Quelin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.