summaryrefslogtreecommitdiffstats
path: root/libm/upstream-freebsd/lib/msun/src
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-04-11 17:02:20 -0700
committerElliott Hughes <enh@google.com>2014-04-14 14:35:47 -0700
commit02c78a386739a8a2b3007efeb00a9ca04132100a (patch)
tree6679bef40da8b7fbe6b3c5a479eb5c2e4e035708 /libm/upstream-freebsd/lib/msun/src
parent055890686636faddbb6d5d407c67f5dcc53ac865 (diff)
downloadbionic-02c78a386739a8a2b3007efeb00a9ca04132100a.zip
bionic-02c78a386739a8a2b3007efeb00a9ca04132100a.tar.gz
bionic-02c78a386739a8a2b3007efeb00a9ca04132100a.tar.bz2
Reimplement isinf/isnan/fpclassify.
Also move isinf and isnan into libc like everyone else. Also move fpclassify to libc like the BSDs (but unlike glibc). We need this to be able to upgrade our float/double/long double parsing to gdtoa. Also add some missing aliases. We now have all of: isnan, __isnan, isnanf, __isnanf, isnanl, __isnanl, isinf, __isinf, isinff, __isinff, isinfl, __isinfl, __fpclassify, __fpclassifyd, __fpclassifyf, __fpclassifyl. Bug: 13469877 Change-Id: I407ffbac06c765a6c5fffda8106c37d7db04f27d
Diffstat (limited to 'libm/upstream-freebsd/lib/msun/src')
-rw-r--r--libm/upstream-freebsd/lib/msun/src/s_isnan.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/libm/upstream-freebsd/lib/msun/src/s_isnan.c b/libm/upstream-freebsd/lib/msun/src/s_isnan.c
deleted file mode 100644
index a54ded3..0000000
--- a/libm/upstream-freebsd/lib/msun/src/s_isnan.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <math.h>
-
-#include "fpmath.h"
-
-/* Provided by libc.so */
-#ifndef PIC
-#undef isnan
-int
-isnan(double d)
-{
- union IEEEd2bits u;
-
- u.d = d;
- return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0));
-}
-#endif /* !PIC */
-
-int
-__isnanf(float f)
-{
- union IEEEf2bits u;
-
- u.f = f;
- return (u.bits.exp == 255 && u.bits.man != 0);
-}
-
-int
-__isnanl(long double e)
-{
- union IEEEl2bits u;
-
- u.e = e;
- mask_nbit_l(u);
- return (u.bits.exp == 32767 && (u.bits.manl != 0 || u.bits.manh != 0));
-}
-
-__weak_reference(__isnanf, isnanf);