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

DeepDiff significiant digit 0 is comparing digits after the decimal point #468

Open
IntrinsicEvelyn opened this issue Jun 29, 2024 · 0 comments

Comments

@IntrinsicEvelyn
Copy link

Significant Digits defines the number of digits AFTER the decimal point to be used in the comparison.

When set to 0, it is still comparing after the decimal point.

d1 = 6714795744484.493
d2 = 6714795744484.502

DeepDiff(d1, d2, significant_digits=0)

Out: {'values_changed': {'root': {'new_value': 6714795744484.502,
   'old_value': 6714795744484.493}}}

Expected behavior
Should not compare values after the decimal point and output { }

OS, DeepDiff version and Python version (please complete the following information):

  • OS: Windows
  • Version 10
  • Python Version 3.11.4
  • DeepDiff Version 7.0.1
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

1 participant