value

fun <T : Comparable<T>, C : Ring<T>> PiecewisePolynomial<T>.value(ring: C, arg: T): T?(source)

Return a value of polynomial function with given ring a given arg or null if argument is outside piecewise definition.


Evaluates value of this Double polynomial on provided Double argument.


fun <C> Polynomial<C>.value(ring: Ring<C>, arg: C): C(source)

Evaluates value of this polynomial on provided argument.

It is an implementation of Horner's method.