Math::ModInt::GF3 - integer arithmetic modulo 3
This documentation refers to version 0.007 of Math::ModInt::GF3.
use Math::ModInt; $a = Math::ModInt->new(2, 3); # 2 [mod 3] $b = $a->new(0); # 0 [mod 3] $c = $a + $b; # 2 [mod 3] $d = $a**2 - $b/$a; # 1 [mod 3] print $d->residue, " [mod ", $b->modulus, "]"; # prints 1 [mod 3] print "$d"; # prints mod(1, 3) $bool = $c == $d; # false
Math::ModInt::GF3 is an implementation of Math::ModInt for modulus three. Like all Math::ModInt implementations, it is loaded behind the scenes when there is demand for it, without applications needing to worry about it. Implementations for special cases like this can take advantage of properties specific to their subdomain and be therefore substantially more efficient than generic ones.
Martin Becker, <email@example.com>
Copyright (c) 2012 by Martin Becker. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6.0 or, at your option, any later version of Perl 5 you may have available.
This library is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.