Exposing Floating Point (2019)
Pretty solid article. I&#x27;m glad there was mention of the non-uniform-distribution of floats, though my biased view wishes there were a little more emphasis that floats <i>really really</i> want to be &quot;near 1&quot;, to keep precision. The practice of normalizing data to a [0,1] space, doing your math there, then transforming back to &quot;big&quot; space is useful not just for conceptual simplicity, but also for maintaining precision in intermediate results.<p>Also, there&#x27;s a pretty good range of integers that can be represented exactly by floats; one of the reasons the Lua developers were resistant to adding an integer type for many years. I believe you can represent about 24 bits of exact integers in a 32 bit float.<p>I&#x27;ve been wrangling with fixed-point representations a lot lately, so the differences are stark in my mind (: