FV3 Bundle
fastexp_nlm.c
Go to the documentation of this file.
1 #include <math.h>
2 /*
3  * Fast pow() reference implementation
4  */
5 
6 double fast_exp(double x, double y)
7 {
8  float xx;
9  float yy;
10  float fret;
11  double dret;
12  xx=x;
13  yy=y;
14  fret = powf(xx,yy);
15  dret = fret;
16  return dret;
17 }
18 
19 float fast_expf(float x, float y)
20 {
21  return powf(x,y);
22 }
23 
24 // Fortran bindings
25 double FASTEXP (double *x,double *y){return fast_exp(*x,*y);}
26 double FASTEXP_(double *x,double *y){return fast_exp(*x,*y);}
27 double fastexp (double *x,double *y){return fast_exp(*x,*y);}
28 double fastexp_(double *x,double *y){return fast_exp(*x,*y);}
29 
30 float FASTEXPF (float *x,float *y){return fast_expf(*x,*y);}
31 float FASTEXPF_(float *x,float *y){return fast_expf(*x,*y);}
32 float fastexpf (float *x,float *y){return fast_expf(*x,*y);}
33 float fastexpf_(float *x,float *y){return fast_expf(*x,*y);}
34 
double fastexp(double *x, double *y)
Definition: fastexp_nlm.c:27
float fastexpf_(float *x, float *y)
Definition: fastexp_nlm.c:33
double FASTEXP_(double *x, double *y)
Definition: fastexp_nlm.c:26
float FASTEXPF_(float *x, float *y)
Definition: fastexp_nlm.c:31
float fast_expf(float x, float y)
Definition: fastexp_nlm.c:19
float fastexpf(float *x, float *y)
Definition: fastexp_nlm.c:32
float FASTEXPF(float *x, float *y)
Definition: fastexp_nlm.c:30
double FASTEXP(double *x, double *y)
Definition: fastexp_nlm.c:25
double fast_exp(double x, double y)
Definition: fastexp_nlm.c:6
double fastexp_(double *x, double *y)
Definition: fastexp_nlm.c:28