log | R Documentation |
log
returns the logarithm of the input
log(x, base = exp(1), gradient = FALSE, hessian = FALSE) log2(x, gradient = FALSE, hessian = FALSE) log10(x, gradient = FALSE, hessian = FALSE)
x |
An input value (numeric/complex scalar or vector) |
base |
The base for the logarithm (a positive scalar value) |
gradient |
Logical; if |
hessian |
Logical; if |
The logarithm function in base R
accomodates complex numbers but it does not accomodate negative values (which is strange). The
pressent version of the logarithm function allows both numeric and complex inputs, including negative numeric values. For negative inputs
this function gives the princpal complex logarithm of the input value. If the output of the logarithm has no complex part then the output
is given as a numeric value. This function also allows the user to generate the gradient and Hessian.
The logarithm of the input
log(1) log(-1) log10(-10, TRUE, TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.