MathFun {salad}R Documentation

Mathematical functions

Description

various mathematical functions and methods

Usage

## S3 method for class 'dual'
exp(x)

## S3 method for class 'dual'
expm1(x)

logNeper(x)

## S3 method for class 'dual'
log(x, base = exp(1))

## S3 method for class 'dual'
log10(x)

## S3 method for class 'dual'
log2(x)

## S3 method for class 'dual'
log1p(x)

## S3 method for class 'dual'
sqrt(x)

## S3 method for class 'dual'
cos(x)

## S3 method for class 'dual'
sin(x)

## S3 method for class 'dual'
tan(x)

## S3 method for class 'dual'
cospi(x)

## S3 method for class 'dual'
sinpi(x)

## S3 method for class 'dual'
tanpi(x)

## S3 method for class 'dual'
acos(x)

## S3 method for class 'dual'
asin(x)

## S3 method for class 'dual'
atan(x)

## S4 method for signature 'dual,dual'
atan2(y, x)

## S4 method for signature 'dual,numericOrArray'
atan2(y, x)

## S4 method for signature 'numericOrArray,dual'
atan2(y, x)

## S3 method for class 'dual'
cosh(x)

## S3 method for class 'dual'
sinh(x)

## S3 method for class 'dual'
tanh(x)

## S3 method for class 'dual'
acosh(x)

## S3 method for class 'dual'
asinh(x)

## S3 method for class 'dual'
atanh(x)

## S3 method for class 'dual'
abs(x)

## S3 method for class 'dual'
sign(x)

## S3 method for class 'dual'
ceiling(x)

## S3 method for class 'dual'
floor(x)

## S3 method for class 'dual'
trunc(x, ...)

## S3 method for class 'dual'
gamma(x)

## S3 method for class 'dual'
lgamma(x)

## S3 method for class 'dual'
digamma(x)

## S3 method for class 'dual'
trigamma(x)

psigamma.dual(x, deriv = 0)

## S4 method for signature 'dual'
psigamma(x, deriv = 0)

## S4 method for signature 'dual,dual'
beta(a, b)

## S4 method for signature 'dual,numericOrArray'
beta(a, b)

## S4 method for signature 'numericOrArray,dual'
beta(a, b)

## S4 method for signature 'dual,dual'
lbeta(a, b)

## S4 method for signature 'dual,numericOrArray'
lbeta(a, b)

## S4 method for signature 'numericOrArray,dual'
lbeta(a, b)

factorial.dual(x)

lfactorial.dual(x)

## S4 method for signature 'dual,numeric'
choose(n, k)

## S4 method for signature 'dual,numeric'
lchoose(n, k)

Arguments

x

function argument (dual or numeric object)

base

base to which log is computed

y

first argument of atan2 function (dual or numeric)

...

extra arguments to trunc (unused)

deriv

integer argument to psigamma

a, b

arguments of beta and lbeta (dual or nueumeric)

n

first argument of choose and lchoose (dual)

k

second argument of choose and lchoose (numeric)

Details

The derivative of 'abs' is set to be the function 'sign', so its derivative in 0 is considered as null. You may want to redefine 'abs' using 'dualFun1' to get an undefined derivative.

Value

All functions return dual objects.

Examples

x <- dual(1)
y <- log(x)
y
d(y)

[Package salad version 1.0 Index]