approx Function

private function approx(x, y, tol) result(is_close)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: x
real(kind=dp), intent(in) :: y
real(kind=dp), intent(in) :: tol

Return Value logical


Contents

Source Code


Source Code

     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