Instance Property

sign

minus if the sign bit of self is set, and plus otherwise. Implements the IEEE 754 signbit operation.

Declaration

var sign: FloatingPointSign { get }

Discussion

Note that the property x.sign == .minus is not the same as x < 0. In particular, x < 0 while x.sign == .minus if x is -0, and while x < 0 is always false if x is NaN, x.sign could be either .plus or .minus.

Relationships

From Protocol