2 ms·
Another fun one is ONE = 256 (or another power of two). Intended for fixed point arithmetic where 1 actually means 1/256.
by GuB-42 6y ago
Another fun one is ONE = 256 (or another power of two).
Intended for fixed point arithmetic where 1 actually means 1/256.
- ant6n 6y agoThis is nicer example, since the posted one should really have different variable names (e.g. pow3). On the other hand, if this declaration of ONE is global (not contained within some context like a type), then perhaps it should be something like ONE_F8.
- ferdek 6y agoSomething like ONE_FIX_UQ8? https://en.wikipedia.org/wiki/Q_%28number_format%29 https://en.wikipedia.org/wiki/Q_%28number_format%29