1/* s_finitef.c -- float version of s_finite.c.
2 */
3
4/*
5 * ====================================================
6 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
7 *
8 * Developed at SunPro, a Sun Microsystems, Inc. business.
9 * Permission to use, copy, modify, and distribute this
10 * software is freely granted, provided that this notice
11 * is preserved.
12 * ====================================================
13 */
14
15#if defined(LIBM_SCCS) && !defined(lint)
16static char rcsid[] = "$NetBSD: s_finitef.c,v 1.4 1995/05/10 20:47:18 jtc Exp $";
17#endif
18
19/*
20 * finitef(x) returns 1 is x is finite, else 0;
21 * no branching!
22 */
23
24#include <math.h>
25#include <math_private.h>
26
27#undef __finitef
28
29#ifndef FINITEF
30# define FINITEF __finitef
31#endif
32
33int FINITEF(float x)
34{
35 int32_t ix;
36 GET_FLOAT_WORD(ix,x);
37 return (int)((uint32_t)((ix&0x7f800000)-0x7f800000)>>31);
38}
39hidden_def (__finitef)
40weak_alias (__finitef, finitef)
41

source code of glibc/sysdeps/ieee754/flt-32/s_finitef.c