cached arithmetic