12116Sjkh/* s_finitef.c -- float version of s_finite.c. 22116Sjkh * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. 32116Sjkh */ 42116Sjkh 52116Sjkh/* 62116Sjkh * ==================================================== 72116Sjkh * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 82116Sjkh * 92116Sjkh * Developed at SunPro, a Sun Microsystems, Inc. business. 102116Sjkh * Permission to use, copy, modify, and distribute this 118870Srgrimes * software is freely granted, provided that this notice 122116Sjkh * is preserved. 132116Sjkh * ==================================================== 142116Sjkh */ 152116Sjkh 16176451Sdas#include <sys/cdefs.h> 17176451Sdas__FBSDID("$FreeBSD: releng/10.2/lib/msun/src/s_finitef.c 176451 2008-02-22 02:30:36Z das $"); 182116Sjkh 192116Sjkh/* 202116Sjkh * finitef(x) returns 1 is x is finite, else 0; 212116Sjkh * no branching! 222116Sjkh */ 232116Sjkh 242116Sjkh#include "math.h" 252116Sjkh#include "math_private.h" 262116Sjkh 272116Sjkh int finitef(float x) 282116Sjkh{ 292116Sjkh int32_t ix; 302116Sjkh GET_FLOAT_WORD(ix,x); 312116Sjkh return (int)((u_int32_t)((ix&0x7fffffff)-0x7f800000)>>31); 322116Sjkh} 33