dual-math2: Math2 group generic for dual numbers

dual-math2R Documentation

Math2 group generic for dual numbers

Description

Implements round and signif for dual numbers. These are piecewise constant functions, so the derivative is zero almost everywhere.

Usage

## S4 method for signature 'dualr'
Math2(x, digits)

Arguments

x

A dual number.

digits

Integer; number of digits for rounding.

Value

A dual with the rounded value and zero derivative.

Examples

x <- dual_variable(3.14159)
value(round(x, 2))
deriv(round(x, 2))


nabla documentation built on Feb. 11, 2026, 1:06 a.m.