Float Exposed
float.exposed
float.exposed
It doesn't handle very large or small floating-point numbers. I'm not sure where the cutoff is, but it's around 1e40 and 1e-46. It would be cool to be able to explore the whole range of 64-bit floats, including subnormals like 5.0e-324.
It would be interesting to leave the input as-is and show two related decimal representations:
1. The precise decimal representation (what is printed now). 2. The shortest decimal representation as determined by algorithms like Grisu [1] and Ryu [2].
It would also be cool to allow jumping to the next/previous representable floating-point number. Showing eps(x) would also be handy—i.e. the difference between the current value and the next closest representable floating-point value.
[1] https://www.cs.tufts.edu/~nr/cs257/archive/florian-loitsch/p...
I believe this uses IEEE https://en.wikipedia.org/wiki/IEEE_754? An additional cool feature would be the ability to toggle between this, and other standards such as DEC64 and UNUM.