System.Math.Poly
Delphi
function Poly(const X: Single; const Coefficients: array of Single): Single;
function Poly(const X: Double; const Coefficients: array of Double): Double;
function Poly(const X: Extended; const Coefficients: array of Extended): Extended;
C++
extern DELPHI_PACKAGE float __fastcall Poly(const float X, const float *Coefficients, const int Coefficients_High)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Math.pas System.Math.hpp |
System.Math | System.Math |
Description
Evaluates a uniform polynomial of one variable at the value X.
Call Poly to evaluate the polynomial represented by the Coefficients parameter at the point where the variable equals the value of the X parameter. The coefficients are ordered in increasing powers of X, as shown in the following Delphi-like example:
Coefficients[0] + Coefficients[1]*X + ... + Coefficients[N]*(X**N)
Note: In C++, the Coefficients_Size parameter is N, the highest power to which X is raised.