Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
#33157 fix issue in SR → CBF conversion from #32871
Browse files Browse the repository at this point in the history
  • Loading branch information
mezzarobba committed Jan 13, 2022
1 parent 3832350 commit a995d14
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sage/symbolic/expression.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ from cpython.object cimport Py_EQ, Py_NE, Py_LE, Py_GE, Py_LT, Py_GT

from sage.cpython.string cimport str_to_bytes, char_to_str

from sage.structure.element cimport parent
from sage.structure.element cimport RingElement, Element, Matrix
from sage.structure.element cimport Expression as Expression_abc
from sage.symbolic.complexity_measures import string_length
Expand Down Expand Up @@ -1804,6 +1805,9 @@ cdef class Expression(Expression_abc):
Traceback (most recent call last):
...
TypeError: unable to convert bogus_builtin_function(1) to a ComplexBall
sage: CBF(acos(float(1/4) * sqrt(int(5))))
[0.97759655064526...]
"""
cdef bint progress = False
cdef int i
Expand Down Expand Up @@ -1841,7 +1845,7 @@ cdef class Expression(Expression_abc):
# not bother trying to stay in the real field.
try:
for i in range(len(args)):
if args[i].parent() is not C:
if parent(args[i]) is not C:
progress = True
args[i] = C(args[i])
except (TypeError, ValueError):
Expand Down

0 comments on commit a995d14

Please sign in to comment.