Doxygen Source Code Documentation
cdf_29.c File Reference
#include "cdflib.h"Go to the source code of this file.
| Defines | |
| #define | half 0.5e0 | 
| #define | done 1.0e0 | 
| Functions | |
| void | cumf (double *f, double *dfn, double *dfd, double *cum, double *ccum) | 
Define Documentation
| 
 | 
| 
 | 
| 
 | 
| 
 | 
Function Documentation
| 
 | ||||||||||||||||||||||||
| 
 Definition at line 2 of file cdf_29.c. References bratio(). Referenced by cdff(), and cumfnc(). 
 00050 {
00051 #define half 0.5e0
00052 #define done 1.0e0
00053 static double dsum,prod,xx,yy;
00054 static int ierr;
00055 static double T1,T2;
00056 /*
00057      ..
00058      .. Executable Statements ..
00059 */
00060     if(!(*f <= 0.0e0)) goto S10;
00061     *cum = 0.0e0;
00062     *ccum = 1.0e0;
00063     return;
00064 S10:
00065     prod = *dfn**f;
00066 /*
00067      XX is such that the incomplete beta with parameters
00068      DFD/2 and DFN/2 evaluated at XX is 1 - CUM or CCUM
00069      YY is 1 - XX
00070      Calculate the smaller of XX and YY accurately
00071 */
00072     dsum = *dfd+prod;
00073     xx = *dfd/dsum;
00074     if(xx > half) {
00075         yy = prod/dsum;
00076         xx = done-yy;
00077     }
00078     else  yy = done-xx;
00079     T1 = *dfd*half;
00080     T2 = *dfn*half;
00081     bratio(&T1,&T2,&xx,&yy,ccum,cum,&ierr);
00082     return;
00083 #undef half
00084 #undef done
00085 } /* END */
 | 
 
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
 
 
 
 
       
	   
	   
	   
	  