logoalt Hacker News

klodolphtoday at 2:14 AM1 replyview on HN

Worth mentioning is storing the logarithm of the number.

Seen it used in a couple places. Logarithmic depth buffer is one. Yamaha DX7 is another.


Replies

mtkleintoday at 2:25 AM

That's kind of exactly what floats are. You store the log2 of the number, a bit for its sign, and in what remaining bits you have left some fixed-point scaling between adjacent powers.

show 3 replies