Doxygen Source Code Documentation
cdf_05.c File Reference
#include "cdflib.h"
Go to the source code of this file.
Functions | |
double | bcorr (double *a0, double *b0) |
Function Documentation
|
Definition at line 2 of file cdf_05.c. References a, bcorr(), c, fifdmax1(), fifdmin1(), and x2. Referenced by basym(), bcorr(), betaln(), brcmp1(), brcomp(), and dlnbet().
00012 { 00013 static double c0 = .833333333333333e-01; 00014 static double c1 = -.277777777760991e-02; 00015 static double c2 = .793650666825390e-03; 00016 static double c3 = -.595202931351870e-03; 00017 static double c4 = .837308034031215e-03; 00018 static double c5 = -.165322962780713e-02; 00019 static double bcorr,a,b,c,h,s11,s3,s5,s7,s9,t,w,x,x2; 00020 /* 00021 .. 00022 .. Executable Statements .. 00023 */ 00024 a = fifdmin1(*a0,*b0); 00025 b = fifdmax1(*a0,*b0); 00026 h = a/b; 00027 c = h/(1.0e0+h); 00028 x = 1.0e0/(1.0e0+h); 00029 x2 = x*x; 00030 /* 00031 SET SN = (1 - X**N)/(1 - X) 00032 */ 00033 s3 = 1.0e0+(x+x2); 00034 s5 = 1.0e0+(x+x2*s3); 00035 s7 = 1.0e0+(x+x2*s5); 00036 s9 = 1.0e0+(x+x2*s7); 00037 s11 = 1.0e0+(x+x2*s9); 00038 /* 00039 SET W = DEL(B) - DEL(A + B) 00040 */ 00041 t = pow(1.0e0/b,2.0); 00042 w = ((((c5*s11*t+c4*s9)*t+c3*s7)*t+c2*s5)*t+c1*s3)*t+c0; 00043 w *= (c/b); 00044 /* 00045 COMPUTE DEL(A) + W 00046 */ 00047 t = pow(1.0e0/a,2.0); 00048 bcorr = (((((c5*t+c4)*t+c3)*t+c2)*t+c1)*t+c0)/a+w; 00049 return bcorr; 00050 } /* END */ |