Implements all standard mathematical functions for dual numbers via
the chain rule: f(dual(a, b)) = dual(f(a), df(a) * b).
Supported functions: abs, sign, sqrt, floor,
ceiling, trunc, round,
exp, expm1, log, log2, log10, log1p,
cos, sin, tan, cospi, sinpi, tanpi,
acos, asin, atan,
cosh, sinh, tanh, acosh, asinh, atanh,
gamma, lgamma, digamma, trigamma,
cumsum, factorial, lfactorial.
A dual with the function applied to the value and the
derivative propagated via the chain rule.