From 59e43a0396de61b22eadda85d6d3d4586710c0b9 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 25 Oct 2002 07:02:52 +0000 Subject: Use the correct values for LDBL_*. Libc doesn't completely support long doubles at the moment (printf truncates them to doubles). However, long doubles to appear to work to the ranges listed in this commit on both -stable (4.5) and -current. There may be some slight rounding issues with long doubles, but that's an orthogonal issue to these constants. I've had this in my local tree for 3 months, and in my company's local tree for 15 months with no ill effects. Obtained from: NetBSD Not likely to like it: bde --- sys/i386/include/float.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'sys/i386/include/float.h') diff --git a/sys/i386/include/float.h b/sys/i386/include/float.h index 5cdbc97..9a075ba 100644 --- a/sys/i386/include/float.h +++ b/sys/i386/include/float.h @@ -60,13 +60,14 @@ #define DBL_MAX 1.7976931348623157E+308 #define DBL_MAX_10_EXP 308 -#define LDBL_MANT_DIG DBL_MANT_DIG -#define LDBL_EPSILON DBL_EPSILON -#define LDBL_DIG DBL_DIG -#define LDBL_MIN_EXP DBL_MIN_EXP -#define LDBL_MIN DBL_MIN -#define LDBL_MIN_10_EXP DBL_MIN_10_EXP -#define LDBL_MAX_EXP DBL_MAX_EXP -#define LDBL_MAX DBL_MAX -#define LDBL_MAX_10_EXP DBL_MAX_10_EXP + +#define LDBL_MANT_DIG 64 +#define LDBL_EPSILON 1.0842021724855044340E-19L +#define LDBL_DIG 18 +#define LDBL_MIN_EXP (-16381) +#define LDBL_MIN 3.3621031431120935063E-4932L +#define LDBL_MIN_10_EXP (-4931) +#define LDBL_MAX_EXP 16384 +#define LDBL_MAX 1.1897314953572317650E+4932L +#define LDBL_MAX_10_EXP 4932 #endif /* _MACHINE_FLOAT_H_ */ -- cgit v1.1