]>
git.proxmox.com Git - mirror_edk2.git/blob - StdLib/LibC/Softfloat/unordsf2.c
1 /* $NetBSD: unordsf2.c,v 1.1 2003/05/06 08:58:20 rearnsha Exp $ */
4 * Copyright (c) 2013 - 2014, ARM Limited. All rights reserved.
6 * This program and the accompanying materials
7 * are licensed and made available under the terms and conditions of the BSD License
8 * which accompanies this distribution. The full text of the license may be found at
9 * http://opensource.org/licenses/bsd-license.php
11 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 * Written by Richard Earnshaw, 2003. This file is in the Public Domain.
19 #include "softfloat-for-gcc.h"
21 #include "softfloat.h"
23 #include <sys/cdefs.h>
24 #if defined(LIBC_SCCS) && !defined(lint)
25 __RCSID("$NetBSD: unordsf2.c,v 1.1 2003/05/06 08:58:20 rearnsha Exp $");
26 #endif /* LIBC_SCCS and not lint */
28 flag
__unordsf2(float32
, float32
);
31 __unordsf2(float32 a
, float32 b
)
34 * The comparison is unordered if either input is a NaN.
35 * Test for this by comparing each operand with itself.
36 * We must perform both comparisons to correctly check for
39 return 1 ^ (float32_eq(a
, a
) & float32_eq(b
, b
));