1129203Scognet/* $NetBSD: unordsf2.c,v 1.1 2003/05/06 08:58:20 rearnsha Exp $ */ 2129203Scognet 3129203Scognet/* 4129203Scognet * Written by Richard Earnshaw, 2003. This file is in the Public Domain. 5129203Scognet */ 6129203Scognet 7129203Scognet#include "softfloat-for-gcc.h" 8129203Scognet#include "milieu.h" 9129203Scognet#include "softfloat.h" 10129203Scognet 11129203Scognet#include <sys/cdefs.h> 12129203Scognet__FBSDID("$FreeBSD: releng/11.0/lib/libc/softfloat/unordsf2.c 129203 2004-05-14 12:13:06Z cognet $"); 13129203Scognet 14129203Scognetflag __unordsf2(float32, float32); 15129203Scognet 16129203Scognetflag 17129203Scognet__unordsf2(float32 a, float32 b) 18129203Scognet{ 19129203Scognet /* 20129203Scognet * The comparison is unordered if either input is a NaN. 21129203Scognet * Test for this by comparing each operand with itself. 22129203Scognet * We must perform both comparisons to correctly check for 23129203Scognet * signalling NaNs. 24129203Scognet */ 25129203Scognet return 1 ^ (float32_eq(a, a) & float32_eq(b, b)); 26129203Scognet} 27