What I see is that the programmer was making some sort of state machine to take account of all possible cases.  That all cases caused the exact same effect is kind of weird.  Perhaps after much debugging and testing it turned out that setting the value to 1 on each case worked well, and this occured incrementally until all cases were set to 1, not realizing that all cases ended up the same.  That's the only thing I can imagine.  Or else, the setting of 1 on all cases is not actually correct, but only set used while testing; or shouldn't have been "hard-coded", but read from memory or a file or something, as variable input values that would affect the end result depending on the case.Without knowning the original formula that he was trying to implement I can't tell.  I'm too lazy to google for it right now; would you happen to have a link to it at hand?      -dZ.