URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 148 |
Rev 158 |
/*
|
/*
|
* isinff(x) returns 1 if x is +-infinity, else 0;
|
* isinff(x) returns 1 if x is +-infinity, else 0;
|
*
|
*
|
* isinff is an extension declared in <ieeefp.h> and
|
* isinff is an extension declared in <ieeefp.h> and
|
* <math.h>.
|
* <math.h>.
|
*/
|
*/
|
|
|
#include "fdlibm.h"
|
#include "fdlibm.h"
|
|
|
int
|
int
|
_DEFUN (isinff, (x),
|
_DEFUN (isinff, (x),
|
float x)
|
float x)
|
{
|
{
|
__int32_t ix;
|
__int32_t ix;
|
GET_FLOAT_WORD(ix,x);
|
GET_FLOAT_WORD(ix,x);
|
ix &= 0x7fffffff;
|
ix &= 0x7fffffff;
|
return FLT_UWORD_IS_INFINITE(ix);
|
return FLT_UWORD_IS_INFINITE(ix);
|
}
|
}
|
|
|
#ifdef _DOUBLE_IS_32BITS
|
#ifdef _DOUBLE_IS_32BITS
|
|
|
#undef isinf
|
#undef isinf
|
|
|
int
|
int
|
_DEFUN (isinf, (x),
|
_DEFUN (isinf, (x),
|
double x)
|
double x)
|
{
|
{
|
return isinff((float) x);
|
return isinff((float) x);
|
}
|
}
|
|
|
#endif /* defined(_DOUBLE_IS_32BITS) */
|
#endif /* defined(_DOUBLE_IS_32BITS) */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.