diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-03 17:39:24 -0700 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-03 17:39:24 -0700 |
commit | a6c1ed4716cf02626ea035beb6dd4a921642ba80 (patch) | |
tree | ef582c1b52819e27bdd16097ec03b69799d04ede /newlib/libm/math/s_isnan.c | |
parent | f6c9a624fa8a6878a7fb2b02f55e4990a20feb59 (diff) |
Use libc from agbcc instead of standalone newlib\nYou must have AGBCC commit 80d029caec189587f8b9294b6c8a5a489b8f5f88 in order to compile pmd_red.gbalibc
Diffstat (limited to 'newlib/libm/math/s_isnan.c')
-rw-r--r-- | newlib/libm/math/s_isnan.c | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/newlib/libm/math/s_isnan.c b/newlib/libm/math/s_isnan.c deleted file mode 100644 index 5d83fc0..0000000 --- a/newlib/libm/math/s_isnan.c +++ /dev/null @@ -1,122 +0,0 @@ - -/* @(#)s_isnan.c 5.1 93/09/24 */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* -FUNCTION - <<isnan>>,<<isnanf>>,<<isinf>>,<<isinff>>,<<finite>>,<<finitef>>---test for exceptional numbers - -INDEX - isnan -INDEX - isinf -INDEX - finite - -INDEX - isnanf -INDEX - isinff -INDEX - finitef - -ANSI_SYNOPSIS - #include <ieeefp.h> - int isnan(double <[arg]>); - int isinf(double <[arg]>); - int finite(double <[arg]>); - int isnanf(float <[arg]>); - int isinff(float <[arg]>); - int finitef(float <[arg]>); - -TRAD_SYNOPSIS - #include <ieeefp.h> - int isnan(<[arg]>) - double <[arg]>; - int isinf(<[arg]>) - double <[arg]>; - int finite(<[arg]>); - double <[arg]>; - int isnanf(<[arg]>); - float <[arg]>; - int isinff(<[arg]>); - float <[arg]>; - int finitef(<[arg]>); - float <[arg]>; - - -DESCRIPTION - These functions provide information on the floating point - argument supplied. - - There are five major number formats - - o+ - o zero - a number which contains all zero bits. - o subnormal - Is used to represent number with a zero exponent, but a non zero fraction. - o normal - A number with an exponent, and a fraction - o infinity - A number with an all 1's exponent and a zero fraction. - o NAN - A number with an all 1's exponent and a non zero fraction. - - o- - - <<isnan>> returns 1 if the argument is a nan. <<isinf>> - returns 1 if the argument is infinity. <<finite>> returns 1 if the - argument is zero, subnormal or normal. - - The <<isnanf>>, <<isinff>> and <<finitef>> perform the same - operations as their <<isnan>>, <<isinf>> and <<finite>> - counterparts, but on single precision floating point numbers. - -QUICKREF - isnan - pure -QUICKREF - isinf - pure -QUICKREF - finite - pure -QUICKREF - isnan - pure -QUICKREF - isinf - pure -QUICKREF - finite - pure -*/ - -/* - * isnan(x) returns 1 is x is nan, else 0; - * no branching! - */ - -#include "fdlibm.h" - -#ifndef _DOUBLE_IS_32BITS - -#ifdef __STDC__ - int isnan(double x) -#else - int isnan(x) - double x; -#endif -{ - __int32_t hx,lx; - EXTRACT_WORDS(hx,lx,x); - hx &= 0x7fffffff; - hx |= (__uint32_t)(lx|(-lx))>>31; - hx = 0x7ff00000 - hx; - return (int)(((__uint32_t)(hx))>>31); -} - -#endif /* _DOUBLE_IS_32BITS */ |