Geant4-11
Functions
nf_polevl.cc File Reference
#include "nf_specialFunctions.h"

Go to the source code of this file.

Functions

double nf_p1evl (double x, double coef[], int N)
 
double nf_polevl (double x, double coef[], int N)
 

Function Documentation

◆ nf_p1evl()

double nf_p1evl ( double  x,
double  coef[],
int  N 
)

Definition at line 67 of file nf_polevl.cc.

67 {
68
69 double ans;
70 double *p;
71 int i;
72
73 p = coef;
74 ans = x + *p++;
75 i = N-1;
76
77 do {
78 ans = ans * x + *p++; }
79 while( --i ); // Loop checking, 11.06.2015, T. Koi
80
81 return( ans );
82}

Referenced by lgam().

◆ nf_polevl()

double nf_polevl ( double  x,
double  coef[],
int  N 
)

Definition at line 46 of file nf_polevl.cc.

46 {
47
48 double ans;
49 int i;
50 double *p;
51
52 p = coef;
53 ans = *p++;
54 i = N;
55
56 do {
57 ans = ans * x + *p++; }
58 while( --i ); // Loop checking, 11.06.2015, T. Koi
59
60 return( ans );
61}

Referenced by lgam(), nf_gammaFunction(), and stirf().