For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).
polynomial_evaluate
polynomial_evaluate[dtype: DType, width: Int, //, coefficients: Span[Scalar[dtype], coefficients.origin]](x: SIMD[dtype, width]) -> SIMD[dtype, width]
Evaluates the polynomial.
Parameters:
- dtype (
DType): The dtype of the value. - width (
Int): The width of the computed value. - coefficients (
Span[Scalar[dtype], coefficients.origin]): The coefficients.
Args:
- x (
SIMD[dtype, width]): The value to compute the polynomial with.
Returns:
SIMD[dtype, width]: The polynomial evaluation results using the specified value and the
constant coefficients.