implement forward-mode AD using DualNumbers