PolynomialEvaluationUtilities¶

This package implements evaluation functions useful for modular algorithms. Computations work on integer polynomials, but most is done modulo a prime which is provided via parameters, either explicitly or through a state parameter (state also caches needed buffers). Some functions work on fractions. To avoid useless GCD computations during evaluation fractions may be represented as a record.

eval1: (Polynomial Integer, Symbol, Integer, Record(prime: Integer, eval1coeffbuf: U32Vector, eval1expbuf: SortedExponentVector)) -> Polynomial Integer

eval1(pol, v, pt, pss) evaluates pol in variable v at pt, using global state form pss. Computations are done modulo a prime contained in pss.

eval1: (Record(numer: Polynomial Integer, denom: Polynomial Integer), Symbol, Integer, Record(prime: Integer, eval1coeffbuf: U32Vector, eval1expbuf: SortedExponentVector)) -> Union(Record(numer: Polynomial Integer, denom: Polynomial Integer), failed)

eval1(pq, v, pt, pss) evaluates fraction of polynomial pq in variable v at pt, using global state form pss. Computations are done modulo a prime contained in pss.

eval1a: (Polynomial Integer, Integer, Record(prime: Integer, eval1coeffbuf: U32Vector, eval1expbuf: SortedExponentVector)) -> Integer

eval1a(pol, pt, pss) evaluates polynomial pol at point pt using global state form pss. Computations are done modulo a prime contained in pss. Note: pol must have at most one variable.

modpeval: (Polynomial Integer, List Symbol, List Integer, Integer) -> Integer

modpeval(pol, lv, lpt, p) evaluates polynomial pol in variables form lv at point from lpt modulo a prime p

modpreduction: (Fraction Polynomial Integer, Integer) -> Union(Record(numer: Polynomial Integer, denom: Polynomial Integer), failed)

modpreduction(r, p) reduces a rational function r modulo prime p.

modpreduction: (Polynomial Integer, Integer) -> Polynomial Integer

modpreduction(pol, p) reduces polynomial pol modulo prime p.