Doxygen Source Code Documentation
cdf_67.c File Reference
#include "cdflib.h"
Go to the source code of this file.
Functions | |
double | rcomp (double *a, double *x) |
Function Documentation
|
Definition at line 2 of file cdf_67.c. References a, gam1(), rcomp(), rlog(), and Xgamm(). Referenced by gaminv(), and rcomp().
00010 { 00011 static double rt2pin = .398942280401433e0; 00012 static double rcomp,t,t1,u; 00013 /* 00014 .. 00015 .. Executable Statements .. 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 } /* END */ |