News for hackers. Stuff that matters.
Re:`three = 1` in the Linux sourcecode (2014) by GuB-42 on Tuesday March 09, 2021 @05:45AM (#26397470)
Another fun one is ONE = 256 (or another power of two).

Intended for fixed point arithmetic where 1 actually means 1/256.

Re:`three = 1` in the Linux sourcecode (2014) by ant6n on Tuesday March 09, 2021 @06:55AM (#26397969)
This 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.
Re:`three = 1` in the Linux sourcecode (2014) by ferdek on Tuesday March 09, 2021 @08:04AM (#26398384)