I've had to implement unit math recently for CalcuLaTeX [0] and it's given me a lot of appreciation for how difficult it actually is. I've got it almost completely working with SI units but I haven't thought through fractional unit powers yet.
I really should've based it on something like GNU units.