ulp

expect val Double.ulp: Double(source)

Returns the ulp (unit in the last place) of this value.

An ulp is a positive distance between this value and the next nearest Double value larger in magnitude.

Special Cases:

  • NaN.ulp is NaN

  • x.ulp is +Inf when x is +Inf or -Inf

  • 0.0.ulp is Double.MIN_VALUE

Since Kotlin

1.2
actual val Double.ulp: Double(source)

Returns the ulp (unit in the last place) of this value.

An ulp is a positive distance between this value and the next nearest Double value larger in magnitude.

Special Cases:

  • NaN.ulp is NaN

  • x.ulp is +Inf when x is +Inf or -Inf

  • 0.0.ulp is Double.MIN_VALUE

Since Kotlin

1.2

Returns the ulp of this value.

An ulp is a positive distance between this value and the next nearest Float value larger in magnitude.

Special Cases:

  • NaN.ulp is NaN

  • x.ulp is +Inf when x is +Inf or -Inf

  • 0.0.ulp is Float.MIN_VALUE

Since Kotlin

1.2

actual val Double.ulp: Double(source)

Returns the ulp (unit in the last place) of this value.

An ulp is a positive distance between this value and the next nearest Double value larger in magnitude.

Special Cases:

  • NaN.ulp is NaN

  • x.ulp is +Inf when x is +Inf or -Inf

  • 0.0.ulp is Double.MIN_VALUE

Since Kotlin

1.2

Returns the ulp of this value.

An ulp is a positive distance between this value and the next nearest Float value larger in magnitude.

Special Cases:

  • NaN.ulp is NaN

  • x.ulp is +Inf when x is +Inf or -Inf

  • 0.0.ulp is Float.MIN_VALUE

Since Kotlin

1.3

actual val Double.ulp: Double(source)

Returns the ulp (unit in the last place) of this value.

An ulp is a positive distance between this value and the next nearest Double value larger in magnitude.

Special Cases:

  • NaN.ulp is NaN

  • x.ulp is +Inf when x is +Inf or -Inf

  • 0.0.ulp is Double.MIN_VALUE

Since Kotlin

1.3