Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require the epsilon value (tolerance) to be specified explicitly, and remove the default #17

Open
brendanzab opened this issue Apr 25, 2017 · 4 comments

Comments

@brendanzab
Copy link
Owner

As @Andlon explains:

I'm not sure if it's actually wise to provide a default epsilon/tolerance - this is the very problem that Bruce Dawson discusses in the randomascii blog I know we've both spent some time reading. The problem with absolute differences is that there is really no sensible default - it depends entirely on the numbers you are comparing.

@Andlon
Copy link

Andlon commented Apr 29, 2017

Note that I was referring explicitly to the absolute difference test for equality in that code, by the way. A default tolerance makes more sense for relative/ulp-based comparison.

@brendanzab
Copy link
Owner Author

Right! Thanks for the clarification.

@brendanzab
Copy link
Owner Author

What do you think a good default epsilon would be for ulps and relative?

@Andlon
Copy link

Andlon commented Apr 30, 2017

Which epsilon do you mean, exactly? The absolute difference for comparing near-zero numbers that Bruce Dawson advocates in his blog, or the tolerance used for comparison with relative error or ULPs respectively?

IIRC, I think the defaults you've already been using in this crate have been fairly sane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants