Arithmetic {dual} | R Documentation |
Arithmetic Operators
Description
These unary and binary operators perform arithmetic on dual objects.
Usage
## S4 method for signature 'dual,missing'
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,missing'
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
## 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
Arguments
e1 |
dual object or numeric value. |
e2 |
dual object or numeric value. |
Value
The correspondent values of the arithmetic operation on e1
and e2
is returned.
Examples
x <- dual(1.5, 1:0)
y <- dual(2.6, 0:1)
+x
-x
x - y
x * y
x / y
x ^ y
x + y
[Package dual version 0.0.5 Index]