unitconsistent
Unitconsistent refers to the property of numerical computations where the units of quantities are managed so that operations produce meaningful, physically coherent results. In unitconsistent systems, units are treated as integral parts of data, and computations enforce dimensional compatibility. This often means that addition and subtraction are allowed only between quantities with identical units, while multiplication and division combine units according to defined rules to yield derived units.
The primary goal of unitconsistency is to prevent errors that arise from mixing incompatible units, such as
Implementation approaches vary. Some systems use strong typing to embed units into the type system, enabling
Challenges include managing derived or compound units (square meters, newton-meters), handling non-linear conversions, and balancing the