| dual-arithmetic | R Documentation |
Implements arithmetic (+, -, *, /, ^),
comparison (==, !=, <, >, <=, >=),
and logical (&, |) operators. Derivatives follow standard
calculus rules (sum, product, quotient, power, chain).
## S4 method for signature 'dualr,dualr'
e1 + e2
## S4 method for signature 'dualr,numeric'
e1 + e2
## S4 method for signature 'numeric,dualr'
e1 + e2
## S4 method for signature 'dualr,dualr'
e1 - e2
## S4 method for signature 'dualr,numeric'
e1 - e2
## S4 method for signature 'numeric,dualr'
e1 - e2
## S4 method for signature 'dualr,dualr'
e1 * e2
## S4 method for signature 'dualr,numeric'
e1 * e2
## S4 method for signature 'numeric,dualr'
e1 * e2
## S4 method for signature 'dualr,dualr'
e1 / e2
## S4 method for signature 'dualr,numeric'
e1 / e2
## S4 method for signature 'numeric,dualr'
e1 / e2
## S4 method for signature 'dualr,dualr'
e1 ^ e2
## S4 method for signature 'dualr,numeric'
e1 ^ e2
## S4 method for signature 'numeric,dualr'
e1 ^ e2
## S4 method for signature 'dualr,dualr'
Ops(e1, e2)
## S4 method for signature 'dualr,numeric'
Ops(e1, e2)
## S4 method for signature 'numeric,dualr'
Ops(e1, e2)
## S4 method for signature 'dualr,missing'
e1 + e2
## S4 method for signature 'dualr,missing'
e1 - e2
## S4 method for signature 'dualr'
!x
e1, e2 |
Dual or numeric operands. |
x |
A dual number (for unary |
A dual for arithmetic ops; logical for comparisons.
x <- dual_variable(3)
y <- dual_variable(4)
value(x + y)
deriv(x * x)
value(x^2)
deriv(x^2)
x < y
x == y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.