toRawBits

expect fun Double.toRawBits(): Long(source)

Returns a bit representation of the specified floating-point value as Long according to the IEEE 754 floating-point "double format" bit layout, preserving NaN values exact layout.

Since Kotlin

1.2

expect fun Float.toRawBits(): Int(source)

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout, preserving NaN values exact layout.

Since Kotlin

1.2
actual fun Double.toRawBits(): Long(source)

Returns a bit representation of the specified floating-point value as Long according to the IEEE 754 floating-point "double format" bit layout, preserving NaN values exact layout.

Since Kotlin

1.2

actual fun Float.toRawBits(): Int(source)

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout, preserving NaN values exact layout.

Note that in Kotlin/JS Float range is wider than "single format" bit layout can represent, so some Float values may overflow, underflow or loose their accuracy after conversion to bits and back.

Since Kotlin

1.2
actual inline fun Double.toRawBits(): Long(source)

Returns a bit representation of the specified floating-point value as Long according to the IEEE 754 floating-point "double format" bit layout, preserving NaN values exact layout.

Since Kotlin

1.2

actual inline fun Float.toRawBits(): Int(source)

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout, preserving NaN values exact layout.

Since Kotlin

1.2
actual inline fun Double.toRawBits(): Long(source)

Returns a bit representation of the specified floating-point value as Long according to the IEEE 754 floating-point "double format" bit layout, preserving NaN values exact layout.

Since Kotlin

1.3

actual inline fun Float.toRawBits(): Int(source)

Returns a bit representation of the specified floating-point value as Int according to the IEEE 754 floating-point "single format" bit layout, preserving NaN values exact layout.

Since Kotlin

1.3