Custom operator for isclose comparison of two real64 values Uses default relative tolerance of 1e-5 and does not print results
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | got |
The value to be tested |
||
| real(kind=real64), | intent(in) | :: | expect |
The expected value |
Did the comparison pass?
function isclose_operator_real64(got, expect) result(test_pass) real(kind=real64), intent(in) :: got !! The value to be tested real(kind=real64), intent(in) :: expect !! The expected value logical :: test_pass !! Did the comparison pass? test_pass = isclose_real64(got, expect, "unused", 1.0e-05_real64, .false.) end function isclose_operator_real64