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

Commit 905e800

Browse files
author
Matthias Koeppe
committed
src/sage/misc/functional.py: Fix imports
1 parent 5952b37 commit 905e800

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/sage/misc/functional.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.gnu.org/licenses/
2222
# ****************************************************************************
2323
import builtins
24+
import math
2425

2526
from sage.rings.complex_double import CDF
2627
from sage.rings.real_double import RDF, RealDoubleElement
@@ -1722,9 +1723,11 @@ def _do_sqrt(x, prec=None, extend=True, all=False):
17221723
"""
17231724
if prec:
17241725
if x >= 0:
1725-
return RealField(prec)(x).sqrt(all=all)
1726+
from sage.rings.real_mpfr import RealField
1727+
return RealField(prec)(x).sqrt(all=all)
17261728
else:
1727-
return ComplexField(prec)(x).sqrt(all=all)
1729+
from sage.rings.complex_mpfr import ComplexField
1730+
return ComplexField(prec)(x).sqrt(all=all)
17281731
if x == -1:
17291732
from sage.symbolic.expression import I
17301733
z = I

0 commit comments

Comments
 (0)