Team-Fly
Previous Section Next Section

14.2 Number Theory

In contrast to the arithmetic functions, the following number-theoretic member functions do not overwrite the implicit first argument with the result. The reason for this is that with more complex functions it has been shown in practice not to be practical to overwrite, as is the case with simple arithmetic functions. The results of the following functions are thus returned as values rather than as pointers.

The friend function chinrem(const int noofeq, LINT** coeff) accepts a vector coeff of pointers to LINT objects, which are passed as coefficients a1, m1, a2, m2, a3, m3,... of a system of linear congruences with "arbitrarily" many equations x ai mod mi, i = 1,..., noofeq (see Appendix B).


Team-Fly Previous Section Next Section