Subversion Repositories Kolibri OS

Rev

Rev 1906 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1906 Rev 3362
Line 1... Line 1...
1
/* Copyright (C) 2002 by  Red Hat, Incorporated. All rights reserved.
1
/* Copyright (C) 2002 by  Red Hat, Incorporated. All rights reserved.
2
 *
2
 *
3
 * Permission to use, copy, modify, and distribute this software
3
 * Permission to use, copy, modify, and distribute this software
4
 * is freely granted, provided that this notice is preserved.
4
 * is freely granted, provided that this notice is preserved.
5
 */
5
 */
-
 
6
/*
-
 
7
FUNCTION
-
 
8
<>--Does floating-point number have negative sign?
-
 
9
 
-
 
10
INDEX
-
 
11
	signbit
-
 
12
 
-
 
13
ANSI_SYNOPSIS
-
 
14
	#include 
-
 
15
	int signbit(real-floating <[x]>);
-
 
16
 
-
 
17
DESCRIPTION
-
 
18
The <> macro determines whether the sign of its argument value is
-
 
19
negative.  The macro reports the sign of all values, including infinities,
-
 
20
zeros, and NaNs.  If zero is unsigned, it is treated as positive.  As shown in
-
 
21
the synopsis, the argument is "real-floating," meaning that any of the real
-
 
22
floating-point types (float, double, etc.) may be given to it.
-
 
23
 
-
 
24
Note that because of the possibilities of signed 0 and NaNs, the expression
-
 
25
"<[x]> < 0.0" does not give the same result as <> in all cases.
-
 
26
 
-
 
27
RETURNS
-
 
28
The <> macro returns a nonzero value if and only if the sign of its
-
 
29
argument value is negative.
-
 
30
 
-
 
31
PORTABILITY
-
 
32
C99, POSIX.
-
 
33
 
-
 
34
*/
Line 6... Line 35...
6
 
35
 
Line 7... Line 36...
7
#include "fdlibm.h"
36
#include "fdlibm.h"
8
 
37