Arithmetic | R Documentation |
Arithmetic operators for objects of class 'dual'
## S4 method for signature 'dual,dual'
e1 + e2
## S4 method for signature 'dual,numericOrArray'
e1 + e2
## S4 method for signature 'numericOrArray,dual'
e1 + e2
## S4 method for signature 'dual,missing'
e1 + e2
## S4 method for signature 'dual,dual'
e1 - e2
## S4 method for signature 'dual,missing'
e1 - e2
## S4 method for signature 'dual,numericOrArray'
e1 - e2
## S4 method for signature 'numericOrArray,dual'
e1 - e2
## S4 method for signature 'dual,dual'
e1 * e2
## S4 method for signature 'dual,numeric'
e1 * e2
## S4 method for signature 'numeric,dual'
e1 * e2
## S4 method for signature 'dual,numeric'
e1 / e2
## S4 method for signature 'numeric,dual'
e1 / e2
## S4 method for signature 'dual,dual'
e1 / e2
## S4 method for signature 'dual,numeric'
e1 ^ e2
## S4 method for signature 'numeric,dual'
e1 ^ e2
## S4 method for signature 'dual,dual'
e1 ^ e2
e1 |
object of class 'dual' or 'numeric' |
e2 |
object of class 'dual' or 'numeric' |
The usual operations are performed, with appropriate propagation of the derivatives
An object of class 'dual'.
x <- dual( c(1,2) )
a <- 2 * x + 3
a
d(a)
b <- x[1] + 3*x[2]
b
d(b)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.