Skip to content

Commit a8021e3

Browse files
committed
Use epsilon() intrinsic
1 parent 8261e8a commit a8021e3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/example_lmder1.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ subroutine fcn(m, n, x, fvec, fjac, ldfjac, iflag)
4343

4444

4545
program example_lmder1
46-
use minpack, only: enorm, dpmpar, lmder1, chkder
46+
use minpack, only: enorm, lmder1, chkder
4747
use testmod_der1, only: dp, fcn
4848
implicit none
4949

@@ -59,7 +59,7 @@ program example_lmder1
5959

6060
! Set tol to the square root of the machine precision. Unless high precision
6161
! solutions are required, this is the recommended setting.
62-
tol = sqrt(dpmpar(1))
62+
tol = sqrt(epsilon(1._dp))
6363

6464
allocate(wa(5*size(x) + size(fvec)))
6565
call lmder1(fcn, size(fvec), size(x), x, fvec, fjac, size(fjac, 1), tol, &

examples/example_lmdif1.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ subroutine fcn(m, n, x, fvec, iflag)
3232

3333

3434
program example_lmdif1
35-
use minpack, only: enorm, dpmpar, lmdif1
35+
use minpack, only: enorm, lmdif1
3636
use testmod_dif1, only: dp, fcn
3737
implicit none
3838

@@ -46,7 +46,7 @@ program example_lmdif1
4646

4747
! Set tol to the square root of the machine precision. Unless high precision
4848
! solutions are required, this is the recommended setting.
49-
tol = sqrt(dpmpar(1))
49+
tol = sqrt(epsilon(1._dp))
5050

5151
m = size(fvec)
5252
n = size(x)

0 commit comments

Comments
 (0)