Implements round and signif for dual numbers. These are
piecewise constant functions, so the derivative is zero almost everywhere.
# S4 method for class 'dualr'
Math2(x, digits)A dual with the rounded value and zero derivative.
x <- dual_variable(3.14159)
value(round(x, 2)) # 3.14
#> [1] 3.14
deriv(round(x, 2)) # 0 (piecewise constant)
#> [1] 0