approx_eq Function

public function approx_eq(x, y, tol) result(a)

Inexact equality comparison: x ~= y true if abs(x-y) <= tol else false

Arguments

Type IntentOptional AttributesName
real(kind=Float64), intent(in) :: x

First value in comparison

real(kind=Float64), intent(in) :: y

Second value in comparison

real(kind=Float64), intent(in) :: tol

Equality tolerance

Return Value logical


Called by

proc~~approx_eq~~CalledByGraph proc~approx_eq approx_eq proc~circle_grid_intersect circle_grid_intersect proc~circle_grid_intersect->proc~approx_eq proc~in_grid in_grid proc~circle_grid_intersect->proc~in_grid proc~npa_gyro_range npa_gyro_range proc~npa_gyro_range->proc~approx_eq proc~approx_le approx_le proc~approx_le->proc~approx_eq proc~approx_ge approx_ge proc~approx_ge->proc~approx_eq proc~read_mc read_mc proc~read_mc->proc~circle_grid_intersect proc~npa_f npa_f proc~npa_f->proc~npa_gyro_range proc~in_grid->proc~approx_le proc~in_grid->proc~approx_ge proc~npa_mc npa_mc proc~npa_mc->proc~npa_gyro_range proc~read_distribution read_distribution proc~read_distribution->proc~read_mc program~fidasim fidasim program~fidasim->proc~npa_f program~fidasim->proc~npa_mc program~fidasim->proc~read_distribution

Contents

Source Code


Source Code

function approx_eq(x,y,tol) result(a)
    !+ Inexact equality comparison: `x ~= y` true if `abs(x-y) <= tol` else false
    real(Float64), intent(in) :: x
        !+First value in comparison
    real(Float64), intent(in) :: y
        !+Second value in comparison
    real(Float64), intent(in) :: tol
        !+Equality tolerance

    logical :: a

    a = abs(x-y).le.tol

end function approx_eq