Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
cdf_67.c
Go to the documentation of this file.00001 #include "cdflib.h"
00002 double rcomp(double *a,double *x)
00003
00004
00005
00006
00007
00008
00009
00010 {
00011 static double rt2pin = .398942280401433e0;
00012 static double rcomp,t,t1,u;
00013
00014
00015
00016
00017 rcomp = 0.0e0;
00018 if(*a >= 20.0e0) goto S20;
00019 t = *a*log(*x)-*x;
00020 if(*a >= 1.0e0) goto S10;
00021 rcomp = *a*exp(t)*(1.0e0+gam1(a));
00022 return rcomp;
00023 S10:
00024 rcomp = exp(t)/Xgamm(a);
00025 return rcomp;
00026 S20:
00027 u = *x/ *a;
00028 if(u == 0.0e0) return rcomp;
00029 t = pow(1.0e0/ *a,2.0);
00030 t1 = (((0.75e0*t-1.0e0)*t+3.5e0)*t-105.0e0)/(*a*1260.0e0);
00031 t1 -= (*a*rlog(&u));
00032 rcomp = rt2pin*sqrt(*a)*exp(t1);
00033 return rcomp;
00034 }