summaryrefslogtreecommitdiff
path: root/test/math/eexp.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-05-09 04:43:18 +0000
committerEric Andersen <andersen@codepoet.org>2002-05-09 04:43:18 +0000
commite4071b93db0e2fd4aa3b678a6188da2de1c8eb2f (patch)
treeb74cdef21bbdd7d4d09676befce548127217893d /test/math/eexp.c
parent5a25d0f3bc0c9ac81c43b05646575744e93d126c (diff)
Rework the math library tests per the glibc math test code, with
many unsupported tests disabled for the moment. -Erik
Diffstat (limited to 'test/math/eexp.c')
-rw-r--r--test/math/eexp.c77
1 files changed, 0 insertions, 77 deletions
diff --git a/test/math/eexp.c b/test/math/eexp.c
deleted file mode 100644
index 14ea9899d..000000000
--- a/test/math/eexp.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* xexp.c */
-/* exponential function check routine */
-/* by Stephen L. Moshier. */
-
-
-#include "ehead.h"
-
-/*
-extern int powinited;
-extern short maxposint[], maxnegint[];
-*/
-
-void eexp( x, y )
-unsigned short *x, *y;
-{
-unsigned short num[NE], den[NE], x2[NE];
-long i;
-unsigned short sign, expchk;
-
-/* range reduction theory: x = i + f, 0<=f<1;
- * e**x = e**i * e**f
- * e**i = 2**(i/log 2).
- * Let i/log2 = i1 + f1, 0<=f1<1.
- * Then e**i = 2**i1 * 2**f1, so
- * e**x = 2**i1 * e**(log 2 * f1) * e**f.
- */
-/*
-if( powinited == 0 )
- initpow();
-*/
-if( ecmp(x, ezero) == 0 )
- {
- emov( eone, y );
- return;
- }
-emov(x, x2);
-expchk = x2[NE-1];
-sign = expchk & 0x8000;
-x2[NE-1] &= 0x7fff;
-
-/* Test for excessively large argument */
-expchk &= 0x7fff;
-if( expchk > (EXONE + 15) )
- {
- eclear( y );
- if( sign == 0 )
- einfin( y );
- return;
- }
-
-eifrac( x2, &i, num ); /* x = i + f */
-
-if( i != 0 )
- {
- ltoe( &i, den ); /* floating point i */
- ediv( elog2, den, den ); /* i/log 2 */
- eifrac( den, &i, den ); /* i/log 2 = i1 + f1 */
- emul( elog2, den, den ); /* log 2 * f1 */
- eadd( den, num, x2 ); /* log 2 * f1 + f */
- }
-
-/*x2[NE-1] -= 1;*/
-eldexp( x2, -1L, x2 ); /* divide by 2 */
-etanh( x2, x2 ); /* tanh( x/2 ) */
-eadd( x2, eone, num ); /* 1 + tanh */
-eneg( x2 );
-eadd( x2, eone, den ); /* 1 - tanh */
-ediv( den, num, y ); /* (1 + tanh)/(1 - tanh) */
-
-/*y[NE-1] += i;*/
-if( sign )
- {
- ediv( y, eone, y );
- i = -i;
- }
-eldexp( y, i, y ); /* multiply by 2**i */
-}