-
-
Notifications
You must be signed in to change notification settings - Fork 654
Closed
Milestone
Description
At the moment, a string is converted complex number with the aid of sage_eval
, however, if the precision of the field is larger than the precision of the RealLiteral
this leads to inconsistent results:
sage: R = ComplexField(57)
....: S = R._real_field()
....: S("-13.59658451496887") == R("-13.59658451496887").real()
True
sage: R("-13.59658451496887*I") == R("-13.59658451496887")*I
False
sage: R("-13.59658451496887*I") == R("0", "-13.59658451496887")
False
sage: R("0", "-13.59658451496887") == R("-13.59658451496887")*I
True
sage: R(-13.59658451496887*I) == R("-13.59658451496887*I")
True
sage: (-13.59658451496887*I).parent()
Complex Field with 54 bits of precision
In #29979, a doctest was marked not tested because of this, which should be reverted once the problem is solved.
Component: coercion
Issue created by migration from https://trac.sagemath.org/ticket/30977