Skip to content

How to best do fuzzy comparison for floats #5826

Discussion options

You must be logged in to vote

There's no Halide-specific way to handle this. The idioms are similar to C/C++. Depending on what kind of error I'm being robust to, I usually do something like abs(f) < 0.001f

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alexreinking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #5812 on March 19, 2021 16:45.