float>bits ( x -- n )
Factor handbook » The language » Numbers » Floats » Bitwise operations on floats

Next:double>bits ( x -- n )


Vocabulary
math

Inputs
xa float


Outputs
na 32-bit integer representing an IEEE 754 single-precision float


Word description
Creates a 32-bit binary representation of a float object. This can be used in the process of writing a float to a stream. NaNs preserve their sign and the most significant 23 payload bits, including the signaling bit. A payload that would become zero is replaced with one so that the result remains a NaN. All binary32 NaN encodings round-trip through bits>float and this word.

See also
bits>double, bits>float, double>bits

Definition