Blame sysdeps/ieee754/ldbl-128/s_finitel.c
|
Packit |
6c4009 |
/* s_finitel.c -- long double version of s_finite.c.
|
|
Packit |
6c4009 |
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
|
|
Packit |
6c4009 |
*/
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/*
|
|
Packit |
6c4009 |
* ====================================================
|
|
Packit |
6c4009 |
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
|
Packit |
6c4009 |
*
|
|
Packit |
6c4009 |
* Developed at SunPro, a Sun Microsystems, Inc. business.
|
|
Packit |
6c4009 |
* Permission to use, copy, modify, and distribute this
|
|
Packit |
6c4009 |
* software is freely granted, provided that this notice
|
|
Packit |
6c4009 |
* is preserved.
|
|
Packit |
6c4009 |
* ====================================================
|
|
Packit |
6c4009 |
*/
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined(LIBM_SCCS) && !defined(lint)
|
|
Packit |
6c4009 |
static char rcsid[] = "$NetBSD: $";
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/*
|
|
Packit |
6c4009 |
* finitel(x) returns 1 is x is finite, else 0;
|
|
Packit |
6c4009 |
* no branching!
|
|
Packit |
6c4009 |
*/
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include <math.h>
|
|
Packit |
6c4009 |
#include <math_private.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
int __finitel(_Float128 x)
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
int64_t hx;
|
|
Packit |
6c4009 |
GET_LDOUBLE_MSW64(hx,x);
|
|
Packit |
6c4009 |
return (int)((uint64_t)((hx&0x7fff000000000000LL)
|
|
Packit |
6c4009 |
-0x7fff000000000000LL)>>63);
|
|
Packit |
6c4009 |
}
|
|
Packit |
6c4009 |
mathx_hidden_def (__finitel)
|
|
Packit |
6c4009 |
weak_alias (__finitel, finitel)
|