Stack based reverse polish notation calculator