NOTE: due to limited precision of the JavaScript data types, rounding errors can occur (e.g. 9 mm -> m).
This is especially significant with very small or very large numbers and with units of volume (l, m³).
((Yes, I know about 'BigDecimal' ; yes, I tried it ; no, it doesn't work properly))