OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc1/] [newlib/] [libm/] [common/] [sf_isnanf.c] - Blame information for rev 345

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
/*
2
 * ====================================================
3
 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
4
 *
5
 * Developed at SunPro, a Sun Microsystems, Inc. business.
6
 * Permission to use, copy, modify, and distribute this
7
 * software is freely granted, provided that this notice
8
 * is preserved.
9
 * ====================================================
10
 */
11
 
12
/*
13
 * __isnanf(x) returns 1 is x is nan, else 0;
14
 */
15
 
16
#include "fdlibm.h"
17
 
18
int
19
_DEFUN (__isnanf, (x),
20
        float x)
21
{
22
        __int32_t ix;
23
        GET_FLOAT_WORD(ix,x);
24
        ix &= 0x7fffffff;
25
        return FLT_UWORD_IS_NAN(ix);
26
}
27
 
28
#ifdef _DOUBLE_IS_32BITS
29
 
30
int
31
_DEFUN (__isnand, (x),
32
        double x)
33
{
34
        return __isnanf((float) x);
35
}
36
 
37
#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.