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_35.c

Go to the documentation of this file.
00001 #include "cdflib.h"
00002 void cumt(double *t,double *df,double *cum,double *ccum)
00003 /*
00004 **********************************************************************
00005  
00006      void cumt(double *t,double *df,double *cum,double *ccum)
00007                     CUMulative T-distribution
00008  
00009  
00010                               Function
00011  
00012  
00013      Computes the integral from -infinity to T of the t-density.
00014  
00015  
00016                               Arguments
00017  
00018  
00019      T --> Upper limit of integration of the t-density.
00020                                                   T is DOUBLE PRECISION
00021  
00022      DF --> Degrees of freedom of the t-distribution.
00023                                                   DF is DOUBLE PRECISIO
00024  
00025      CUM <-- Cumulative t-distribution.
00026                                                   CCUM is DOUBLE PRECIS
00027  
00028      CCUM <-- Compliment of Cumulative t-distribution.
00029                                                   CCUM is DOUBLE PRECIS
00030  
00031  
00032                               Method
00033  
00034  
00035      Formula 26.5.27   of     Abramowitz  and   Stegun,    Handbook  of
00036      Mathematical Functions  is   used   to  reduce the  t-distribution
00037      to an incomplete beta.
00038  
00039 **********************************************************************
00040 */
00041 {
00042 static double K2 = 0.5e0;
00043 static double xx,a,oma,tt,yy,dfptt,T1;
00044 /*
00045      ..
00046      .. Executable Statements ..
00047 */
00048     tt = *t**t;
00049     dfptt = *df+tt;
00050     xx = *df/dfptt;
00051     yy = tt/dfptt;
00052     T1 = 0.5e0**df;
00053     cumbet(&xx,&yy,&T1,&K2,&a,&oma);
00054     if(!(*t <= 0.0e0)) goto S10;
00055     *cum = 0.5e0*a;
00056     *ccum = oma+*cum;
00057     goto S20;
00058 S10:
00059     *ccum = 0.5e0*a;
00060     *cum = oma+*ccum;
00061 S20:
00062     return;
00063 } /* END */
 

Powered by Plone

This site conforms to the following standards: