A simple program that calculates X when the gradient function is equal to (or close enough to) 0