1*181254a7Smrg /* s_finitel.c -- long double version of s_finite.c.
2*181254a7Smrg * Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
3*181254a7Smrg */
4*181254a7Smrg
5*181254a7Smrg /*
6*181254a7Smrg * ====================================================
7*181254a7Smrg * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
8*181254a7Smrg *
9*181254a7Smrg * Developed at SunPro, a Sun Microsystems, Inc. business.
10*181254a7Smrg * Permission to use, copy, modify, and distribute this
11*181254a7Smrg * software is freely granted, provided that this notice
12*181254a7Smrg * is preserved.
13*181254a7Smrg * ====================================================
14*181254a7Smrg */
15*181254a7Smrg
16*181254a7Smrg #if defined(LIBM_SCCS) && !defined(lint)
17*181254a7Smrg static char rcsid[] = "NetBSD: ";
18*181254a7Smrg #endif
19*181254a7Smrg
20*181254a7Smrg /*
21*181254a7Smrg * finiteq(x) returns 1 is x is finite, else 0;
22*181254a7Smrg * no branching!
23*181254a7Smrg */
24*181254a7Smrg
25*181254a7Smrg #include "quadmath-imp.h"
26*181254a7Smrg
finiteq(__float128 x)27*181254a7Smrg int finiteq(__float128 x)
28*181254a7Smrg {
29*181254a7Smrg int64_t hx;
30*181254a7Smrg GET_FLT128_MSW64(hx,x);
31*181254a7Smrg return (int)((uint64_t)((hx&0x7fff000000000000LL)
32*181254a7Smrg -0x7fff000000000000LL)>>63);
33*181254a7Smrg }
34