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

isequal of two unit vpa precisions #1285

Open
cbm755 opened this issue Jan 6, 2024 · 1 comment · Fixed by #1291
Open

isequal of two unit vpa precisions #1285

cbm755 opened this issue Jan 6, 2024 · 1 comment · Fixed by #1291
Milestone

Comments

@cbm755
Copy link
Collaborator

cbm755 commented Jan 6, 2024

I think the isequal behaviour has changed between SymPy 1.12 and the main branch.

With SymPy 1.13.dev:

>> isequal (vpa (1, 16), vpa (1, 32))
ans = 0

But on 1.12:

>> isequal (vpa (1, 64), vpa (1, 32))
ans = 1

In both cases:

>> vpa (1, 32) == vpa (1, 64)
ans = (sym) True
  • what is correct?
  • what has changed upstream?
  • we should add unit tests for whatever we prefer here.

Related: logspace is failing a test b/c of this.

cbm755 added a commit that referenced this issue Jan 28, 2024
Just get tests passing on recent SymPy, not really a fix yet (?).  See
Issue #1285.
@cbm755 cbm755 modified the milestones: 3.2.0, 3.3.0 Jan 28, 2024
@cbm755
Copy link
Collaborator Author

cbm755 commented Jan 29, 2024

Upstream issue: sympy/sympy#26146

Looks like their intention is that Float(1, 32) would not equal to Float(1, 64). Good.

(our == is more like SymPy Eq IIRC).

cbm755 added a commit that referenced this issue Jan 29, 2024
Related to Issue #1285, linked to the xtest.  Probably waiting on
upstream fix.
@cbm755 cbm755 modified the milestones: 3.2.0, 3.4.0 Jan 29, 2024
@cbm755 cbm755 reopened this Jan 29, 2024
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.

1 participant