That was actually a mistake in the article. I had exchanged 255 and 256 accidently. It's fixed now (and should hopefully make sense), thanks for the finding :)
EDIT: So uh, as a quick example of where things go REALLY wrong with the first equation - try value=-0.0000001 ;)
EDIT: So uh, as a quick example of where things go REALLY wrong with the first equation - try value=-0.0000001 ;)