Simbody  3.8

signBit(i) provides a fast way to determine the value of the sign bit (as a bool) for integral and floating types.

signBit(i) provides a fast way to determine the value of the sign bit (as a bool) for integral and floating types.

Note that this is significantly different than sign(x); be sure you know what you're doing if you use this method. signBit() refers to the underlying representation rather than the numerical value. For example, for floating types there are two zeroes, +0 and -0 which have opposite sign bits but the same sign (0). Also, unsigned types have sign() of 0 or 1, but they are considered here to have a sign bit of 0 always, since the stored high bit does not indicate a negative value.

Notes

See also
sign()