From 7ce331c01ce6eb7b3f5c715a38a24359da9c6ee2 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 22 Nov 2001 14:04:29 +0000 Subject: 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 --- libm/ldouble/flrtstl.c | 104 ------------------------------------------------- 1 file changed, 104 deletions(-) delete mode 100644 libm/ldouble/flrtstl.c (limited to 'libm/ldouble/flrtstl.c') diff --git a/libm/ldouble/flrtstl.c b/libm/ldouble/flrtstl.c deleted file mode 100644 index 77a389324..000000000 --- a/libm/ldouble/flrtstl.c +++ /dev/null @@ -1,104 +0,0 @@ -long double floorl(), ldexpl(), frexpl(); - -#define N 16382 -void prnum(); -int printf(); -void exit(); - -void main() -{ -long double x, f, y, last, z, z0, y1; -int i, k, e, e0, errs; - -errs = 0; -f = 0.1L; -x = f; -last = x; -z0 = frexpl( x, &e0 ); -printf( "frexpl(%.2Le) = %.5Le, %d\n", x, z0, e0 ); -k = 0; -for( i=0; i -N+1) && -#endif - ((e != k+e0) || (z != z0)) ) - { - printf( "frexpl(%.1Le) = %.5Le, %d; s.b. %.5Le, %d\n", - y, z, e, z0, k+e0 ); - ++errs; - } - y1 = ldexpl( z, e ); - if( y1 != y ) - { - printf( "ldexpl(%.1Le, %d) = %.5Le, s.b. %.5Le\n", - z, e, y1, y ); - ++errs; - } - - x *= 0.5L; - if( x == 0.0L ) - break; - if( x == last ) - break; - last = x; - k -= 1; - } -printf( "i = %d\n", k ); -prnum( "last y =", &y ); - -printf( "\n%d errors\n", errs ); -exit(0); -} - - -void prnum(str, x) -char *str; -unsigned short *x; -{ -int i; - -printf( "%s ", str ); -printf( "%.5Le = ", *(long double *)x ); -for( i=0; i<5; i++ ) - printf( "%04x ", *x++ ); -} -- cgit v1.2.3