1 1.2.8.2 tls /* $NetBSD: unordtf2.c,v 1.2.8.2 2014/08/20 00:02:15 tls Exp $ */ 2 1.2.8.2 tls 3 1.2.8.2 tls /* 4 1.2.8.2 tls * Written by Richard Earnshaw, 2003. This file is in the Public Domain. 5 1.2.8.2 tls */ 6 1.2.8.2 tls 7 1.2.8.2 tls #include "softfloat-for-gcc.h" 8 1.2.8.2 tls #include "milieu.h" 9 1.2.8.2 tls #include "softfloat.h" 10 1.2.8.2 tls 11 1.2.8.2 tls #include <sys/cdefs.h> 12 1.2.8.2 tls #if defined(LIBC_SCCS) && !defined(lint) 13 1.2.8.2 tls __RCSID("$NetBSD: unordtf2.c,v 1.2.8.2 2014/08/20 00:02:15 tls Exp $"); 14 1.2.8.2 tls #endif /* LIBC_SCCS and not lint */ 15 1.2.8.2 tls 16 1.2.8.2 tls #ifdef FLOAT128 17 1.2.8.2 tls 18 1.2.8.2 tls flag __unordtf2(float128, float128); 19 1.2.8.2 tls 20 1.2.8.2 tls flag 21 1.2.8.2 tls __unordtf2(float128 a, float128 b) 22 1.2.8.2 tls { 23 1.2.8.2 tls /* 24 1.2.8.2 tls * The comparison is unordered if either input is a NaN. 25 1.2.8.2 tls * Test for this by comparing each operand with itself. 26 1.2.8.2 tls * We must perform both comparisons to correctly check for 27 1.2.8.2 tls * signalling NaNs. 28 1.2.8.2 tls */ 29 1.2.8.2 tls return 1 ^ (float128_eq(a, a) & float128_eq(b, b)); 30 1.2.8.2 tls } 31 1.2.8.2 tls 32 1.2.8.2 tls #endif /* FLOAT128 */ 33