Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use epsilon() intrinsic

  • Loading branch information...
commit a8021e3a2d8dca96395081d52713af30f95dde16 1 parent 8261e8a
@certik authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 examples/example_lmder1.f90
  2. +2 −2 examples/example_lmdif1.f90
View
4 examples/example_lmder1.f90
@@ -43,7 +43,7 @@ subroutine fcn(m, n, x, fvec, fjac, ldfjac, iflag)
program example_lmder1
-use minpack, only: enorm, dpmpar, lmder1, chkder
+use minpack, only: enorm, lmder1, chkder
use testmod_der1, only: dp, fcn
implicit none
@@ -59,7 +59,7 @@ program example_lmder1
! Set tol to the square root of the machine precision. Unless high precision
! solutions are required, this is the recommended setting.
-tol = sqrt(dpmpar(1))
+tol = sqrt(epsilon(1._dp))
allocate(wa(5*size(x) + size(fvec)))
call lmder1(fcn, size(fvec), size(x), x, fvec, fjac, size(fjac, 1), tol, &
View
4 examples/example_lmdif1.f90
@@ -32,7 +32,7 @@ subroutine fcn(m, n, x, fvec, iflag)
program example_lmdif1
-use minpack, only: enorm, dpmpar, lmdif1
+use minpack, only: enorm, lmdif1
use testmod_dif1, only: dp, fcn
implicit none
@@ -46,7 +46,7 @@ program example_lmdif1
! Set tol to the square root of the machine precision. Unless high precision
! solutions are required, this is the recommended setting.
-tol = sqrt(dpmpar(1))
+tol = sqrt(epsilon(1._dp))
m = size(fvec)
n = size(x)
Please sign in to comment.
Something went wrong with that request. Please try again.