This method replaces the numbers by truncated power series of degree 1, also known as dual numbers.
This kind of computation with infinitesimals is easy to implement analogous to the computation with complex numbers.