Skip to content

Commit 737890e

Browse files
committed
fix tol check
1 parent 688290a commit 737890e

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

test/test_chkder.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ program test_chkder
9494
write (nwrite, '(//5x, a//(5x, 5d15.7))') ' ERROR VECTOR', (err(i), i=1, n)
9595

9696
! compare with previously generated solutions:
97-
if (any(abs(solution(nprob) - diff)>tol) .and. &
98-
any(abs((solution(nprob) - diff)/(solution(nprob))) > solution_reltol)) then
97+
if (any(abs(solution(nprob) - diff)>tol .and. &
98+
abs((solution(nprob) - diff)/(solution(nprob))) > solution_reltol)) then
9999
write(nwrite,'(A)') 'Failed case'
100100
write(nwrite, '(//5x, a//(5x, 5d15.7))') 'Expected diff: ', solution(nprob)
101101
write(nwrite, '(/5x, a//(5x, 5d15.7))') 'Computed diff: ', diff

test/test_hybrd.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ program test
8383
factor = ten*factor
8484

8585
! compare with previously generated solutions:
86-
if (any(abs(solution(ic) - x)>tol) .and. &
87-
any(abs((solution(ic) - x)/(solution(ic))) > solution_reltol)) then
86+
if (any(abs( solution(ic) - x)>tol .and. &
87+
abs((solution(ic) - x)/(solution(ic))) > solution_reltol)) then
8888
write(nwrite,'(A)') 'Failed case'
8989
write(nwrite, '(//5x, a//(5x, 5d15.7))') 'Expected x: ', solution(ic)
9090
write(nwrite, '(/5x, a//(5x, 5d15.7))') 'Computed x: ', x

test/test_hybrj.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ program test_hybrj
8787
factor = ten*factor
8888

8989
! compare with previously generated solutions:
90-
if (any(abs(solution(ic) - x)>tol) .and. &
91-
any(abs((solution(ic) - x)/(solution(ic))) > solution_reltol)) then
90+
if (any(abs( solution(ic) - x)>tol .and. &
91+
abs((solution(ic) - x)/(solution(ic))) > solution_reltol)) then
9292
write(nwrite,'(A)') 'Failed case'
9393
write(nwrite, '(//5x, a//(5x, 5d15.7))') 'Expected x: ', solution(ic)
9494
write(nwrite, '(/5x, a//(5x, 5d15.7))') 'Computed x: ', x

test/test_lmder.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ program test
9393
factor = ten*factor
9494

9595
! compare with previously generated solutions:
96-
if (any(abs(solution(ic) - x)>tol) .and. &
97-
any(abs((solution(ic) - x)/(solution(ic))) > solution_reltol)) then
96+
if (any(abs( solution(ic) - x)>tol .and. &
97+
abs((solution(ic) - x)/(solution(ic))) > solution_reltol)) then
9898
write(nwrite,'(A)') 'Failed case'
9999
write(nwrite, '(//5x, a//(5x, 5d15.7))') 'Expected x: ', solution(ic)
100100
write(nwrite, '(/5x, a//(5x, 5d15.7))') 'Computed x: ', x

test/test_lmdif.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ program test
8686
factor = ten*factor
8787

8888
! compare with previously generated solutions:
89-
if (any(abs(solution(ic) - x)>tol) .and. &
90-
any(abs((solution(ic) - x)/(solution(ic))) > solution_reltol)) then
89+
if (any(abs( solution(ic) - x)>tol .and. &
90+
abs((solution(ic) - x)/(solution(ic))) > solution_reltol)) then
9191
write(nwrite,'(A)') 'Failed case'
9292
write(nwrite, '(//5x, a//(5x, 5d15.7))') 'Expected x: ', solution(ic)
9393
write(nwrite, '(/5x, a//(5x, 5d15.7))') 'Computed x: ', x

test/test_lmstr.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ program test
9292
factor = ten*factor
9393

9494
! compare with previously generated solutions:
95-
if (any(abs(solution(ic) - x)>solution_abstol) .and. &
96-
any(abs((solution(ic) - x)/(solution(ic))) > solution_reltol)) then
95+
if (any(abs( solution(ic) - x)>tol .and. &
96+
abs((solution(ic) - x)/(solution(ic))) > solution_reltol)) then
9797
write(nwrite,'(A)') 'Failed case'
9898
write(nwrite, '(//5x, a//(5x, 5d15.7))') 'Expected x: ', solution(ic)
9999
write(nwrite, '(/5x, a//(5x, 5d15.7))') 'Computed x: ', x

0 commit comments

Comments
 (0)