Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
cdf_38.c
Go to the documentation of this file.00001 #include "cdflib.h"
00002 double dexpm1(double *x)
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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
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;
00051 }