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

Commit

Permalink
src/sage/rings/real_double.pyx: Use sage.rings.abc
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Oct 23, 2021
1 parent 6dce213 commit 7e8f0bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sage/rings/real_double.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,7 @@ cdef class RealDoubleField_class(sage.rings.abc.RealDoubleField):
if S is ZZ or S is QQ or S is RLF:
return ToRDF(S)

from .real_mpfr import RR, RealField_class
if isinstance(S, RealField_class):
if isinstance(S, sage.rings.abc.RealField):
if S.prec() >= 53:
return ToRDF(S)
else:
Expand All @@ -373,6 +372,7 @@ cdef class RealDoubleField_class(sage.rings.abc.RealDoubleField):
else:
return None

from .real_mpfr import RR
connecting = RR._internal_coerce_map_from(S)
if connecting is not None:
return ToRDF(RR) * connecting
Expand Down

0 comments on commit 7e8f0bb

Please sign in to comment.