Kotlin Programming By Example
上QQ阅读APP看书,第一时间看更新

Double

This type represents a double precision 64-bit floating-point number. Similar to the Float type, this type specifies that the variable being declared holds floating-point values. An important difference between the Double and Float types is that Double can hold numbers across a much larger range without overflow. Its range is approximately ±1.79769313486231570E+308 (15 significant decimal digits):

var d: Double = 3.142