Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 9
    There is no single, universal, solution that produces ideal results in every possible situation. The epsilon, for each particular comparison, must be carefully chosen based on the individual and specific circumstances of the calculation that produces it. Commented Apr 28, 2022 at 1:12
  • If someone knew about a domain-independent way to generically handle these issues in a way that satisfied everyone, we'd be using it already. It's hard to say if "dozens of ifs" will or won't be required in your case, but you will have to think about what magnitudes you're working with and what precision you need for the computations you're doing; there's no one-size-fits-all solution. Commented Apr 28, 2022 at 1:14
  • Knuth says: stackoverflow.com/a/253874/4641116 Commented Apr 28, 2022 at 1:26