symbolic
symbolic copied to clipboard
isequal of two unit vpa precisions
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.
Upstream issue: https://github.com/sympy/sympy/issues/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).