verify/units - Maple Programming Help

Home : Support : Online Help : Science and Engineering : Units : Verifications : verify/units

verify/units

verify the equality of two expressions with units

 Calling Sequence verify(expr1, expr2, units) verify(expr1, expr2, units(ver))

Parameters

 expr1, expr2 - anything, assumed to be of type algebraic ver - (optional) verification to be used

Description

 • The verify(expr1, expr2, units) and verify(expr1, expr2, units(ver)) calling sequences check if both expr1 and expr2 are multiplied by Unit objects with the same dimension, in which case, each object is converted to the default system of units, the units are removed, and the results are compared with evalb or the verification ver if specified.
 • If this conversion cannot be done, no change is made to the arguments expr1 or expr2 before they are compared.
 • If either expr1 or expr2 is not of type algebraic, then false is returned.

Examples

 > $\mathrm{with}\left(\mathrm{Units}\right):$
 > $\mathrm{verify}\left(3\mathrm{Unit}\left('\mathrm{ft}'\right),\mathrm{Unit}\left('m'\right),'\mathrm{less_than}'\right)$
 ${\mathrm{FAIL}}$ (1)
 > $\mathrm{verify}\left(3\mathrm{Unit}\left('\mathrm{ft}'\right),\mathrm{Unit}\left('m'\right),\mathrm{units}\left('\mathrm{less_than}'\right)\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{verify}\left(10\mathrm{Unit}\left(\frac{'\mathrm{lb}''\mathrm{ft}'}{'s'}\right),\mathrm{Unit}\left(\frac{'\mathrm{tonne}''m'}{'h'}\right),\mathrm{units}\left('\mathrm{less_than}'\right)\right)$
 ${\mathrm{false}}$ (3)