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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libm/] [math/] [s_isinf.c] - Blame information for rev 40

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

Line No. Rev Author Line
1 39 lampret
/*
2
 * isinf(x) returns 1 if x is infinity, else 0;
3
 * no branching!
4
 * Added by Cygnus Support.
5
 */
6
 
7
#include "fdlibm.h"
8
 
9
#ifndef _DOUBLE_IS_32BITS
10
 
11
#ifdef __STDC__
12
        int isinf(double x)
13
#else
14
        int isinf(x)
15
        double x;
16
#endif
17
{
18
        __int32_t hx,lx;
19
        EXTRACT_WORDS(hx,lx,x);
20
        hx &= 0x7fffffff;
21
        hx |= (__uint32_t)(lx|(-lx))>>31;
22
        hx = 0x7ff00000 - hx;
23
        return 1 - (int)((__uint32_t)(hx|(-hx))>>31);
24
}
25
 
26
#endif /* _DOUBLE_IS_32BITS */

powered by: WebSVN 2.1.0

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