What is the Double.binade property in Swift?
Overview
Double.binade double instance property in Swift that gets the floating-point value with the same sign and exponent as this value, but with a significand of 1.0.
Syntax
Double.binade
Return value
This property returns a floating-point value.
Code example
// Create some double valueslet d1 = 1.1let d2 = 0.0let d3 = -4.5let d4 = Double.infinity// Get the binadeprint(d1.binade)print(d2.binade)print(d3.binade)print(d4.binade)
Explanation
- Lines 2 to 5: We create some double values.
- Lines 8 to 11: We print the
binadeproperty value of each double value.