are_approx_eq Interface

public interface are_approx_eq

Compare two a and b and see if the magnitude of their difference is smaller than a tolerance, taking machine epsilon*max(|a|,|b|) for their precision as the default value


Module Procedures

private pure elemental module function are_approx_eqz(a, b, tol) result(res)

Comparre two a and b and see if magnitude of their difference is smaller than a tolerance, taking machine epsilon for their precision as the default value

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: a
complex(kind=dp), intent(in) :: b
real(kind=dp), intent(in), optional :: tol

Return Value logical

private pure elemental module function are_approx_eqr(a, b, tol) result(res)

Comparre two a and b and see if magnitude of their difference is smaller than a tolerance, taking machine epsilon for their precision as the default value

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: a
real(kind=dp), intent(in) :: b
real(kind=dp), intent(in), optional :: tol

Return Value logical