Created Dual type to represent dual numbers and added AD test