Numerical error handling.
Constants:
eps_wp: Working precision machine epsilontol_wp: Tolerance for approximationsProcedures:
ismall: Evaluates the smallness of a variable compared to a reference value.isclose: Evaluates the closeness between two real or complex variables.| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public, | parameter | :: | eps_wp | = | epsilon(1.0_wp) |
Working precision machine epsilon |
| real(kind=wp), | public, | parameter | :: | tol_wp | = | 1.0e-8_wp |
Tolerance for approximations |
Evaluates the closeness between two real or complex variables.
Evaluates the closeness between two real variables.
.true. if a and b are close to each other according to a tolerance, and
.false. otherwise. Tolerance is defined by rel_tol and abs_tol, where
abs_tol is used for comparing values close no zero.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | a | |||
| real(kind=wp), | intent(in) | :: | b | |||
| real(kind=wp), | intent(in), | optional | :: | rel_tol |
Relative tolerance, default= |
|
| real(kind=wp), | intent(in), | optional | :: | abs_tol |
Absolute tolerace, default= |
Evaluates the closeness between two complex variables.
.true. if a and b are close to each other according to a tolerance, and
.false. otherwise. Tolerance is defined by rel_tol and abs_tol, where
abs_tol is used for comparing values close no zero.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=wp), | intent(in) | :: | a | |||
| complex(kind=wp), | intent(in) | :: | b | |||
| real(kind=wp), | intent(in), | optional | :: | rel_tol |
Relative tolerance, default= |
|
| real(kind=wp), | intent(in), | optional | :: | abs_tol |
Absolute tolerace, default= |
Evaluates the smallness of a variable compared to a reference value.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x | |||
| real(kind=wp), | intent(in), | optional | :: | ref |
Reference value, default= |