polynomial¶
- dnois.torch.polynomial(x, coefficients: Sequence)¶
Computes the value of a polynomial:
\[f(x)=a_0+a_1x+a_2x^2+\ldots+a_nx^n\]- Parameters:
x – Value of \(x\).
coefficients (Sequence) – Coefficients \(a_0,\ldots,a_n\).
None
incoefficients
is interpreted as zero but the last coefficient (i.e. the coefficient of the highest-order-term) cannot beNone
.
- Returns:
Value of \(f(x)\).