Floating point numbers are almost always a mistake. Classic howlers:<p>&quot;Well, we can represent almost all the values we care about.&quot; Until the day you can&#x27;t.<p>&quot;We&#x27;ll represent time with a double, with the fractional part being part of a day, and the day being an integer day number from when Somebody Famous Did Something.&quot; Until you realize that the 10AM meeting you want to put in your scheduler can&#x27;t be exactly represented.<p>&quot;We&#x27;ll put our account balances in there as floats because unlike everyone else who has done this, <i>we</i> know what we&#x27;re doing.&quot; But you don&#x27;t. And that noise you heard was a million accountants crying out in pain.<p>You wouldn&#x27;t represent a pointer as &quot;some fraction of the amount of memory the machine has, from 0.0 to 0.9999&quot;, which is my usual retort when someone wants to smuggle a scalar or structural value in a float.