Functions | |
| unsigned long | gcd (unsigned long a, unsigned long b) |
| unsigned long | lcm (unsigned long a, unsigned long b) |
| unsigned long & | modProd (unsigned long &a, unsigned long b, unsigned long n) |
| unsigned long & | modAdd (unsigned long &, unsigned long, unsigned long) |
| template<typename C> | |
| unsigned long | remainder (C, unsigned long) |
| unsigned long | gcd (long a, unsigned long b) |
|
||||||||||||
|
Definition at line 39 of file arithmetic.h. Referenced by atlas::interpreter::annihilator_modulo(), atlas::abelian::cycGenerators(), gcd(), lcm(), atlas::makeOrthogonal(), atlas::abelian::FiniteAbelianGroup::order(), atlas::filekl::scan_polynomials(), atlas::abelian::transpose(), and atlas::updateCycGenerator(). |
|
||||||||||||
|
Synopsis: the classic Euclidian algorithm. It is assumed that Precondition: b > 0; Definition at line 30 of file arithmetic.cpp. References gcd(). |
|
||||||||||||
|
Synopsis: returns the lowest common multiple of a and b. Precondition: b > 0; Definition at line 57 of file arithmetic.cpp. References gcd(). Referenced by atlas::checkGenerator(), do_work(), atlas::abelian::Homomorphism::Homomorphism(), atlas::abelian::FiniteAbelianGroup::order(), atlas::interpreter::quotient_basis_wrapper(), and atlas::lattice::toCommonDenominator(). |
|
||||||||||||||||
|
Definition at line 46 of file arithmetic.h. Referenced by atlas::abelian::FiniteAbelianGroup::leftApply(). |
|
||||||||||||||||
|
Synopsis: a *= b mod n. Precondition: a < n; b < n. NOTE: preliminary implementation. It assumes that n <= 2^^(longBits/2). Will exit brutally if this is not fulfilled. Definition at line 70 of file arithmetic.cpp. Referenced by atlas::abelian::FiniteAbelianGroup::leftApply(). |
|
||||||||||||||||
|
Synopsis: returns the remainder of the division of c modulo m. The point is to always return the unique number r in [0,m[ such that a = q.m + r for a (unique) q. The difficulty arises when C is a signed type; if we are not careful the sign conversions will mess things up big time. NOTE: this looks rather clumsy but I didn't see a better way. It is not always true that for a < 0 one should return m - (-a m); this fails iff a is divisible by m. Definition at line 16 of file arithmetic_def.h. Referenced by test(), atlas::abelian::toArray(), and atlas::abelian::toEndomorphism(). |
1.3.9.1