Function xxcalc::polynomial_calculator::functions::exponentiation [] [src]

pub fn exponentiation(args: Vec<Polynomial>) -> Result<PolynomialEvaluationError>

Performs exponentiation of polynomial (requires two arguments).

First argument is an exponentiation base, where second argument is the exponent (which must be a constant polynomial). Method of exponentiation is optimized, it depends on degree of the base and a value of the exponent. Exponentation of complicated polynomials is done subefficiently by multiplication.

Errors

It will return a NonConstantExponent error when the exponient is not a constant polynomial. Performing such operation would result in a non-polynomial result.

It will return a NonNaturalExponent error when the exponient is not a natural number and the base is not a constant polynomial. Performing such operation would result in a non-polynomial result.