MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / polyValue1

Function polyValue1

applications/test/Polynomial/Test-Polynomial.C:75–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73
74
75scalar polyValue1(const scalar x)
76{
77 // "normal" evaluation using pow()
78 scalar value = coeff[0];
79
80 for (int i=1; i < PolySize; ++i)
81 {
82 value += coeff[i]*pow(x, i);
83 }
84
85 return value;
86}
87
88
89scalar polyValue2(const scalar x)

Callers 1

mainFunction · 0.85

Calls 1

powFunction · 0.50

Tested by

no test coverage detected