Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libm / common / s_nan.c
blobd5710385c0e5b620b7e8a4cc02423dad4b5e1dda
1 /*
2 * nan () returns a nan.
3 * Added by Cygnus Support.
4 */
6 /*
7 FUNCTION
8 <<nan>>, <<nanf>>---representation of ``Not a Number''
10 INDEX
11 nan
12 INDEX
13 nanf
15 SYNOPSIS
16 #include <math.h>
17 double nan(const char *<[unused]>);
18 float nanf(const char *<[unused]>);
21 DESCRIPTION
22 <<nan>> and <<nanf>> return an IEEE NaN (Not a Number) in
23 double- and single-precision arithmetic respectively. The
24 argument is currently disregarded.
26 QUICKREF
27 nan - pure
31 #include "fdlibm.h"
33 #ifndef _DOUBLE_IS_32BITS
35 double nan(const char *unused)
37 double x;
39 #if __GNUC_PREREQ (3, 3)
40 x = __builtin_nan("");
41 #else
42 INSERT_WORDS(x,0x7ff80000,0);
43 #endif
44 return x;
47 #endif /* _DOUBLE_IS_32BITS */