Skip to main content

Mojo function

polynomial_evaluate

polynomial_evaluate[: Bool, dtype: DType, width: Int, //, coefficients: List[SIMD[dtype, 1], $0]](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 (List[SIMD[dtype, 1], $0]): The coefficients.

Args:

  • x (SIMD[dtype, width]): The value to compute the polynomial with.

Returns:

The polynomial evaluation results using the specified value and the constant coefficients.

Was this page helpful?