\(\text{log}\)

You can use the \(\text{log}\) function to calculate the log of a value to any base.

You can use the \log backslash command to insert this function.

The following variants of this function are available:

  • \(\text{complex } \text{log} _ { \text{<base>} } \left ( \text{<value>} \right )\)

The \(\text{<base>}\) parameter indicates the base for the log. The \(\text{<value>}\) parameter represents the value to take the log over.

Note that run-time type conversion allows the result of this function to be assigned to any basic type provided the returned value is compatible with that type.

The example below demonstrates how you can use the \(\text{log}\) function:

\[a = \text{log}_2 65536\]
\[\text{a = 16}\]
\[b = \text{log}_{10} 2\]
\[\text{b = 0.30102999566398119802}\]