Special {dual}R Documentation

Special Functions of Mathematics

Description

Special mathematical functions related to the beta and gamma.

Usage

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

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

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

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

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

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

## S4 method for signature 'dual'
gamma(x)

## S4 method for signature 'dual'
lgamma(x)

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

## S4 method for signature 'dual'
digamma(x)

## S4 method for signature 'dual'
trigamma(x)

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

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

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

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

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

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

## S4 method for signature 'dual'
factorial(x)

## S4 method for signature 'dual'
lfactorial(x)

Arguments

a

non-negative numeric value or dual object with non-negative real part.

b

non-negative numeric value or dual object with non-negative real part.

x

dual object or numeric value.

deriv

integer value.

n

dual object or numeric value.

k

dual object or numeric value.

Value

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

Examples

x <- dual(0.5, 1)
a <- dual(1.2, 1:0)
b <- dual(2.1, 0:1)

beta(a, b)
beta(1, b)
beta(a, 1)
lbeta(a, b)
lbeta(1, b)
lbeta(a, 1)

gamma(x)
lgamma(x)
psigamma(x, deriv = 0)
digamma(x)
trigamma(x)
psigamma(x, 2)
psigamma(x, 3)


n <- 7.8 + a
k <- 5.6 + b
choose(n, k)
choose(5, k)
choose(n, 2)

lchoose(n, k)
lchoose(5, k)
lchoose(n, 2)

factorial(x)
lfactorial(x)


[Package dual version 0.0.5 Index]