You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You probably want isapprox (a built-in Julia function)
isapprox(x, y; atol::Real=0, rtol::Real=atol>0 ? 0 : √eps, nans::Bool=false[, norm::Function])
Inexact equality comparison. Two numbers compare equal if their
relative distance or their absolute distance is within tolerance
bounds: isapprox returns true if norm(x-y) <= max(atol,
rtol*max(norm(x), norm(y))). The default atol (absolute tolerance) is
zero and the default rtol (relative tolerance) depends on the types of
x and y. The keyword argument nans determines whether or not NaN values
are considered equal (defaults to false).
For real or complex floating-point values, if an atol > 0 is not
specified, rtol defaults to the square root of eps of the type of x or
y, whichever is bigger (least precise). This corresponds to requiring
equality of about half of the significant digits. Otherwise, e.g. for
integer arguments or if an atol > 0 is supplied, rtol defaults to zero.
This code is working:
But how can I make it work without using tolerance and absolute values?"
The text was updated successfully, but these errors were encountered: