source: trunk/libs/newlib/src/newlib/libm/common/sf_nan.c @ 471

Last change on this file since 471 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 365 bytes
Line 
1/*
2 * nanf () returns a nan.
3 * Added by Cygnus Support.
4 */
5
6#include "fdlibm.h"
7
8        float nanf(const char *unused)
9{
10        float x;
11
12#if __GNUC_PREREQ (3, 3)
13        x = __builtin_nanf("");
14#else
15        SET_FLOAT_WORD(x,0x7fc00000);
16#endif
17        return x;
18}
19
20#ifdef _DOUBLE_IS_32BITS
21
22        double nan(const char *arg)
23{
24        return (double) nanf(arg);
25}
26
27#endif /* defined(_DOUBLE_IS_32BITS) */
28
Note: See TracBrowser for help on using the repository browser.