Reference for Wiring version 0024+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.
Name |
signbit() |
Examples |
double c = signbit(-3.5); // Sets c to 1
double d = signbit(0.0); // Sets d to 0 |
Description |
The signbit() function returns a nonzero value if the value of x has its sign bit set. This is not the same as x < 0.0, because IEEE 754 floating point allows zero to be signed. The comparison -0.0 < 0.0 is false, but signbit (-0.0) will return a nonzero value. |
Syntax |
signbit(x) |
Parameters |
|
Returns |
double |
Usage |
Application |
Updated on January 11, 2010 09:58:49pm PST