stdlib_math_all_close.fypp Source File


This file depends on

sourcefile~~stdlib_math_all_close.fypp~~EfferentGraph sourcefile~stdlib_math_all_close.fypp stdlib_math_all_close.fypp sourcefile~stdlib_math.fypp stdlib_math.fypp sourcefile~stdlib_math_all_close.fypp->sourcefile~stdlib_math.fypp sourcefile~stdlib_kinds.fypp stdlib_kinds.fypp sourcefile~stdlib_math.fypp->sourcefile~stdlib_kinds.fypp sourcefile~stdlib_optval.fypp stdlib_optval.fypp sourcefile~stdlib_math.fypp->sourcefile~stdlib_optval.fypp sourcefile~stdlib_optval.fypp->sourcefile~stdlib_kinds.fypp

Contents


Source Code

#:include "common.fypp"
#:set RANKS = range(1, MAXRANK + 1)
#:set RC_KINDS_TYPES = REAL_KINDS_TYPES + CMPLX_KINDS_TYPES

submodule (stdlib_math) stdlib_math_all_close

    implicit none
    
contains

    #:for k1, t1 in RC_KINDS_TYPES
    #:for r1 in RANKS
    logical pure module function all_close_${r1}$_${t1[0]}$${k1}$(a, b, rel_tol, abs_tol, equal_nan) result(close)

        ${t1}$, intent(in) :: a${ranksuffix(r1)}$, b${ranksuffix(r1)}$
        real(${k1}$), intent(in), optional :: rel_tol, abs_tol
        logical, intent(in), optional :: equal_nan

        close = all(is_close(a, b, rel_tol, abs_tol, equal_nan))

    end function all_close_${r1}$_${t1[0]}$${k1}$
    #:endfor
    #:endfor

end submodule stdlib_math_all_close