Learn R Programming

dual (version 0.0.5)

log: Logarithms and Exponentials

Description

Logarithms and Exponentials

Usage

# S4 method for dual
log(x)

# S4 method for dual,numeric logb(x, base = exp(1))

# S4 method for numeric,dual logb(x, base = exp(1))

# S4 method for dual,dual logb(x, base = exp(1))

# S4 method for dual log10(x)

# S4 method for dual log2(x)

# S4 method for dual log1p(x)

# S4 method for dual exp(x)

# S4 method for dual expm1(x)

Value

A dual object containing the transformed values according to the chosen function.

Arguments

x

a dual object or numeric value.

base

a dual object or a positive number. Defaults to e=exp(1).

Examples

Run this code
x <- dual(sqrt(pi), 1:0)
y <- dual(pi * .75, 0:1)
log(x)
logb(x, base = 1.1)
logb(3.1, base = x)

logb(x, y)
log10(x)
log2(x)

log1p(x)

exp(2*x)
expm1(2*x)

Run the code above in your browser using DataLab