summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/float.h
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-10-25 07:02:52 +0000
committerimp <imp@FreeBSD.org>2002-10-25 07:02:52 +0000
commit59e43a0396de61b22eadda85d6d3d4586710c0b9 (patch)
tree6342f5a3d68acad7e4a722f7510376ad54aea604 /sys/amd64/include/float.h
parent61dd08c523db5d331200b2c7e21b0dbc884dd5d8 (diff)
downloadFreeBSD-src-59e43a0396de61b22eadda85d6d3d4586710c0b9.zip
FreeBSD-src-59e43a0396de61b22eadda85d6d3d4586710c0b9.tar.gz
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
Diffstat (limited to 'sys/amd64/include/float.h')
-rw-r--r--sys/amd64/include/float.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/amd64/include/float.h b/sys/amd64/include/float.h
index 5cdbc97..9a075ba 100644
--- a/sys/amd64/include/float.h
+++ b/sys/amd64/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_ */
OpenPOWER on IntegriCloud