ulp
Platform and version requirements: JS (1.2), Native (1.2)
val Double.ulp: Double
Platform and version requirements: JVM (1.2)
inline val Double.ulp: Double
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
isNaN
-
x.ulp
is+Inf
whenx
is+Inf
or-Inf
-
0.0.ulp
isDouble.MIN_VALUE
Platform and version requirements: JVM (1.2)
inline val Float.ulp: Float
Platform and version requirements: Native (1.2)
val Float.ulp: Float
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
isNaN
-
x.ulp
is+Inf
whenx
is+Inf
or-Inf
-
0.0.ulp
isFloat.NIN_VALUE
© 2010–2021 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.math/ulp.html