Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

cdf_49.c File Reference

#include "cdflib.h"

Go to the source code of this file.


Functions

double dt1 (double *p, double *q, double *df)

Function Documentation

double dt1 double *    p,
double *    q,
double *    df
 

Definition at line 2 of file cdf_49.c.

References devlpl(), dinvnr(), dt1(), i, p, and q.

Referenced by cdft(), and dt1().

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      .. Executable Statements ..
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 } /* END */
 

Powered by Plone

This site conforms to the following standards: