The AHA Model
Revision: 12809
Reference implementation 04 (HEDG02_04)
|
Check if two real values are nearly equal using the commondata::is_near_zero(). Thus function can be used for comparing two real values like this: More...
Public Member Functions | |
elemental logical function | float_equal_srp (value1, value2, epsilon) |
Check if two real values are nearly equal using the commondata::is_near_zero(). Thus function can be used for comparing two real values like the below. The exact comparison (incorrect due to possible rounding): More... | |
elemental logical function | float_equal_hrp (value1, value2, epsilon) |
Check if two real values are nearly equal using the commondata::is_near_zero(). Thus function can be used for comparing two real values like the below. The exact comparison (incorrect due to possible rounding): More... | |
Check if two real values are nearly equal using the commondata::is_near_zero(). Thus function can be used for comparing two real values like this:
See the backend procedures commondata::float_equal_srp() and commondata::float_equal_hrp() for details.
Definition at line 5406 of file m_common.f90.
elemental logical function commondata::float_equal::float_equal_srp | ( | real(srp), intent(in) | value1, |
real(srp), intent(in) | value2, | ||
real(srp), intent(in), optional | epsilon | ||
) |
Check if two real values are nearly equal using the commondata::is_near_zero(). Thus function can be used for comparing two real values like the below. The exact comparison (incorrect due to possible rounding):
should be substituted by such comparison:
There is also a user defined operator .feq.
for approximate float point equality. It differs from this function in that the later allows to set an arbitrary epsilon tolerance value whereas the operator does not (it uses the default epsilon based on the intrinsic tiny()
function.
[in] | value1 | value1 The first value for comparison. |
[in] | value2 | value2 The second value for comparison. |
[in] | epsilon | epsilon optional (very small) tolerance value. |
value1
and value2
are nearly equal. Definition at line 6268 of file m_common.f90.
elemental logical function commondata::float_equal::float_equal_hrp | ( | real(hrp), intent(in) | value1, |
real(hrp), intent(in) | value2, | ||
real(hrp), intent(in), optional | epsilon | ||
) |
Check if two real values are nearly equal using the commondata::is_near_zero(). Thus function can be used for comparing two real values like the below. The exact comparison (incorrect due to possible rounding):
should be substituted by such comparison:
There is also a user defined operator .feq.
for approximate float point equality. It differs from this function in that the later allows to set an arbitrary epsilon tolerance value whereas the operator does not (it uses the default epsilon based on the intrinsic tiny()
function.
[in] | value1 | value1 The first value for comparison. |
[in] | value2 | value2 The second value for comparison. |
[in] | epsilon | epsilon optional (very small) tolerance value. |
value1
and value2
are nearly equal. Definition at line 6306 of file m_common.f90.