Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
cdf_48.c
Go to the documentation of this file.00001 #include "cdflib.h"
00002 double dstrem(double *z)
00003 {
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #define hln2pi 0.91893853320467274178e0
00023 #define ncoef 10
00024 static double coef[ncoef] = {
00025 0.0e0,0.0833333333333333333333333333333e0,
00026 -0.00277777777777777777777777777778e0,0.000793650793650793650793650793651e0,
00027 -0.000595238095238095238095238095238e0,
00028 0.000841750841750841750841750841751e0,-0.00191752691752691752691752691753e0,
00029 0.00641025641025641025641025641026e0,-0.0295506535947712418300653594771e0,
00030 0.179644372368830573164938490016e0
00031 };
00032 static int K1 = 10;
00033 static double dstrem,sterl,T2;
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 if(*z <= 0.0e0) ftnstop("Zero or negative argument in DSTREM");
00054 if(!(*z > 6.0e0)) goto S10;
00055 T2 = 1.0e0/pow(*z,2.0);
00056 dstrem = devlpl(coef,&K1,&T2)**z;
00057 goto S20;
00058 S10:
00059 sterl = hln2pi+(*z-0.5e0)*log(*z)-*z;
00060 dstrem = dlngam(z)-sterl;
00061 S20:
00062 return dstrem;
00063 #undef hln2pi
00064 #undef ncoef
00065 }