Implementation of Gauss-Newton algorithm on D