FORCES
FORtran lib for Comp. Env. Sys.
|
Comparison of real values. More...
Public Member Functions | |
logical elemental pure function | equal_sp (a, b) |
logical elemental pure function | equal_dp (a, b) |
Comparison of real values.
Compares two reals if they are exactly numerically equal or not, i.e. equal:
\[ |\frac{a-b}{b}| < \epsilon \]
Example
Returns ´.false.´ in 5th element of isequal
Returns ´.true.´ in all elements of isequal
Returns ´.false.´ in 6th element of isequal
[in] | real(sp/dp) :: a | First number to compare |
[in] | real(sp/dp) :: b | Second number to compare |
real(sp/dp) :: equal | \( a == b \) logically true or false |
Definition at line 261 of file mo_utils.F90.
logical elemental pure function mo_utils::equal::equal_dp | ( | real(dp), intent(in) | a, |
real(dp), intent(in) | b | ||
) |
Definition at line 996 of file mo_utils.F90.
logical elemental pure function mo_utils::equal::equal_sp | ( | real(sp), intent(in) | a, |
real(sp), intent(in) | b | ||
) |
Definition at line 1008 of file mo_utils.F90.