Custom operator for allclose comparison of two real32-valued 1D arrays Uses default relative tolerance of 1e-5 and does not print results
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:) | :: | expect |
The array of expected values |
Did the comparison pass?
function allclose_operator_real32_1d(got, expect) result(test_pass) real(kind=real32), intent(in), dimension(:) :: got !! The array of values to be tested real(kind=real32), intent(in), dimension(:) :: expect !! The array of expected values logical :: test_pass !! Did the comparison pass? test_pass = allclose_real32_1d(got, expect, "unused", 1.0e-05_real32, .false.) end function allclose_operator_real32_1d