Skip to content

Commit c775517

Browse files
authored
Refactor value assignment to use sympy_float
1 parent 8dfed0f commit c775517

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mathics/core/atoms.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -628,11 +628,11 @@ def element_order(self) -> tuple:
628628
of an expression. The tuple is ultimately compared lexicographically.
629629
"""
630630

631-
value = self._value
632-
value, prec = float(value), value._prec
631+
sympy_float = self._value
632+
value, prec = float(sympy_float), sympy_float._prec
633633
# For large values, use the sympy.Float value...
634634
if math.isinf(value):
635-
value, prec = self._value, value._prec
635+
return (BASIC_ATOM_NUMBER_ELT_ORDER, sympy_float, 0, 2, prec)
636636

637637
return (BASIC_ATOM_NUMBER_ELT_ORDER, value, 0, 2, prec)
638638

0 commit comments

Comments
 (0)