News for hackers. Stuff that matters.
Re:Float Toy by mkl on Thursday January 23, 2020 @05:03AM (#22126262)
They do have the same number of decimal digits displayed. You can see it by clicking between "float" and "double": the decimal representation stays the same.
Re:Float Toy by TazeTSchnitzel on Thursday January 23, 2020 @06:21AM (#22126622)
What is wrong with that?
Re:Float Toy by mkl on Thursday January 23, 2020 @06:30AM (#22126665)
It makes it look like they have the same precision (well also, going from 64 to 32 bits zeros out a whole lot, which contributes to that impression). In fact, both decimal representations are usually truncated, and don't accurately represent the binary floating point number. It's a neat and useful tool regardless, and I'm being a bit pedantic.