9 * float a, b, y, betaf();
19 * beta( a, b ) = -----------.
23 * For large arguments the logarithm of the function is
24 * evaluated using lgam(), then exponentiated.
31 * arithmetic domain # trials peak rms
32 * IEEE 0,30 10000 4.0e-5 6.0e-6
33 * IEEE -20,0 10000 4.9e-3 5.4e-5
37 * message condition value returned
38 * betaf overflow log(beta) > MAXLOG 0.0
39 * a or b <0 integer 0.0
47 Cephes Math Library Release 2.2: July, 1992
48 Copyright 1984, 1987 by Stephen L. Moshier
49 Direct inquiries to 30 Frost Street, Cambridge, MA 02140
54 #define fabsf(x) ( (x) < 0 ? -(x) : (x) )
56 #define MAXGAM 34.84425627277176174
59 extern float MAXLOGF, MAXNUMF;
63 float gammaf(float), lgamf(float), expf(float), floorf(float);
65 float gammaf(), lgamf(), expf(), floorf();
69 float betaf( float aa, float bb )
94 if( fabsf(y) > MAXGAM )
97 sign *= sgngamf; /* keep track of the sign */
105 mtherr( "betaf", OVERFLOW );
106 return( sign * MAXNUMF );
108 return( sign * expf(y) );