The AHA Model  Revision: 12809
Reference implementation 04 (HEDG02_04)
commondata::operator(.approx.) Interface Reference

"Approximatel equality" operator: Check if two real values are approximately equal using the commondata::is_near_zero() function. Thus function can be used for comparing two real values like the below. More...

Collaboration diagram for commondata::operator(.approx.):

Detailed Description

"Approximatel equality" operator: Check if two real values are approximately equal using the commondata::is_near_zero() function. Thus function can be used for comparing two real values like the below.

  • The exact real comparison (incorrect due to possible rounding):
    if ( a == b ) ...
  • should be substituted by such approximately equal comparison:
    if ( a .approx. b) ...

See the backend procedures commondata::float_approx_srp_operator() and commondata::float_approx_hrp_operator() for details and Float point for an introduction.

Note
This .approx. operator differs from the .feq. by a very high epsilon tolerance, that is, a much higher error (commondata::zero * 1000.0) is tolerated.

Definition at line 5453 of file m_common.f90.


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