Function

vDSP_vpoly(_:_:_:_:_:_:_:_:)

Evaluates a single-precision polynomial using specified coefficients, independent variables, and strides.

Declaration

func vDSP_vpoly(_ __A: UnsafePointer<Float>, _ __IA: vDSP_Stride, _ __B: UnsafePointer<Float>, _ __IB: vDSP_Stride, _ __C: UnsafeMutablePointer<Float>, _ __IC: vDSP_Stride, _ __N: vDSP_Length, _ __P: vDSP_Length)

Parameters

__A

Single-precision real input vector: coefficients.

__IA

Stride for A.

__B

Single-precision real input vector: variable values.

__IB

Stride for B.

__C

Single-precision real output vector.

__IC

Stride for C.

__N

The number of elements to process.

__P

Degree of polynomial.

Discussion

Evaluates a polynomial using vector B as independent variables and vector A as coefficients. A polynomial of degree p requires p+1 coefficients, so vector A should contain P+1 values.

mathematical formula

See Also

Vector-to-Vector Polynomial Evaluation

static func evaluatePolynomial<U>(usingCoefficients: [Double], withVariables: U) -> [Double]

Returns a double-precision evaluated polynomial using specified coefficients and independent variables.

static func evaluatePolynomial<U>(usingCoefficients: [Float], withVariables: U) -> [Float]

Returns a single-precision evaluated polynomial using specified coefficients and independent variables.

static func evaluatePolynomial<U, V>(usingCoefficients: [Double], withVariables: U, result: inout V)

Evaluates a double-precision polynomial using specified coefficients and independent variables.

static func evaluatePolynomial<U, V>(usingCoefficients: [Float], withVariables: U, result: inout V)

Evaluates a single-precision polynomial using specified coefficients and independent variables.

func vDSP_vpolyD(UnsafePointer<Double>, vDSP_Stride, UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length, vDSP_Length)

Evaluates a double-precision polynomial using specified coefficients, independent variables, and strides.