Floating point numbers need a special treatment due to their storage format.
Some people already made up their minds about those things, thus that we can make use of their findings. See further: - http://www.floating-point-gui.de/errors/comparison/ - https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ - http://www.ssec.wisc.edu/~paulv/Fortran90/Utility/Compare_Float_Numbers.f90.html
Most of this modules code traces back to the work of Paul van Delst, CIMSS/SSEC, paul.vandelst@ssec.wisc.edu
Relational operator to test the equality of floating point numbers.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a | Floating point value to be compared. |
||
real(kind=rk), | intent(in) | :: | b | Floating point value to be compared. |
The result is a logical value indicating whether the operands are equal to within numerical precision.
Relational operator to test the equality of two arrays of floating point numbers.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a(:) | Floating point array to be compared. |
||
real(kind=rk), | intent(in) | :: | b(:) | Floating point array to be compared. |
The result is a logical value indicating whether the operands are equal to within numerical precision.
Relational operator to test the not-equality of floating point numbers.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a | Floating point value to be compared. |
||
real(kind=rk), | intent(in) | :: | b | Floating point value to be compared. |
The result is a logical value indicating whether the operands are not equal to within numerical precision.
Relational operator to test the not-equality of two floating point arrays.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a(:) | Floating point array to be compared. |
||
real(kind=rk), | intent(in) | :: | b(:) | Floating point array to be compared. |
The result is a logical value indicating whether the operands are not equal to within numerical precision.
Relational operator to test if one operand is greater than another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a | Floating point value to be compared. |
||
real(kind=rk), | intent(in) | :: | b | Floating point value to be compared. |
The result is a logical value indicating whether the operand a is greater than b by more than the spacing between representable floating point numbers.
Relational operator to test if one operand is greater than or equal to another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a | Floating point value to be compared. |
||
real(kind=rk), | intent(in) | :: | b | Floating point value to be compared. |
The result is a logical value indicating whether the operand a is greater than or equal to b by more than the spacing between representable floating point numbers.
Relational operator to test if one operand is less than another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a | Floating point value to be compared. |
||
real(kind=rk), | intent(in) | :: | b | Floating point value to be compared. |
The result is a logical value indicating whether the operand a is less than b by more than the spacing between representable floating point numbers.
Relational operator to test if one operand is less than or equal to another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a | Floating point value to be compared. |
||
real(kind=rk), | intent(in) | :: | b | Floating point value to be compared. |
The result is a logical value indicating whether the operand a is less than or equal to b by more than the spacing between representable floating point numbers.
Relational operator to test the equality of floating point numbers.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a | Floating point value to be compared. |
||
real(kind=rk), | intent(in) | :: | b | Floating point value to be compared. |
The result is a logical value indicating whether the operands are equal to within numerical precision.
Relational operator to test the equality of two arrays of floating point numbers.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a(:) | Floating point array to be compared. |
||
real(kind=rk), | intent(in) | :: | b(:) | Floating point array to be compared. |
The result is a logical value indicating whether the operands are equal to within numerical precision.
Relational operator to test the not-equality of floating point numbers.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a | Floating point value to be compared. |
||
real(kind=rk), | intent(in) | :: | b | Floating point value to be compared. |
The result is a logical value indicating whether the operands are not equal to within numerical precision.
Relational operator to test the not-equality of two floating point arrays.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a(:) | Floating point array to be compared. |
||
real(kind=rk), | intent(in) | :: | b(:) | Floating point array to be compared. |
The result is a logical value indicating whether the operands are not equal to within numerical precision.
Relational operator to test if one operand is greater than another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a | Floating point value to be compared. |
||
real(kind=rk), | intent(in) | :: | b | Floating point value to be compared. |
The result is a logical value indicating whether the operand a is greater than b by more than the spacing between representable floating point numbers.
Relational operator to test if one operand is greater than or equal to another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a | Floating point value to be compared. |
||
real(kind=rk), | intent(in) | :: | b | Floating point value to be compared. |
The result is a logical value indicating whether the operand a is greater than or equal to b by more than the spacing between representable floating point numbers.
Relational operator to test if one operand is less than another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a | Floating point value to be compared. |
||
real(kind=rk), | intent(in) | :: | b | Floating point value to be compared. |
The result is a logical value indicating whether the operand a is less than b by more than the spacing between representable floating point numbers.
Relational operator to test if one operand is less than or equal to another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | a | Floating point value to be compared. |
||
real(kind=rk), | intent(in) | :: | b | Floating point value to be compared. |
The result is a logical value indicating whether the operand a is less than or equal to b by more than the spacing between representable floating point numbers.