Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | x | |||
real(kind=dp), | intent(in) | :: | y | |||
real(kind=dp), | intent(in) | :: | tol |
function approx(x,y,tol) result (is_close)
real(dp), intent(in) :: x, y
real(dp), intent(in) :: tol
logical :: is_close
is_close = abs(x-y) < tol
end function approx