Equalities and Inequalities in the Natural Units Environment
Description
In the Natural Units environment, the equality and inequality operators (=, <, <=, >, >=, and <>) are modified so that they perform the necessary operations on expressions with units.
The properties of the five arithmetic operations are:
A⁢a=B⁢b−>A=r⁢B
A⁢a<B⁢b−>A<r⁢B
A⁢a<=B⁢b−>A<=r⁢B
A⁢a>B⁢b−>A>r⁢B
A⁢a>=B⁢b−>A>=r⁢B
A⁢a<>B⁢b−>A<>r⁢B
where a and b are units; A and B are coefficients; and r is the conversion factor from the unit b to the unit a.
with(Units[Natural]):
3*ft=yd;
3=3
evalb((1));
true
1.60*m < mi;
1.60<201168125
evalb((3));
30.48*cm = ft;
30.48=76225
evalb((5));
3 * ft + 3*`in` = m;
49535000=1
evalb((7));
false
See Also
equalities and inequalities
Units
Units/Natural
Download Help Document