A simple forward AD implementation in C++ using dual numbers.