Double

An IEEE 754 binary64 floating-point value.

Supports finite values, signed zeros, infinities and NaN. Mixed arithmetic promotes numeric operands to Double and may round large integers. MIN_VALUE is the smallest positive subnormal value, not the most negative value. compareTo orders NaN above numbers and negative zero below positive zero; primitive equality treats NaN as unequal and both zeros as equal.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Distance to the next greater magnitude, including the smallest subnormal for zero.

Functions

Link copied to clipboard
operator external fun compareTo(other: Byte): Int
open operator external override fun compareTo(other: Double): Int
operator external fun compareTo(other: Float): Int
operator external fun compareTo(other: Int): Int
operator external fun compareTo(other: Long): Int
operator external fun compareTo(other: Short): Int

Compares this value with other after numeric promotion.

Link copied to clipboard
operator external fun dec(): Double

Returns this value minus one.

Link copied to clipboard
operator external fun div(other: Byte): Double
operator external fun div(other: Double): Double
operator external fun div(other: Float): Double
operator external fun div(other: Int): Double
operator external fun div(other: Long): Double
operator external fun div(other: Short): Double

Divides this value by other.

Link copied to clipboard
fun Double.IEEErem(divisor: Double): Double

IEEE remainder using the nearest integer quotient with ties to even; differs from %.

Link copied to clipboard
operator external fun inc(): Double

Returns this value plus one.

Link copied to clipboard
operator external fun minus(other: Byte): Double
operator external fun minus(other: Double): Double
operator external fun minus(other: Float): Double
operator external fun minus(other: Int): Double
operator external fun minus(other: Long): Double
operator external fun minus(other: Short): Double

Subtracts other from this value.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
operator external fun plus(other: Byte): Double
operator external fun plus(other: Double): Double
operator external fun plus(other: Float): Double
operator external fun plus(other: Int): Double
operator external fun plus(other: Long): Double
operator external fun plus(other: Short): Double

Adds other to this value.

Link copied to clipboard

fun Double.pow(n: Int): Double

Raises this value to the full Int exponent without narrowing the exponent to Float.

Link copied to clipboard

Creates a floating-point range from this value up to other, inclusive.

Link copied to clipboard
operator fun Double.rangeUntil(other: Double): OpenEndRange<Double>

Creates a floating-point range from this value up to other, exclusive.

Link copied to clipboard
operator external fun rem(other: Byte): Double
operator external fun rem(other: Double): Double
operator external fun rem(other: Float): Double
operator external fun rem(other: Int): Double
operator external fun rem(other: Long): Double
operator external fun rem(other: Short): Double

Returns the remainder after dividing this value by other.

Link copied to clipboard

Rounds to the nearest integer, with ties toward positive infinity; rejects NaN and saturates.

Link copied to clipboard

Rounds to the nearest integer, with ties toward positive infinity; rejects NaN and saturates.

Link copied to clipboard
operator external fun times(other: Byte): Double
operator external fun times(other: Double): Double
operator external fun times(other: Float): Double
operator external fun times(other: Int): Double
operator external fun times(other: Long): Double
operator external fun times(other: Short): Double

Multiplies this value by other.

Link copied to clipboard
operator fun Double.times(vector: Vector2d): Vector2d
operator fun Double.times(vector: Vector3d): Vector3d
operator fun Double.times(vector: Vector4d): Vector4d
Link copied to clipboard
external fun toByte(): Byte

Converts this value to Byte.

Link copied to clipboard
external fun toChar(): Char

Converts this value to a UTF-16 code unit using its lowest 16 integer bits.

Link copied to clipboard
external fun toDouble(): Double

Returns this value unchanged.

Link copied to clipboard
external fun toFloat(): Float

Converts this value to Float.

Link copied to clipboard
external fun toInt(): Int

Converts this value to Int.

Link copied to clipboard
external fun toLong(): Long

Converts this value to Long.

Link copied to clipboard
external fun toShort(): Short

Converts this value to Short.

Link copied to clipboard
external fun toUByte(): UByte

Converts this value to UByte.

Link copied to clipboard
external fun toUInt(): UInt

Converts this value to UInt.

Link copied to clipboard
external fun toULong(): ULong

Converts this value to ULong.

Link copied to clipboard
external fun toUShort(): UShort

Converts this value to UShort.

Link copied to clipboard
operator external fun unaryMinus(): Double

Returns the negation of this value.

Link copied to clipboard
operator external fun unaryPlus(): Double

Returns this value with the type shown in the signature.

Link copied to clipboard