Description Usage Arguments Details Value Note Author(s) Examples
Given log(x) and log(y) this function calculates log(x + y) using the identity
# log(x + y) = log(x) + log(1 + exp[log(y) - log(x)])
1 |
x |
Numeric vector or matrix. |
y |
Numeric vector or matrix of same dimensions as |
base |
Base of the logarithm to be used. If |
If y
is missing the function is applied recuresively to all elements of x
, i.e., all
elements of x
are added up. If both x
and y
are given they are added element wise.
If only x
is given a scalar is returned, representing the sum of all elements of x
.
Otherwise a vector or matrix of the same dimensions as x
and y
.
This function is useful for cases where x
and y
cannot be represented accurately by machine numbers
but log(x) and log(y) can.
Peter Humburg
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.