MCPcopy Create free account
hub / github.com/avaneev/biteopt / calcExponential

Function calcExponential

tests/testfn.h:2217–2228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2215 0.0, M_PI, 0.0, &calcTrigonometric01, NULL };
2216
2217static double calcExponential( const double* const x, const int N )
2218{
2219 double s = 0.0;
2220 int i;
2221
2222 for( i = 0; i < N; i++ )
2223 {
2224 s += sqr(x[i]);
2225 }
2226
2227 return( -exp(-0.5*s) );
2228}
2229
2230static const CTestFn TestFnExponential = { "Exponential", 0,
2231 -1.0, 1.0, -1.0, &calcExponential, NULL };

Callers

nothing calls this directly

Calls 1

sqrFunction · 0.85

Tested by

no test coverage detected