summaryrefslogtreecommitdiffstats
path: root/sys/i386/include
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2004-07-19 08:17:25 +0000
committerdas <das@FreeBSD.org>2004-07-19 08:17:25 +0000
commit86c293bf54231dee13f45592a39a3f0d0cf19931 (patch)
treec9066d911af64f4a2b6d8c54df428e3e3cc5eb40 /sys/i386/include
parent7aef999db62cfb1370a29fad2bbee5c489b660ec (diff)
downloadFreeBSD-src-86c293bf54231dee13f45592a39a3f0d0cf19931.zip
FreeBSD-src-86c293bf54231dee13f45592a39a3f0d0cf19931.tar.gz
Make FLT_ROUNDS correctly reflect the dynamic rounding mode.
Diffstat (limited to 'sys/i386/include')
-rw-r--r--sys/i386/include/float.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/i386/include/float.h b/sys/i386/include/float.h
index 1608472..ea2df3c 100644
--- a/sys/i386/include/float.h
+++ b/sys/i386/include/float.h
@@ -35,8 +35,12 @@
#include <sys/cdefs.h>
+__BEGIN_DECLS
+extern int __flt_rounds(void);
+__END_DECLS
+
#define FLT_RADIX 2 /* b */
-#define FLT_ROUNDS 1 /* FP addition rounds to nearest */
+#define FLT_ROUNDS __flt_rounds()
#if __ISO_C_VISIBLE >= 1999
#define FLT_EVAL_METHOD (-1) /* i387 semantics are...interesting */
#define DECIMAL_DIG 21 /* max precision in decimal digits */
OpenPOWER on IntegriCloud