On Fri, Aug 05, 2005 at 11:33:35AM -0600, M. Warner Losh wrote: > In message: <[EMAIL PROTECTED]> > Steve Kargl <[EMAIL PROTECTED]> writes: > : Can someone confirm or refute that the working number > : of bits in the significand of long double type is 53 > : on i386? > > The number of bits is 53. However, you can get more bits by adding a > fpsetprec(FP_PE) at the start of the programs. Otherwise, you get > FP_PD by default. Once you do that, things seem to basically work, > but I've not run paranoia.c to make sure. >
I'm writing some of the missing C99 long double math functions (to be contributes to FreeBSD). The code assumes 64 bits in the approximations that I'm using. When I try to run test programs to check the accuracy of my implementations against GMP/MPFR ouput, I can't trust the values of LDBL_* reported from float.h. My test programs now include #ifdef AMD64 #define BITSL 64 #define DIGSL 18 #else #define BITSL 53 #define DIGSL 15 #endif instead of #include <float.h> and the use of LDBL_MANT_DIG and LDBL_DIG. -- Steve _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

