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

Go to the documentation of this file.
00001 #include "cdflib.h"
00002 double devlpl(double a[],int *n,double *x)
00003 /*
00004 **********************************************************************
00005  
00006      double devlpl(double a[],int *n,double *x)
00007               Double precision EVALuate a PoLynomial at X
00008  
00009  
00010                               Function
00011  
00012  
00013      returns
00014           A(1) + A(2)*X + ... + A(N)*X**(N-1)
00015  
00016  
00017                               Arguments
00018  
00019  
00020      A --> Array of coefficients of the polynomial.
00021                                         A is DOUBLE PRECISION(N)
00022  
00023      N --> Length of A, also degree of polynomial - 1.
00024                                         N is INTEGER
00025  
00026      X --> Point at which the polynomial is to be evaluated.
00027                                         X is DOUBLE PRECISION
00028  
00029 **********************************************************************
00030 */
00031 {
00032 static double devlpl,term;
00033 static int i;
00034 /*
00035      ..
00036      .. Executable Statements ..
00037 */
00038     term = a[*n-1];
00039     for(i= *n-1-1; i>=0; i--) term = a[i]+term**x;
00040     devlpl = term;
00041     return devlpl;
00042 } /* END */
 

Powered by Plone

This site conforms to the following standards: