OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-newlib/] [newlib-1.17.0/] [newlib/] [libm/] [common/] [sf_isinf.c] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 jlechner
/*
2
 * isinff(x) returns 1 if x is +-infinity, else 0;
3
 *
4
 * isinff is an extension declared in <ieeefp.h> and
5
 * <math.h>.
6
 */
7
 
8
#include "fdlibm.h"
9
 
10
int
11
_DEFUN (isinff, (x),
12
        float x)
13
{
14
        __int32_t ix;
15
        GET_FLOAT_WORD(ix,x);
16
        ix &= 0x7fffffff;
17
        return FLT_UWORD_IS_INFINITE(ix);
18
}
19
 
20
#ifdef _DOUBLE_IS_32BITS
21
 
22
#undef isinf
23
 
24
int
25
_DEFUN (isinf, (x),
26
        double x)
27
{
28
        return isinff((float) x);
29
}
30
 
31
#endif /* defined(_DOUBLE_IS_32BITS) */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.