diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-11-22 14:04:29 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-11-22 14:04:29 +0000 |
commit | 7ce331c01ce6eb7b3f5c715a38a24359da9c6ee2 (patch) | |
tree | 3a7e8476e868ae15f4da1b7ce26b2db6f434468c /libm/float/gdtrf.c | |
parent | c117dd5fb183afb1a4790a6f6110d88704be6bf8 (diff) |
Totally rework the math library, this time based on the MacOs X
math library (which is itself based on the math lib from FreeBSD).
-Erik
Diffstat (limited to 'libm/float/gdtrf.c')
-rw-r--r-- | libm/float/gdtrf.c | 144 |
1 files changed, 0 insertions, 144 deletions
diff --git a/libm/float/gdtrf.c b/libm/float/gdtrf.c deleted file mode 100644 index e7e02026b..000000000 --- a/libm/float/gdtrf.c +++ /dev/null @@ -1,144 +0,0 @@ -/* gdtrf.c - * - * Gamma distribution function - * - * - * - * SYNOPSIS: - * - * float a, b, x, y, gdtrf(); - * - * y = gdtrf( a, b, x ); - * - * - * - * DESCRIPTION: - * - * Returns the integral from zero to x of the gamma probability - * density function: - * - * - * x - * b - - * a | | b-1 -at - * y = ----- | t e dt - * - | | - * | (b) - - * 0 - * - * The incomplete gamma integral is used, according to the - * relation - * - * y = igam( b, ax ). - * - * - * ACCURACY: - * - * Relative error: - * arithmetic domain # trials peak rms - * IEEE 0,100 5000 5.8e-5 3.0e-6 - * - * ERROR MESSAGES: - * - * message condition value returned - * gdtrf domain x < 0 0.0 - * - */ -/* gdtrcf.c - * - * Complemented gamma distribution function - * - * - * - * SYNOPSIS: - * - * float a, b, x, y, gdtrcf(); - * - * y = gdtrcf( a, b, x ); - * - * - * - * DESCRIPTION: - * - * Returns the integral from x to infinity of the gamma - * probability density function: - * - * - * inf. - * b - - * a | | b-1 -at - * y = ----- | t e dt - * - | | - * | (b) - - * x - * - * The incomplete gamma integral is used, according to the - * relation - * - * y = igamc( b, ax ). - * - * - * ACCURACY: - * - * Relative error: - * arithmetic domain # trials peak rms - * IEEE 0,100 5000 9.1e-5 1.5e-5 - * - * ERROR MESSAGES: - * - * message condition value returned - * gdtrcf domain x < 0 0.0 - * - */ - -/* gdtr() */ - - -/* -Cephes Math Library Release 2.2: July, 1992 -Copyright 1984, 1987, 1992 by Stephen L. Moshier -Direct inquiries to 30 Frost Street, Cambridge, MA 02140 -*/ - -#include <math.h> -#ifdef ANSIC -float igamf(float, float), igamcf(float, float); -#else -float igamf(), igamcf(); -#endif - - - -float gdtrf( float aa, float bb, float xx ) -{ -float a, b, x; - -a = aa; -b = bb; -x = xx; - - -if( x < 0.0 ) - { - mtherr( "gdtrf", DOMAIN ); - return( 0.0 ); - } -return( igamf( b, a * x ) ); -} - - - -float gdtrcf( float aa, float bb, float xx ) -{ -float a, b, x; - -a = aa; -b = bb; -x = xx; -if( x < 0.0 ) - { - mtherr( "gdtrcf", DOMAIN ); - return( 0.0 ); - } -return( igamcf( b, a * x ) ); -} |