Check if two complex numbers (64 bits) are close with respect a tolerance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tester_t), | intent(inout) | :: | this |
The tester. |
||
complex(kind=real64), | intent(in) | :: | r1 |
Value to compare. |
||
complex(kind=real64), | intent(in) | :: | c2 |
Value to compare. |
subroutine assert_close_c64(this, r1, c2) class(tester_t), intent(inout) :: this !< The tester. complex(real64), intent(in) :: r1 !< Value to compare. complex(real64), intent(in) :: c2 !< Value to compare. this% n_tests = this% n_tests + 1 if ( abs(r1-c2) > this% tolerance64 ) then this% n_errors = this% n_errors + 1 end if end subroutine assert_close_c64