Doxygen Source Code Documentation
cdf_69.c File Reference
#include "cdflib.h"
Go to the source code of this file.
Functions | |
double | rlog (double *x) |
Function Documentation
|
Definition at line 2 of file cdf_69.c. Referenced by gratio(), rcomp(), and rlog().
00008 { 00009 static double a = .566749439387324e-01; 00010 static double b = .456512608815524e-01; 00011 static double p0 = .333333333333333e+00; 00012 static double p1 = -.224696413112536e+00; 00013 static double p2 = .620886815375787e-02; 00014 static double q1 = -.127408923933623e+01; 00015 static double q2 = .354508718369557e+00; 00016 static double rlog,r,t,u,w,w1; 00017 /* 00018 .. 00019 .. Executable Statements .. 00020 */ 00021 if(*x < 0.61e0 || *x > 1.57e0) goto S40; 00022 if(*x < 0.82e0) goto S10; 00023 if(*x > 1.18e0) goto S20; 00024 /* 00025 ARGUMENT REDUCTION 00026 */ 00027 u = *x-0.5e0-0.5e0; 00028 w1 = 0.0e0; 00029 goto S30; 00030 S10: 00031 u = *x-0.7e0; 00032 u /= 0.7e0; 00033 w1 = a-u*0.3e0; 00034 goto S30; 00035 S20: 00036 u = 0.75e0**x-1.e0; 00037 w1 = b+u/3.0e0; 00038 S30: 00039 /* 00040 SERIES EXPANSION 00041 */ 00042 r = u/(u+2.0e0); 00043 t = r*r; 00044 w = ((p2*t+p1)*t+p0)/((q2*t+q1)*t+1.0e0); 00045 rlog = 2.0e0*t*(1.0e0/(1.0e0-r)-r*w)+w1; 00046 return rlog; 00047 S40: 00048 r = *x-0.5e0-0.5e0; 00049 rlog = r-log(*x); 00050 return rlog; 00051 } /* END */ |