26 #include <grass/gis.h>
27 #include <grass/interpf.h>
35 double rfsta2 = fi * fi * r / 4.;
37 static double c[4] = { 8.5733287401, 18.0590169730, 8.6347608925,
40 static double b[4] = { 9.5733223454, 25.6329561486, 21.0996530827,
43 double ce = 0.57721566;
45 static double u[10] = { 1.e+00, -.25e+00,
46 .055555555555556e+00, -.010416666666667e+00,
47 .166666666666667e-02, -2.31481481481482e-04,
48 2.83446712018141e-05, -3.10019841269841e-06,
49 3.06192435822065e-07, -2.75573192239859e-08
58 res = x * (u[0] + x * (u[1] + x * (u[2] + x * (u[3] + x * (u[4] + x *
75 ea = c[3] + x * (c[2] + x * (c[1] + x * (c[0] + x)));
76 eb = b[3] + x * (b[2] + x * (b[1] + x * (b[0] + x)));
77 e1 = (ea / eb) / (x * exp(x));
79 res = e1 + ce +
log(x);
95 double rfsta2 = fi * fi * r / 4.;
96 double x, exm, oneme, hold;
97 double fsta2 = fi * fi / 2.;
101 *gd1 = 1. - x / 2. + x * x / 6. - x * x * x / 24.;
102 *gd2 = fsta2 * (-.5 + x / 3. - x * x / 8. + x * x * x / 30.);
109 hold = x * exm - oneme;
110 *gd2 = (hold + hold) / (r2 * x);
114 *gd2 = -2. / (x * r2);
int IL_crstg(double r, double fi, double *gd1, double *gd2)
double IL_crst(double r, double fi)