Type Property


Positive infinity.


static var infinity: Double { get }


Infinity compares greater than all finite numbers and equal to other infinite values.

let x = Double.greatestFiniteMagnitude
let y = x * 2
// y == Double.infinity
// y > x


From Protocol

See Also

Accessing Numeric Constants

static var pi: Double

The mathematical constant pi.

static var greatestFiniteMagnitude: Double

The greatest finite number representable by this type.

static var nan: Double

A quiet NaN (“not a number”).

static var signalingNaN: Double

A signaling NaN (“not a number”).

static var ulpOfOne: Double

The unit in the last place of 1.0.

static var leastNormalMagnitude: Double

The least positive normal number.