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

TypeIntentOptionalAttributesName
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~approx_ge approx_ge proc~approx_ge->proc~approx_eq proc~approx_le approx_le proc~approx_le->proc~approx_eq proc~npa_gyro_range npa_gyro_range proc~npa_gyro_range->proc~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~grid_intersect grid_intersect proc~circle_grid_intersect->proc~grid_intersect proc~pnpa_mc pnpa_mc proc~pnpa_mc->proc~npa_gyro_range proc~read_mc read_mc proc~read_mc->proc~circle_grid_intersect proc~read_mc->proc~in_grid proc~in_grid->proc~approx_ge proc~in_grid->proc~approx_le proc~pnpa_f pnpa_f proc~pnpa_f->proc~npa_gyro_range proc~in_passive_grid in_passive_grid proc~in_passive_grid->proc~approx_ge proc~in_passive_grid->proc~approx_le proc~npa_mc npa_mc proc~npa_mc->proc~npa_gyro_range proc~npa_f npa_f proc~npa_f->proc~npa_gyro_range program~fidasim fidasim program~fidasim->proc~pnpa_mc program~fidasim->proc~pnpa_f program~fidasim->proc~npa_mc program~fidasim->proc~npa_f proc~read_distribution read_distribution program~fidasim->proc~read_distribution proc~make_diagnostic_grids make_diagnostic_grids program~fidasim->proc~make_diagnostic_grids proc~fida_weights_los fida_weights_los program~fidasim->proc~fida_weights_los proc~ndmc ndmc program~fidasim->proc~ndmc proc~read_distribution->proc~read_mc proc~grid_intersect->proc~in_passive_grid proc~make_diagnostic_grids->proc~grid_intersect proc~mc_nbi mc_nbi proc~mc_nbi->proc~grid_intersect proc~fida_weights_los->proc~grid_intersect proc~ndmc->proc~mc_nbi

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