Logarithmic Functions - Maple Help

Units[Simple]

 ln
 natural logarithmic function in the Simple Units environment
 log
 general logarithmic function in the Simple Units environment
 log10
 common logarithmic function in the Simple Units environment
 log2
 binary logarithmic function in the Simple Units environment

Calling Sequence

 ln(expr) log(expr) log10(expr) log2(expr) log[b](expr) ${\mathrm{log}}_{b}\left(\mathrm{expr}\right)$

Parameters

 expr - algebraic expression b - algebraic expression, the base of the logarithm

Description

 • In the Simple Units environment, any verifications of valid dimensions ignore so-called Unit annotations.
 • In the Simple Units environment, the arguments for the logarithmic functions must be unit-free, and so is the result. If you would like the results to have a unit in the dimension of logarithmic gain, consider using the Standard Units environment.
 • 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.
 • For other properties, see the global function ln.

Examples

Notes:

 – To enter a unit in 2-D Math input, select the unit from the appropriate Units palette. If the unit you want is not there, select $\mathrm{unit}$ and then enter the unit.
 – When you edit a unit, double brackets appear around it.
 > $\mathrm{with}\left(\mathrm{Units}\left[\mathrm{Simple}\right]\right):$

This input results in an error.

 > $\mathrm{ln}\left(5.3\mathrm{Unit}\left(m\right)\right)$

However, the following can be legal: if $a$ has the dimension $\frac{1}{\mathrm{length}}$, then the argument to the $\mathrm{ln}$ function, $a⟦m⟧$, is unit-free.

 > $\mathrm{val}≔\mathrm{ln}\left(a\mathrm{Unit}\left(m\right)\right)$
 ${\mathrm{val}}{≔}{\mathrm{ln}}{}\left({a}{}⟦{m}⟧\right)$ (1)

For example, $\mathrm{diopter}$ is a unit with the dimension $\frac{1}{\mathrm{length}}$.

 > $\mathrm{eval}\left(\mathrm{val},a=7.5\mathrm{Unit}\left(\mathrm{diopter}\right)\right)$
 ${2.014903021}$ (2)

Conversely, if we evaluate at a float value for $a$, then the original error is triggered.

 > $\mathrm{eval}\left(\mathrm{val},a=5.3\right)$

Compatibility

 • The Units[Simple][log2] command was introduced in Maple 2021.