PolynomialEvaluationUtilitiesΒΆ
evalut.spad line 1 [edit on github]
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)
evaluatespol
in variablev
atpt
, using global state formpss
. Computations are done modulo a prime contained inpss
.
- 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 polynomialpq
in variablev
atpt
, using global state formpss
. Computations are done modulo a prime contained inpss
.
- eval1a: (Polynomial Integer, Integer, Record(prime: Integer, eval1coeffbuf: U32Vector, eval1expbuf: SortedExponentVector)) -> Integer
eval1a(pol, pt, pss)
evaluates polynomialpol
at pointpt
using global state formpss
. Computations are done modulo a prime contained inpss
. Note:pol
must have at most one variable.
- modpeval: (Polynomial Integer, List Symbol, List Integer, Integer) -> Integer
modpeval(pol, lv, lpt, p)
evaluates polynomialpol
in variables formlv
at point fromlpt
modulo a primep
- modpreduction: (Fraction Polynomial Integer, Integer) -> Union(Record(numer: Polynomial Integer, denom: Polynomial Integer), failed)
modpreduction(r, p)
reduces a rational functionr
modulo primep
.
- modpreduction: (Polynomial Integer, Integer) -> Polynomial Integer
modpreduction(pol, p)
reduces polynomialpol
modulo primep
.