dualnumber
Dual numbers are a simple algebraic extension of a field obtained by adjoining a single nilpotent element ε with ε^2 = 0. A dual number is written as a + bε, where a and b belong to the base field (commonly the real numbers). The set of all dual numbers over F is the quotient ring F[ε]/(ε^2), often denoted F ⊕ Fε, with ε^2 = 0 and ε behaving as an infinitesimal.
Arithmetic in the dual-number system is defined by the usual addition and multiplication, using ε^2 = 0.
Functions extend to dual numbers via a first-order Taylor expansion. If f is differentiable at a, then
Geometrically, dual numbers encode first-order infinitesimals: the base a tracks a point on the real line, while
Dual numbers can be defined over any field and play roles in geometry, numerical analysis, and theoretical