A old odhner calculator logic