The “IEEE-754 Analyzers” and a previous “IEEE-754 Calculators” pages were developed while I was a professor of computer science at Queens College of the City University of New York. They were hosted on a workstation in my office, which was also used to support the courses I was teaching, along with some side projects. I retired from Queens in 2020, and in 2024 CUNY decided the workstation should be shut down. So I transferred the contents of the course-related content, including these analyzers, to my personal web site here.
Bartosz Ciechanowski has developed an extremely well-done tool for visualizing how IEEE-754 floating-point numbers are encoded. I recommend it most highly. There is a tutorial with reference material at: https://ciechanow.ski/exposing-floating-point/.
And be sure to use the link to the actual tool (https://float.exposed) that’s in the first paragraph.
The previous version is still available.
But please note: the Reference Material there contains many broken links and is no longer being maintained. I suggest that you use your favorite search engine to locate background information on the IEEE-754 floating point standard instead.
“Kevin’s Charts” is still there, but has not been updated to handle the 2008 version of the IEEE-754 standard.
Instead of three separate pages, everything is now on one page. Enter whatever value you want to analyze, and the code will figure out whether you entered a decimal or binary value that you want to convert to IEEE-754, or the hexadecimal representation of an IEEE-754 encoded number that you want to analyze.
Decimal values can be entered as rational or mixed numbers. With this feature, you can produce decimal values with truly repeating fractions.
You can have multiple analyzers open at once so that you can compare multiple analyses at the same time.
All three binary formats specified in IEEE-754 2008 (binary32, binary64, and binary128) are supported.
The new version is a total rewrite of the “calculators” page, so what’s changed under the hood is: “Everything!”
The new calculators use the GNU Multiprecision Arithmetic library to do the more time-consuming underlying calculations. The old calculators used JavaScript for all its calculations, with several painstakingly-developed constants to handle edge cases.
Although the old calculators were very accurate, we think the new analyzers will be even more so. Indeed, we recently received a report of an error in the old calculators that the new code handles correctly.
The analyzers also handle rounding modes much more clearly, and include support for the Binary128 (quad precision) data type introduced in the 2008 revision of the standard (IEEE-754-2008). Now that you can enter rational numbers, you can generate values that repeat indefinitely (try 1/7), and the rounding modes will affect the rightmost digit of the result.
The new code also supports more flexibility in entering values for analysis. In particular, being able to enter rational numbers means you can now explore the representation of repeating fractions.
The current code was written in 2011 by Michael Lubow, an undergraduate Computer Science major at Queens College of the City University of New York (CUNY), under the supervision of Dr. Christopher Vickery.
Special thanks to Sasa Zeman (sasaz72 at mail.ru) for spotting several bugs for us to fix in the current code.
The previous calculators were first written by another Queens College student, Felix Quanfei Wen, 温泉飞 (quanfei.wen at gmail.com), also under Dr. Vickery’s supervision, in 1997. The code for those calculators was considerably reworked by Kevin Brewer, an engineer working for Delco Electronics at the time.
Sure! There is a Git repository of the entire site, including some routines we use for testing, on a public project site so that anyone can not only access the code easily, but also contribute improvements.
Because the web site uses C code for its calculations, the .cc files in the src directory have to be compiled for whatever system you want to use for testing. Macintosh binaries are left in the repository for the convenience of those who want to take advantage of having them. Likewise, you will need a copy of the GNU Multiprecision Arithmetic library for your platform.
The source code for this project is available under an MIT license, which allows you to use the code pretty much any way you want, provided you maintain the license document with the code.
This code makes use of the GNU Multiprecision Arithmetic Library, which is licensed separately under the terms of the GNU LGPL
Recurrences: strings of fraction digits that repeat indefinitely. They can show up in either decimal or binary fractions because the radices are independent of each other. (Decimal 0.1 has a recurrence when converted to binary, for example.) Also, you can get a decimal recurrence by entering a decimal value as a rational number (1/3, etc.).
We left them out, hoping they won’t be missed.
Once a value has been converted to a normalized binary value, the 1 to the left of the binary point is the “hidden” bit that is not included in the IEEE-754 encoded bits. (For denormalized values, the “hidden 1” becomes a “hidden 0.”)
The analyzers recognize special input names for these (“NaN,” “qNaN,” “sNaN,” “Infinity,” “+Infinity,” and “-Infinity”), and will show the corresponding IEEE-754 values. Also, if you enter the hexadecimal representation of one of these values, the analyzers will recognize them, too.
For NaN values, the sign bit and most of the significand bits can have arbitrary values; the analyzers represent those binary digits with the letter ‘x’, even if you enter a particular value for some of them in hex.
You need to have a basic understanding of floating-point numbers in general, and the IEEE-754 floating-point standard specifically, to make sense of these analyzers. Any textbook on computer architecture can help you learn the basics.
We've fixed all the bugs we know about.
Keyboard shortcuts are under development.
We plan to make some changes to the UI, but nothing major is planned for the near future.
We plan to add support for the Binary16 format.
We have a request to show the difference between the value entered and the actual decimal value represented by each IEEE-754 encoding, but it requires some work.
For all of these: Let me know!
Better yet, head over to the project page on GitHub and contribute!!