An intelligent calculator