mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-05 19:21:05 +00:00
f83af095b6
* include/math.h: Declare __isinf_internal, __isinfl_internal, __isnan_internal, and __isnanl_internal. * stdio-common/printf_fp.c: Use INTUSE for calls to __isinf, __isinfl, __isnan, and __isnanl. * stdio-common/printf_size.c: Likewise. * sysdeps/generic/printf_fphex.c: Likewise. * sysdeps/i386/fpu/s_isinfl.c: Also define _internal alias. * sysdeps/i386/fpu/s_isnanl.c: Likewise. * sysdeps/ia64/fpu/s_isinf.S: Likewise. * sysdeps/ia64/fpu/s_isnan.S: Likewise. * sysdeps/ieee754/dbl-64/s_isinf.c: Likewise. * sysdeps/ieee754/dbl-64/s_isnan.c: Likewise. * sysdeps/ieee754/flt-32/s_isinff.c: Likewise. * sysdeps/ieee754/flt-32/s_isnanf.c: Likewise. * sysdeps/ieee754/ldbl-128/s_isinfl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_isnanl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_isinfl.c: Likewise. * sysdeps/m68k/s_isinfl.c: Likewise. * sysdeps/m68k/fpu/s_isinf.c: Likewise. * sysdeps/powerpc/fpu/s_isnan.c: Likewise.
31 lines
604 B
C
31 lines
604 B
C
/*
|
|
* Written by J.T. Conklin <jtc@netbsd.org>.
|
|
* Change for long double by Ulrich Drepper <drepper@cygnus.com>.
|
|
* Public domain.
|
|
*/
|
|
|
|
#if defined(LIBM_SCCS) && !defined(lint)
|
|
static char rcsid[] = "$NetBSD: $";
|
|
#endif
|
|
|
|
/*
|
|
* isinfl(x) returns 1 if x is inf, -1 if x is -inf, else 0;
|
|
* no branching!
|
|
*/
|
|
|
|
#include "math.h"
|
|
#include "math_private.h"
|
|
|
|
int
|
|
__isinfl (long double x)
|
|
{
|
|
int32_t se,hx,lx;
|
|
GET_LDOUBLE_WORDS(se,hx,lx,x);
|
|
lx |= (hx & 0x7fffffff) | ((se & 0x7fff) ^ 0x7fff);
|
|
lx |= -lx;
|
|
se &= 0x8000;
|
|
return ~(lx >> 31) & (1 - (se >> 14));
|
|
}
|
|
INTDEF(__isinfl)
|
|
weak_alias (__isinfl, isinfl)
|