Instance Property


The integer part of the base-r logarithm of the magnitude of self, where r is the radix (2 for binary, 10 for decimal). Implements the IEEE 754 logB operation.


var exponent: Int { get }


Edge cases:

  • If x is zero, then x.exponent is min.

  • If x is +/-infinity or NaN, then x.exponent is max.


From Protocol

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software