log(x, base = exp(1), gradient = FALSE, hessian = FALSE)
log2(x, gradient = FALSE, hessian = FALSE)
log10(x, gradient = FALSE, hessian = FALSE)
Arguments
x
An input value (numeric/complex scalar or vector)
base
The base for the logarithm (a positive scalar value)
gradient
Logical; if TRUE the output will include a 'gradient' attribute
hessian
Logical; if TRUE the output will include a 'hessian' attribute
Value
The logarithm of the input
Details
This version of the logarithm function allows both numeric and complex inputs, including negative numeric values. If the output of the
logarithm has no complex part then the output is given as a numeric value. It also allows the user to generate the gradient and Hessian.