Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
okl
· 4y ago · 0 comments
Relative tolerance becomes problematic though if your numbers are very close to zero. (
https://randomascii.wordpress.com/2012/02/25/comparing-float...
)
Comments
[–]
adgjlsfhk1
4y ago
Which is why it also lets you specify an absolute tolerance. That's not done by default because there isn't a good way to choose one (unlike with relative tolerance).
[–]
longemen3000
4y ago
yes, it is a common problem, it is acknowledged in the function's documentation:
https://docs.julialang.org/en/v1/base/math/#Base.isapprox