Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/softfloat unord for float128 long double
details: https://anonhg.NetBSD.org/src/rev/8540014661ec
branches: trunk
changeset: 326473:8540014661ec
user: matt <matt%NetBSD.org@localhost>
date: Thu Jan 30 19:06:54 2014 +0000
description:
unord for float128 long double
diffstat:
lib/libc/softfloat/unordtf2.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diffs (32 lines):
diff -r c180adc53828 -r 8540014661ec lib/libc/softfloat/unordtf2.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/softfloat/unordtf2.c Thu Jan 30 19:06:54 2014 +0000
@@ -0,0 +1,28 @@
+/* $NetBSD: unordtf2.c,v 1.1 2014/01/30 19:06:54 matt Exp $ */
+
+/*
+ * Written by Richard Earnshaw, 2003. This file is in the Public Domain.
+ */
+
+#include "softfloat-for-gcc.h"
+#include "milieu.h"
+#include "softfloat.h"
+
+#include <sys/cdefs.h>
+#if defined(LIBC_SCCS) && !defined(lint)
+__RCSID("$NetBSD: unordtf2.c,v 1.1 2014/01/30 19:06:54 matt Exp $");
+#endif /* LIBC_SCCS and not lint */
+
+flag __unordtf2(float128, float128);
+
+flag
+__unordtf2(float128 a, float128 b)
+{
+ /*
+ * The comparison is unordered if either input is a NaN.
+ * Test for this by comparing each operand with itself.
+ * We must perform both comparisons to correctly check for
+ * signalling NaNs.
+ */
+ return 1 ^ (float128_eq(a, a) & float128_eq(b, b));
+}
Home |
Main Index |
Thread Index |
Old Index