Blame sysdeps/ieee754/flt-32/s_finitef.c
|
Packit Service |
82fcde |
/* s_finitef.c -- float version of s_finite.c.
|
|
Packit Service |
82fcde |
* Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* ====================================================
|
|
Packit Service |
82fcde |
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
|
Packit Service |
82fcde |
*
|
|
Packit Service |
82fcde |
* Developed at SunPro, a Sun Microsystems, Inc. business.
|
|
Packit Service |
82fcde |
* Permission to use, copy, modify, and distribute this
|
|
Packit Service |
82fcde |
* software is freely granted, provided that this notice
|
|
Packit Service |
82fcde |
* is preserved.
|
|
Packit Service |
82fcde |
* ====================================================
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#if defined(LIBM_SCCS) && !defined(lint)
|
|
Packit Service |
82fcde |
static char rcsid[] = "$NetBSD: s_finitef.c,v 1.4 1995/05/10 20:47:18 jtc Exp $";
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
* finitef(x) returns 1 is x is finite, else 0;
|
|
Packit Service |
82fcde |
* no branching!
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#include <math.h>
|
|
Packit Service |
82fcde |
#include <math_private.h>
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#undef __finitef
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#ifndef FINITEF
|
|
Packit Service |
82fcde |
# define FINITEF __finitef
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
int FINITEF(float x)
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
int32_t ix;
|
|
Packit Service |
82fcde |
GET_FLOAT_WORD(ix,x);
|
|
Packit Service |
82fcde |
return (int)((uint32_t)((ix&0x7f800000)-0x7f800000)>>31);
|
|
Packit Service |
82fcde |
}
|
|
Packit Service |
82fcde |
hidden_def (__finitef)
|
|
Packit Service |
82fcde |
weak_alias (__finitef, finitef)
|