facility to accurately check gradient and currently it is precise beyond 10 decimal points