Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
cdf_49.c
Go to the documentation of this file.00001 #include "cdflib.h"
00002 double dt1(double *p,double *q,double *df)
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
00030
00031
00032
00033
00034 {
00035 static double coef[4][5] = {
00036 1.0e0,1.0e0,0.0e0,0.0e0,0.0e0,3.0e0,16.0e0,5.0e0,0.0e0,0.0e0,-15.0e0,17.0e0,
00037 19.0e0,3.0e0,0.0e0,-945.0e0,-1920.0e0,1482.0e0,776.0e0,79.0e0
00038 };
00039 static double denom[4] = {
00040 4.0e0,96.0e0,384.0e0,92160.0e0
00041 };
00042 static int ideg[4] = {
00043 2,3,4,5
00044 };
00045 static double dt1,denpow,sum,term,x,xp,xx;
00046 static int i;
00047
00048
00049
00050
00051 x = fabs(dinvnr(p,q));
00052 xx = x*x;
00053 sum = x;
00054 denpow = 1.0e0;
00055 for(i=0; i<4; i++) {
00056 term = devlpl(&coef[i][0],&ideg[i],&xx)*x;
00057 denpow *= *df;
00058 sum += (term/(denpow*denom[i]));
00059 }
00060 if(!(*p >= 0.5e0)) goto S20;
00061 xp = sum;
00062 goto S30;
00063 S20:
00064 xp = -sum;
00065 S30:
00066 dt1 = xp;
00067 return dt1;
00068 }