...

/

Floating Point Equality Checks

Floating Point Equality Checks

Peculiarities of floating point equality and the IEEE standard

Floating Point Comparison

Kotlin follows the IEEE Standard for Floating Point Arithmetic when comparing floating point numbers. However, this only works if the Kotlin compiler is able to statically infer the types of both operands to either Float, Double, or their nullable counterparts Float? and ...