rational calculation