Overloaded Functions in the Simple Units Environment

Description

 • In the Simple Units environment, any verifications of valid dimensions ignore so-called Unit annotations.
 • In the Simple Units environment, some functions are overloaded with functions that remove units from their primary arguments, call the appropriate global function, and then multiply the result by the unit. For some other functions, the global version of this function already provides this functionality.
 The primary argument can be the first argument, as in factor((3*x-3*x^2)*Unit('m')) or a subsequent argument, such as abs(1, 3.3213*Unit('m')) where the first argument is used to denote the derivative.
 • These are the functions overloaded by the Units:-Simple package that work in this manner:

 argument collect combine evalc evalr factor shake

 • Some of the functions that do the same, regardless of whether the Units:-Simple package is loaded, are abs, expand, and floor.
 • When the Units:-Simple package is loaded, many other functions are overloaded with functionality that does more than just the process outlined above. For example, the arithmetic operators, which verify and generally combine units, and some mathematical functions, which verify that their argument is unit-free.
 • Every command in the Simple Units environment that needs to determine whether an expression is valid or not, does so using the Units:-TestDimensions command.
 Note: Prior to Maple 2015, units were displayed surrounded by double brackets.

Examples

 > $\mathrm{with}\left(\mathrm{Units}\left[\mathrm{Simple}\right]\right):$
 > $3\mathrm{Unit}\left('W'\right)x\left(1-x\right)$
 ${3}{}{x}{}\left({1}{-}{x}\right){}⟦{W}⟧$ (1)
 > $\mathrm{expand}\left(\right)$
 $\left({-}{3}{}{{x}}^{{2}}{+}{3}{}{x}\right){}⟦{W}⟧$ (2)
 > $\mathrm{factor}\left(\right)$
 ${-}{3}{}{x}{}\left({x}{-}{1}\right){}⟦{W}⟧$ (3)
 > $\mathrm{assume}\left(0
 > $2\mathrm{ln}\left(y\right)\mathrm{Unit}\left('m'\right)-\mathrm{ln}\left(z\right)\mathrm{Unit}\left('\mathrm{ft}'\right)$
 $\left({2}{}{\mathrm{ln}}{}\left({\mathrm{y~}}\right){-}\frac{{381}{}{\mathrm{ln}}{}\left({\mathrm{z~}}\right)}{{1250}}\right){}⟦{m}⟧$ (4)
 > $\mathrm{combine}\left(,\mathrm{ln}\right)$
 ${\mathrm{ln}}{}\left(\frac{{{\mathrm{y~}}}^{{2}}}{{{\mathrm{z~}}}^{\frac{{381}}{{1250}}}}\right){}⟦{m}⟧$ (5)