SLong class
Header file is here.
BothSideProduct(const SNBlock <SLong>& a, const uint N, bool sort) --- the product a[0]a[1]...a[n-1] is evaluated
combL(ulong n, ulong k) --- binomial coefficient nCk
comb(const ulong n, const ulong r) --- binomial coefficient nCk
DivLLMult(const SLong& m, const SLong& n)
EulerNum(uint N) --- N-th Euler's number
FactPF(ulong N) --- N! factorial by prime factorization method
gcdL(const SLong& x, const SLong& y) --- the greatest common divisor of x and y
KaratsubaHHMult(const SLong& x, const SLong& y, SLong& z) --- z = (huge x)*(huge y)
KHHMult(const SLong& x, const SLong& y, SLong& z) --- z = (huge x)*(huge y)
KnuthLLDiv(const SLong& m, const SLong& n, bool needRem) --- m / n and m % n by Knuth's metod
lcmL(const SLong& a, const SLong& b) --- the least common multiple of a and b
LDiv2(const SLong& n) --- n/2
LDivPow2(const SLong& m, SLong& q, uint p) --- q=m/2p
LFact(ulong n) --- the factrial n! by a straight method
LLAdd(const SLong& m, const SLong& n) --- m + n
LLCompare(const SLong& m, const SLong& n) --- See source.
LLDiv(const SLong& m, const SLong& n) --- m / n
LLDiv(const SLong& m, const SLong& n, bool needRem) --- m / n and m % n
LLMult(&m, &n) --- m * n
LLMultFFT(const SLong& x, const SLong& y, SLong& z, uint N ), FFTWorkArea class --- z = x * y using the FFT multiplication
LLSub(const SLong& m, const SLong& n) --- m - n
Lpow(const SLong& x, ulong n) --- x n
Lpow10(long n) --- 10 n
LRand(uint size, fType radix) --- random number
LsAdd(fType a) --- m.LsAdd(a) => m += a
LsDiv(const SLong& m, ulong n, long* rem) --- m / n and remainder on &rem
LsMinus(fType a) --- m.LsMinus(a) => m -= a for the decrement operator
LsMult(const SLong& m, ulong n) --- m * n
LsPlus(fType a) --- m.LsPlus(a) => m += a for the increment operator
LSqrt(const SLong& N, int* sgn) --- square root of N by SLong
Ldiv_t structure --- SLong version of div_t
MpowMod(const SLong& M, ulong d, const SLong& n) --- M d mod n
MultPow10(long p) --- m.MultPow10(p) => m *= 10p
NewtonLLDiv(const SLong& m, const SLong& n, bool needRem) --- m / n and m % n by Newton's metod
NHHMult(&m, &n, &r) --- r = (huge m) * (huge n)
NLLMult(const SLong& m, const SLong& n) --- m * n
operator%(const SLong& m, const SLong& n) --- m % n
operator%(const SLong& m, double n) --- m % n
operator&(const SLong& m, const SLong& n) --- m & n
operator>>(const SLong& m, ulong n) --- m >> n
operator<<(const SLong& m, ulong n){ --- m << n
operator<<(ostream& os, const SLong& sl) --- output stream
operator*(const SLong& m, double n) --- m * n
operator+(const SLong& m, const SLong& n) --- m + n
operator-(const SLong& m, const SLong& n) --- m - n
operator/(const SLong& m, double n) --- m / n
operator|(const SLong& m, const SLong& n) --- m | n
permL(const ulong n, const ulong r) --- permutation nPr
PrimeFactorProduct(const SNBlock <primeFactor>& pf, int n) --- see source
Put(long, int, int, int), SLong::CharNthFig(long) --- Out put function. I recommend the output stream "operator <<"
above with "SetFormat".
RawPut(int crlf) --- output in raw representation
ReduceByPow2Rdx(SLong& m, SLong& n, SLong* div) ---If m and n have a common divisor in type 2b*Rr(=*div), they are divided by it.
SetDouble(double d)
SetLong(long v)
SetSDouble(const SDouble&)
SetShort(short v)
SetSmall(signed char v)
SetString(const char *s)
SLCutOut(SLong&, const SLong&, uint, uint)
SLDivHalf(const SLong& x, SLong& l, SLong& u)
SLong::operator=(const SFraction& sf)
TanCoeff(uint n), TanCoeffFree() --- n th tangent coefficients Tn
TanCoeffTable(SNBlock <SLong>& T, uint N) --- the table of tangent coefficients T[n]
TournamentProduct(const SNBlock <SLong>& a, const uint N) --- the product a[0]a[1]...a[n-1] is evaluated