Skip to content

Commit

Permalink
fix for floating point comparison in astronomy test
Browse files Browse the repository at this point in the history
  • Loading branch information
rem1776 authored and rem1776 committed Dec 23, 2024
1 parent 762bff4 commit 6fb53de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test_fms/astronomy/test_astronomy.F90
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,9 @@ subroutine check_answers( results, answers, whoami )
implicit none
real(TEST_AST_KIND_) :: answers, results
character(*) :: whoami
integer, parameter :: lkind = TEST_AST_KIND_

if (results.ne.answers) then
if (abs(results - answers) .gt. 1.0e-10_lkind) then
write(*,*) 'EXPECTED ', answers, ' but computed ', results
call mpp_error(FATAL, trim(whoami))
end if
Expand Down

0 comments on commit 6fb53de

Please sign in to comment.