Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
cdf_58.c
Go to the documentation of this file.00001 #include "cdflib.h"
00002 double gam1(double *a)
00003
00004
00005
00006
00007
00008 {
00009 static double s1 = .273076135303957e+00;
00010 static double s2 = .559398236957378e-01;
00011 static double p[7] = {
00012 .577215664901533e+00,-.409078193005776e+00,-.230975380857675e+00,
00013 .597275330452234e-01,.766968181649490e-02,-.514889771323592e-02,
00014 .589597428611429e-03
00015 };
00016 static double q[5] = {
00017 .100000000000000e+01,.427569613095214e+00,.158451672430138e+00,
00018 .261132021441447e-01,.423244297896961e-02
00019 };
00020 static double r[9] = {
00021 -.422784335098468e+00,-.771330383816272e+00,-.244757765222226e+00,
00022 .118378989872749e+00,.930357293360349e-03,-.118290993445146e-01,
00023 .223047661158249e-02,.266505979058923e-03,-.132674909766242e-03
00024 };
00025 static double gam1,bot,d,t,top,w,T1;
00026
00027
00028
00029
00030 t = *a;
00031 d = *a-0.5e0;
00032 if(d > 0.0e0) t = d-0.5e0;
00033 T1 = t;
00034 if(T1 < 0) goto S40;
00035 else if(T1 == 0) goto S10;
00036 else goto S20;
00037 S10:
00038 gam1 = 0.0e0;
00039 return gam1;
00040 S20:
00041 top = (((((p[6]*t+p[5])*t+p[4])*t+p[3])*t+p[2])*t+p[1])*t+p[0];
00042 bot = (((q[4]*t+q[3])*t+q[2])*t+q[1])*t+1.0e0;
00043 w = top/bot;
00044 if(d > 0.0e0) goto S30;
00045 gam1 = *a*w;
00046 return gam1;
00047 S30:
00048 gam1 = t/ *a*(w-0.5e0-0.5e0);
00049 return gam1;
00050 S40:
00051 top = (((((((r[8]*t+r[7])*t+r[6])*t+r[5])*t+r[4])*t+r[3])*t+r[2])*t+r[1])*t+
00052 r[0];
00053 bot = (s2*t+s1)*t+1.0e0;
00054 w = top/bot;
00055 if(d > 0.0e0) goto S50;
00056 gam1 = *a*(w+0.5e0+0.5e0);
00057 return gam1;
00058 S50:
00059 gam1 = t*w/ *a;
00060 return gam1;
00061 }