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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libm/] [common/] [sf_isinf.c] - Blame information for rev 179

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
/*
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.