An Adaptive Nonlinear Least-Squares Algorithm

NL2SOL is a FORTRAN90 library which implements an adaptive nonlinear least-squares algorithm, by John Dennis, David Gay, Roy Welsch.

NL2SOL assumes that there are NVAR variables X, and MEQN nonlinear "residual functions" F(X), and that the task is to find a solution X which minimizes the Euclidean norm of ||F(X)||.

NL2SOL is ACM TOMS algorithm 573. The original, true, correct version of ACM TOMS 573 is available in the TOMS subdirectory of the NETLIB web site.


NL2SOL is available in a FORTRAN77 version and a FORTRAN90 version.

Related Data and Programs:

BVLS, a FORTRAN90 library which applies least squares methods to solve a linear system for which lower and upper constraints may have been placed on every variable.

DQED, a FORTRAN90 library which solves constrained least squares problems.

MINPACK, a FORTRAN90 library which carries out the least squares minimization of the residual of a set of linear or nonlinear equations.

PRAXIS, a FORTRAN90 library which minimizes a scalar function of several variables.

TEST_OPT, a FORTRAN90 library which defines test problems requiring the minimization of a scalar function of several variables.

TOMS611, a FORTRAN90 library which can be used to seek the minimizer of a scalar functional of multiple variables.


John Dennis, David Gay, Roy Welsch


  1. K M Brown,
    A Quadratically Convergent Newton-like Method Based upon Gaussian Elimination,
    SIAM Journal on Numerical Analysis,
    Volume 6, pages 560-569, 1969.
  2. John Dennis, David Gay, Roy Welsch,
    Algorithm 573:
    An Adaptive Nonlinear Least-Squares Algorithm,
    ACM Transactions on Mathematical Software,
    Volume 7, Number 3, 1981, pages 367-383.
  3. David Gay,
    Computing Optimal Locally Constrained Steps,
    SIAM Journal on Scientific and Statistical Computing,
    Volume 2, Number 2, pages 186-197, 1981.
  4. Philip Gill, Walter Murray,
    Algorithms for the Solution of the Non-linear Least-squares Problem,
    SIAM Journal on Numerical Analysis,
    Volume 15, Number 5, pages 977-991, 1978.
  5. Charles Lawson, Richard Hanson,
    Solving Least Squares Problems,

Source Code:

Examples and Tests:

NL2SOL_PRB1 is a simple test.

NL2SOL_PRB2 is an extensive set of tests.

List of Routines:

You can go up one level to the FORTRAN90 source codes.

Last revised on 01 February 2008.