Logic of Calculations