Using mathematical functions 167
EXP Natural exponential. This is more accurate than due
to limitations of the power function.
EXP(value)
EXPM1 Exponent minus 1 : . This is more accurate than
EXP when x is close to zero.
EXPM1(value)
LNP1 Natural log plus 1 : ln(x+1). This is more accurate than
the natural logarithm function when x is close to zero.
LNP1(value)
Integer
ichinrem Integer Chinese Remainder Theorem for two equations.
Takes two lists [a, p] and [b, q] and returns a list of two
integers, [r, n], such that x = r modn. In this case, x is such
that modp and modq; also,
ichinrem([a, p], [b, q])
Example:
ichinrem([2,7],[3,5]) returns [-12,35].
idivis Integer divisors. Returns a list of all the factors of the
integer a.
idivis(a)
Example:
idivis(12) retu rns [1,2,3,4,6,12].
iegcd Integer extended greatest common divisor. For integers a
and b, returns [u, v¸ igcd] such that
.
iegcd(a, b)
Example:
iegcd(14, 21) returns [-1,1,7].