Search wiring.org.co:

Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If 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 |

x | double, float or int

Returns | double
Usage | Application

Updated on July 07, 2011 11:08:58pm PDT