Test two floating-point values for approximate equality.
Returns .true. when
abs(a - b) <= max(rtol*max(abs(a), abs(b)), atol).
The relative tolerance rtol defaults to sqrt(epsilon) for the
working kind and the absolute tolerance atol defaults to 0; both
are optional. Supported kinds are real(sp) and real(dp).
Usage: flag = is_close(a, b [, rtol] [, atol])
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Module Procedures
private elemental function is_close_sp(a, b, rtol, atol) result(flag)
Approximate equality for real(sp) values.
Arguments
Type
Intent
Optional
Attributes
Name
real(kind=sp),
intent(in)
::
a
real(kind=sp),
intent(in)
::
b
real(kind=sp),
intent(in),
optional
::
rtol
real(kind=sp),
intent(in),
optional
::
atol
Return Value
logical
private elemental function is_close_dp(a, b, rtol, atol) result(flag)