The AHA Model  Revision: 12809
Reference implementation 04 (HEDG02_04)
commondata::is_near_zero Interface Reference

Checks if a real number is near 0.0. Thus function can be used for comparing two real values like this: More...

Collaboration diagram for commondata::is_near_zero:

Public Member Functions

elemental logical function is_near_zero_srp (test_number, epsilon)
 Checks if a real number is near 0.0. Thus function can be used for comparing two real values like the below. More...
 
elemental logical function is_near_zero_hrp (test_number, epsilon)
 Checks if a real number is near 0.0. Thus function can be used for comparing two real values like the below. More...
 

Detailed Description

Checks if a real number is near 0.0. Thus function can be used for comparing two real values like this:

if ( is_near_zero(a) ) then ...

See the backend procedures commondata::is_near_zero_srp() and commondata::is_near_zero_hrp() for details.

Definition at line 5385 of file m_common.f90.

Member Function/Subroutine Documentation

◆ is_near_zero_srp()

elemental logical function commondata::is_near_zero::is_near_zero_srp ( real(srp), intent(in)  test_number,
real(srp), intent(in), optional  epsilon 
)

Checks if a real number is near 0.0. Thus function can be used for comparing two real values like the below.

if ( is_near_zero(a) ) then ...
Note
Note that commondata::float_equal() can be used for approximate real comparisons of two real type values.
Modified from Near0_dp() function from Clerman & Spector 2012, p. 250-251.
This is the standard precision function (commondata::srp).
Parameters
[in]test_numbertest_number the number to check for being near-zero.
[in]epsilonepsilon optional (very small) tolerance value.
Returns
TRUE if the test_number is near-zero.

Definition at line 6202 of file m_common.f90.

◆ is_near_zero_hrp()

elemental logical function commondata::is_near_zero::is_near_zero_hrp ( real(hrp), intent(in)  test_number,
real(hrp), intent(in), optional  epsilon 
)

Checks if a real number is near 0.0. Thus function can be used for comparing two real values like the below.

if ( is_near_zero(a) ) then ...
Note
Note that commondata::float_equal() can be used for approximate real comparisons of two real type values.
Modified from Near0_dp() function from Clerman & Spector 2012, p. 250-251.
This is the high precision function (commondata::hrp).
Parameters
[in]test_numbertest_number the number to check for being near-zero.
[in]epsilonepsilon optional (very small) tolerance value.
Returns
TRUE if the test_number is near-zero.

Definition at line 6232 of file m_common.f90.


The documentation for this interface was generated from the following file: