dual (version 0.0.5)

MathFun: Miscellaneous Mathematical Functions

Description

The function abs(x) computes the absolute value of x, while sqrt(x) computes the square root of x.

Usage

# S4 method for dual
sqrt(x)

# S4 method for dual abs(x)

Value

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

Arguments

x

a dual object or numeric value.

Examples

Run this code
x <- dual(4.3, 1:0)
y <- dual(7.6, 0:1)
abs(-2.2 * x + 0.321 * y)
sqrt(y - x)

Run the code above in your browser using DataLab