There are a number of scientific calculators that actually do a pretty good job at this, and they’re dirt cheap to boot.