Do we expect many different cases for each calculator? As it stands, I think the logic for this function is fine. I don't see any problem with it.