diff options
Diffstat (limited to 'lib/unordsf2.c')
-rw-r--r-- | lib/unordsf2.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/unordsf2.c b/lib/unordsf2.c new file mode 100644 index 000000000..0ef7c11d1 --- /dev/null +++ b/lib/unordsf2.c @@ -0,0 +1,17 @@ +//===-- lib/unordsf2.c - Single-precision comparisons -------------*- C -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#define SINGLE_PRECISION +#include "fp_lib.h" + +int __unordsf2(fp_t a, fp_t b) { + const rep_t aAbs = toRep(a) & absMask; + const rep_t bAbs = toRep(b) & absMask; + return aAbs > infRep || bAbs > infRep; +} |