RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Math.Poly Function

Evaluates a uniform polynomial of one variable at the value X.

Pascal
function Poly(const X: Extended; const Coefficients: array of Double): Extended;
C++
Extended Poly(const Extended X, const array of Double Coefficients);

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.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!