by throwaway9870 · 3y ago · 0 comments
Notably, it's still slightly better than the first code example in the original article, as it takes the rounding bug into account.
Also 6 comparisons is only if you’d have the max value which seems unlikely in actual usage. Linear could be better if most of the time values are in B or KB ranges