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

diff: allow tolerance only between floats #183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dbrakman
Copy link

Description

For #181

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Third-party code

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

* Enable and require absolute equality between large integers not
  possible with math.isclose

* Replace num_types usage with consistent behavior among subclasses of
  numbers.Number
@joesolly
Copy link
Contributor

Instead of this change, why don't we set the default tolerance to 1e-int_Max?

@dbrakman
Copy link
Author

dbrakman commented Apr 1, 2024

There is no int_Max: https://docs.python.org/3/whatsnew/3.0.html#integers

Applying any tolerance for integers would impose a guess as to what magnitudes of numbers people are likely to use or what range of values one's test suite can accept. The tolerance parameter's stated goal of allowing floating point imprecision isn't applicable to integers

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 this pull request may close these issues.

2 participants