Hacker News new | ask | show | jobs
by jyounker 24 days ago
From an algebraic standpoint, the answer is clearly f(x) -> [0, 255].

If you don't have f(n * 0) == n * f(0), then all sorts of weird stuff happens. Compare these two:

  For f(x) -> [0, 255] then f(0) + f(0) + f(0) = 3 * 0 = 0

  For f(x) -> [0.5/8,7.5/8] then f(0) + f(0) + f(0) = 3 * 0.5/8 = 1.5/8
Choosing f(x) -> [0, 255] means that if you do a calculation on the x side and you do the same calculation on the f(x) side, then you'll get the same result when you convert from one to the other.

Choosing f(x) -> [0.5/8,7.5/8] breaks the algebraic correspondence.