Doxygen Source Code Documentation
cdf_57.c File Reference
#include "cdflib.h"Go to the source code of this file.
| Functions | |
| double | fpser (double *a, double *b, double *x, double *eps) | 
Function Documentation
| 
 | ||||||||||||||||||||
| 
 Definition at line 2 of file cdf_57.c. References a, c, exparg(), and fpser(). Referenced by bratio(), and fpser(). 
 00015 {
00016 static int K1 = 1;
00017 static double fpser,an,c,s,t,tol;
00018 /*
00019      ..
00020      .. Executable Statements ..
00021 */
00022     fpser = 1.0e0;
00023     if(*a <= 1.e-3**eps) goto S10;
00024     fpser = 0.0e0;
00025     t = *a*log(*x);
00026     if(t < exparg(&K1)) return fpser;
00027     fpser = exp(t);
00028 S10:
00029 /*
00030                 NOTE THAT 1/B(A,B) = B
00031 */
00032     fpser = *b/ *a*fpser;
00033     tol = *eps/ *a;
00034     an = *a+1.0e0;
00035     t = *x;
00036     s = t/an;
00037 S20:
00038     an += 1.0e0;
00039     t = *x*t;
00040     c = t/an;
00041     s += c;
00042     if(fabs(c) > tol) goto S20;
00043     fpser *= (1.0e0+*a*s);
00044     return fpser;
00045 } /* END */
 | 
 
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
 
 
 
 
       
	   
	   
	   
	  