Permalink
Browse files

Use epsilon() intrinsic

  • Loading branch information...
1 parent 8261e8a commit a8021e3a2d8dca96395081d52713af30f95dde16 @certik committed Feb 25, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 examples/example_lmder1.f90
  2. +2 −2 examples/example_lmdif1.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, &
@@ -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)

0 comments on commit a8021e3

Please sign in to comment.