Skip to content

Commit 50c0639

Browse files
committed
A workaround for possible gfortran bug
See #9 this adds a small tol for the equality comparisons in the test. the atan() function is the only one that isn't exactly equal (on gfortran 11.1.0) workaround for possible gfortran bug See #9 this adds a small tol for the equality comparisons in the test. the atan() function is the only one that isn't exactly equal (on gfortran 11.1.0)
1 parent 8c8d515 commit 50c0639

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/tests.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,8 @@ subroutine compare(expression, truth, parser)
507507
disp_expr = trim(expression)
508508
if (len(disp_expr) > 30) disp_expr = disp_expr(1:26) // ' ...'
509509

510-
if (truth == parser) then
510+
!if (truth == parser) then
511+
if (abs(truth-parser) <= epsilon(1.0_wp)) then
511512
write(*,'(A30,A10,G0)') disp_expr, ' PASSED: ', truth
512513
else
513514
write(*,'(A30,A10,*(G0,1X))') disp_expr, ' FAILED: ', truth , parser

0 commit comments

Comments
 (0)