03-29-2009 05:31 PM - edited 03-29-2009 05:34 PM
03-30-2009 04:29 PM
I think more information is required to properly optimize this problem.
Does the encoder count as integer? You could increment it by a fixed value of 0.002222222 instead of 1 and get rid of the division, possibly.
Some known inputs and expected outputs would be useful for a proper implementation.
Really, what is the goal of this algorithm and overall use?
More high level information, if possible, about your application would be very useful.