calc is a calculator program for doing arbitrary
precision integer arithmetic. It is written in ANSI C and Yacc,
along the lines of the calculator programs hoc1,2,3, Kernighan
and Pike, The Unix Programming Environment, 233254, 1984. There
are a number of builtin functions accessible with CALC. These
include: gcd, fp (the simplest form of the inhomogeneous FinckePohst
algorithm), lcm, pollard (Pollard's p1 method), nprime(x) (the
first integer after x which passes the strong base 2 pseudoprime
test and the Lucas pseudoprime test), jacobi (Jacobi symbols),
peralta (Peralta's algorithm), congr (the solution of congruences),
chinese (the solution of a system of congruences), mthroot (the
integer part of the mth root of x), fund, pell (the continued
fraction expansion of sqrt{d}), surd, mpower, inv, factor, tau
(divisor function), sigma (the sum of the divisors), mobius, euler,
lprimroot, orderm (the order of a(mod n)), lucas, serret (Serret's
algorithm), collatz (Collatz' 3x+1 conjecture), miller (Miller's
test), hermite (the KannanBachem algorithm), improvep (LLLBabai
method), mlll (MLLL algorithm of M. Pohst), smith (Smith normal
form), rsae, encode, decode.
(adapted from the documentation)
