Doxygen Source Code Documentation
cdf_38.c File Reference
#include "cdflib.h"Go to the source code of this file.
Functions | |
| double | dexpm1 (double *x) |
Function Documentation
|
|
Definition at line 2 of file cdf_38.c. References dexpm1(). Referenced by dexpm1().
00020 :
00021
00022 DiDinato, A. R. and Morris, A. H. Algorithm 708: Significant
00023 Digit Computation of the Incomplete Beta Function Ratios. ACM
00024 Trans. Math. Softw. 18 (1993), 360-373.
00025
00026 **********************************************************************
00027 */
00028 {
00029 static double p1 = .914041914819518e-09;
00030 static double p2 = .238082361044469e-01;
00031 static double q1 = -.499999999085958e+00;
00032 static double q2 = .107141568980644e+00;
00033 static double q3 = -.119041179760821e-01;
00034 static double q4 = .595130811860248e-03;
00035 static double dexpm1,w;
00036 /*
00037 ..
00038 .. Executable Statements ..
00039 */
00040 if(fabs(*x) > 0.15e0) goto S10;
00041 dexpm1 = *x*(((p2**x+p1)**x+1.0e0)/((((q4**x+q3)**x+q2)**x+q1)**x+1.0e0));
00042 return dexpm1;
00043 S10:
00044 w = exp(*x);
00045 if(*x > 0.0e0) goto S20;
00046 dexpm1 = w-0.5e0-0.5e0;
00047 return dexpm1;
00048 S20:
00049 dexpm1 = w*(0.5e0+(0.5e0-1.0e0/w));
00050 return dexpm1;
} /* END */
|