Definition at line 166 of file math.F90.
|
elemental logical function | dis_close_scalar (x, y, rtol, atol) |
| Are \(x\) and \(y\) equal within a tolerance. More...
|
|
elemental logical function | zis_close_scalar (x, y, rtol, atol) |
| Same as dis_close_scalar for complex numbers. More...
|
|
◆ dis_close_scalar()
elemental logical function math_oct_m::is_close::dis_close_scalar |
( |
real(real64), intent(in) |
x, |
|
|
real(real64), intent(in) |
y, |
|
|
real(real64), intent(in), optional |
rtol, |
|
|
real(real64), intent(in), optional |
atol |
|
) |
| |
|
private |
Are \(x\) and \(y\) equal within a tolerance.
The function evaluates the expression:
\[
|x - y| \leq (atol * rtol) * |y|
\]
The tolerance values are positive, typically very small numbers. The relative difference \((rtol * |y|)\) and the absolute difference \( atol \) are added together to compare against the absolute difference between \(x\) and \(y\). Default tolerances are based on numpy''s [implementation](https:
- Parameters
-
[in] | x | Scalar. |
[in] | y | Scalar. |
[in] | rtol | Optional, relative tolerance. |
[in] | atol | Optional, absolute tolerance. |
- Returns
- is_close .true. if \(x\) and \(y\) are close.
Definition at line 220 of file math.F90.
◆ zis_close_scalar()
elemental logical function math_oct_m::is_close::zis_close_scalar |
( |
complex(real64), intent(in) |
x, |
|
|
complex(real64), intent(in) |
y, |
|
|
real(real64), intent(in), optional |
rtol, |
|
|
real(real64), intent(in), optional |
atol |
|
) |
| |
|
private |
Same as dis_close_scalar for complex numbers.
Definition at line 233 of file math.F90.
The documentation for this interface was generated from the following file: