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

approxEquals with relative tolerance #214

Open
nightscape opened this issue Nov 8, 2017 · 3 comments · May be fixed by #215
Open

approxEquals with relative tolerance #214

nightscape opened this issue Nov 8, 2017 · 3 comments · May be fixed by #215

Comments

@nightscape
Copy link
Contributor

In many cases, relative tolerances for approximate comparisons are more useful than absolute ones.
If e.g. my DataFrame contains some numbers in the range of 1.0E10 and some in 1.0E-10 I would have to set a high absolute tolerance which would miss differences in the small numbers.

If that is OK, I would create a PR that either adds a second relativeTol parameter with default value, which gets only used if tol == 0.0 or create a different set of methods altogether.

@holdenk
Copy link
Owner

holdenk commented Nov 8, 2017

I think this would be a great addition. I’d just add it as another param rather than whole new methods personally.

@nightscape
Copy link
Contributor Author

Ok. I think I can add that parameter without breaking source compatibility, but it will probably break binary compatibility.
Is that something to worry about?

@holdenk
Copy link
Owner

holdenk commented Nov 9, 2017 via email

nightscape added a commit to nightscape/spark-testing-base that referenced this issue Nov 9, 2017
nightscape added a commit to nightscape/spark-testing-base that referenced this issue Nov 9, 2017
nightscape added a commit to nightscape/spark-testing-base that referenced this issue Nov 9, 2017
@nightscape nightscape linked a pull request Nov 9, 2017 that will close this issue
nightscape added a commit to nightscape/spark-testing-base that referenced this issue Oct 11, 2018
nightscape added a commit to nightscape/spark-testing-base that referenced this issue May 10, 2019
nightscape added a commit to nightscape/spark-testing-base that referenced this issue Dec 29, 2019
nightscape added a commit to nightscape/spark-testing-base that referenced this issue May 19, 2020
nightscape added a commit to nightscape/spark-testing-base that referenced this issue Dec 11, 2021
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

Successfully merging a pull request may close this issue.

2 participants