Gradient Verification via Finite Difference Approximation - Coding problem | OneNoughtOne