approx_equal {HuraultMisc} | R Documentation |
Approximate equal
Description
Compute whether x and y are approximately equal given a tolerance level
Usage
approx_equal(x, y, tol = .Machine$double.eps^0.5)
x %~% y
Arguments
x |
Numeric scalar. |
y |
Numeric scalar. |
tol |
Tolerance. |
Value
Boolean
Examples
approx_equal(1, 1)
1 %~% (1 + 1e-16)
1 %~% 1.01
[Package HuraultMisc version 1.1.1 Index]