Last change
on this file since 450 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
684 bytes
|
Line | |
---|
1 | /* |
---|
2 | * nan () returns a nan. |
---|
3 | * Added by Cygnus Support. |
---|
4 | */ |
---|
5 | |
---|
6 | /* |
---|
7 | FUNCTION |
---|
8 | <<nan>>, <<nanf>>---representation of ``Not a Number'' |
---|
9 | |
---|
10 | INDEX |
---|
11 | nan |
---|
12 | INDEX |
---|
13 | nanf |
---|
14 | |
---|
15 | SYNOPSIS |
---|
16 | #include <math.h> |
---|
17 | double nan(const char *<[unused]>); |
---|
18 | float nanf(const char *<[unused]>); |
---|
19 | |
---|
20 | |
---|
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. |
---|
25 | |
---|
26 | QUICKREF |
---|
27 | nan - pure |
---|
28 | |
---|
29 | */ |
---|
30 | |
---|
31 | #include "fdlibm.h" |
---|
32 | |
---|
33 | #ifndef _DOUBLE_IS_32BITS |
---|
34 | |
---|
35 | double nan(const char *unused) |
---|
36 | { |
---|
37 | double x; |
---|
38 | |
---|
39 | #if __GNUC_PREREQ (3, 3) |
---|
40 | x = __builtin_nan(""); |
---|
41 | #else |
---|
42 | INSERT_WORDS(x,0x7ff80000,0); |
---|
43 | #endif |
---|
44 | return x; |
---|
45 | } |
---|
46 | |
---|
47 | #endif /* _DOUBLE_IS_32BITS */ |
---|
Note: See
TracBrowser
for help on using the repository browser.