gnu-octave / symbolic

A Symbolic Package for Octave using SymPy
https://octave.sourceforge.io/symbolic/
GNU General Public License v3.0
154 stars 36 forks source link

isequal of two unit vpa precisions #1285

Open cbm755 opened 9 months ago

cbm755 commented 9 months ago

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

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

cbm755 commented 8 months ago

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).