API and utility for arithmetic manipulation of units of physical quantities