News for hackers. Stuff that matters.
Re:Understanding Ethereum Smart Contracts by Tobba_ on Wednesday November 29, 2017 @02:13PM (#15809844)
How on earth is using the wonkiest possible representation a better solution when you need precise results? In this case, even integer overflow would be a better failure mode than being a few cents off - because it would get noticed pretty quickly in comparison.

Hell, floating point isn't even a good way of doing imprecise arithmetic on larger numbers. What you would actually want is log arithmetic, but that's not what the hardware implements (even though it's simpler). It gives you roughly the same overall precision over each range but stops it from suddenly being cut in half as the exponent changes.

There are no comments on this comment yet.