Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Add two convenience macros for testing a zero fraction.
details: https://anonhg.NetBSD.org/src/rev/e9091f1cc54e
branches: trunk
changeset: 786733:e9091f1cc54e
user: matt <matt%NetBSD.org@localhost>
date: Wed May 08 05:27:01 2013 +0000
description:
Add two convenience macros for testing a zero fraction.
diffstat:
sys/sys/ieee754.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r 9bfe3a48b09c -r e9091f1cc54e sys/sys/ieee754.h
--- a/sys/sys/ieee754.h Wed May 08 05:13:56 2013 +0000
+++ b/sys/sys/ieee754.h Wed May 08 05:27:01 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ieee754.h,v 1.8 2012/08/08 16:56:53 matt Exp $ */
+/* $NetBSD: ieee754.h,v 1.9 2013/05/08 05:27:01 matt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -148,6 +148,7 @@
#define sngu_sign sngu_sng.sng_sign
#define sngu_exp sngu_sng.sng_exp
#define sngu_frac sngu_sng.sng_frac
+#define SNGU_ZEROFRAC_P(u) ((u).sngu_frac != 0)
union ieee_double_u {
double dblu_d;
@@ -158,4 +159,6 @@
#define dblu_exp dblu_dbl.dbl_exp
#define dblu_frach dblu_dbl.dbl_frach
#define dblu_fracl dblu_dbl.dbl_fracl
+#define DBLU_ZEROFRAC_P(u) (((u).dblu_frach|(u).dblu_fracl) != 0)
+
#endif /* _SYS_IEEE754_H_ */
Home |
Main Index |
Thread Index |
Old Index