IEEE Floating Point Converter
This tool converts a double-precision floating-point number to its IEEE representation.
Information
Notes on converting from floating-point format to IEEE:
- For an input
x, the converter provides the bits forfl(x), the floating-point number closest tox. - Only rational numbers of the form
m/2^ncan be represented exactly. For example,11/8 = 1.375can be represented exactly but0.1cannot. - The greatest consecutive integer that can be represented exactly (i.e.
flintmax) is2^53 = 9007199254740992. Integers above this magnitude, such as10^30, are not guaranteed to be represented exactly. - Scientific notation such as
-1.1e2is supported. Expressions such as2^5,2+2, and11/8are not. - Any ill-formatted input will evaluate to
NaN.
Notes on converting from IEEE to floating-point format:
- Any whitespace in the input binary string is ignored.
- If the input is less than 64 bits, zeros will be appended to the end automatically.
- If the input is greater than 64 bits, any extra bits at the end will be chopped.
- The converter prints a warning if the input is not exactly 64 bits. However, if you do include whitespaces, it does not check that the inputs have respective lengths 1, 11, and 52.