Doxygen Source Code Documentation
cdf_03.c File Reference
#include "cdflib.h"
Go to the source code of this file.
Functions | |
double | apser (double *a, double *b, double *x, double *eps) |
Function Documentation
|
Definition at line 2 of file cdf_03.c. References a, apser(), c, and psi(). Referenced by apser(), and bratio().
00010 { 00011 static double g = .577215664901533e0; 00012 static double apser,aj,bx,c,j,s,t,tol; 00013 /* 00014 .. 00015 .. Executable Statements .. 00016 */ 00017 bx = *b**x; 00018 t = *x-bx; 00019 if(*b**eps > 2.e-2) goto S10; 00020 c = log(*x)+psi(b)+g+t; 00021 goto S20; 00022 S10: 00023 c = log(bx)+g+t; 00024 S20: 00025 tol = 5.0e0**eps*fabs(c); 00026 j = 1.0e0; 00027 s = 0.0e0; 00028 S30: 00029 j += 1.0e0; 00030 t *= (*x-bx/j); 00031 aj = t/j; 00032 s += aj; 00033 if(fabs(aj) > tol) goto S30; 00034 apser = -(*a*(c+s)); 00035 return apser; 00036 } /* END */ |