You are here: Symbol Reference > RegModels Namespace > Functions > RegModels.PowerEval Function
Stats Master VCL
ContentsIndex
PreviousUpNext
RegModels.PowerEval Function

Evaluates power function.

Pascal
function PowerEval(Const B: Array of double; X: double): double; overload;

b[0]*X^b[1] for given value X and parameters in B array.

Evaluate power function for single x.

Uses RegModels, Math387;
procedure Example;
var y: double;
begin
  y := PowerEval([-5,3.5], 2.0);
  // y = -5.0*(2.0)^(3.5) = -56.568542495
end;
#include "Math387.hpp"
#include "RegModels.hpp"
void __fastcall Example();
{
  double y = PowerEval(OPENARRAY(double,(-5,3.5)),2.0);
}
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!