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

Commit

Permalink
sage.{modular,quadratic_forms}: Fix up replacement of is_{Real,Comple…
Browse files Browse the repository at this point in the history
…x}[Double]Field
  • Loading branch information
Matthias Koeppe committed Oct 2, 2021
1 parent e82709c commit 1d29569
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/sage/modular/dirichlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ def _pari_init_(self):

# now compute the input for pari (list of exponents)
P = self.parent()
if isinstance(P.base_ring(, sage.rings.abc.ComplexField)):
if isinstance(P.base_ring(), sage.rings.abc.ComplexField):
zeta = P.zeta()
zeta_argument = zeta.argument()
v = [int(x.argument() / zeta_argument) for x in values_on_gens]
Expand Down Expand Up @@ -2138,7 +2138,7 @@ def element(self):
"""
P = self.parent()
M = P._module
if isinstance(P.base_ring(, sage.rings.abc.ComplexField)):
if isinstance(P.base_ring(), sage.rings.abc.ComplexField):
zeta = P.zeta()
zeta_argument = zeta.argument()
v = M([int(round(x.argument() / zeta_argument))
Expand Down
4 changes: 2 additions & 2 deletions src/sage/quadratic_forms/special_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from sage.combinat.combinat import bernoulli_polynomial
from sage.misc.functional import denominator
from sage.rings.all import RealField
from sage.arith.all import kronecker_symbol, bernoulli, factorial, fundamental_discriminant
from sage.rings.infinity import infinity
from sage.rings.integer_ring import ZZ
Expand Down Expand Up @@ -278,9 +277,10 @@ def quadratic_L_function__numerical(n, d, num_terms=1000):
....: print("Oops! We have a problem at d = {}: exact = {}, numerical = {}".format(d, RR(quadratic_L_function__exact(1, d)), RR(quadratic_L_function__numerical(1, d))))
"""
# Set the correct precision if it is given (for n).
if isinstance(n.parent(, sage.rings.abc.RealField)):
if isinstance(n.parent(), sage.rings.abc.RealField):
R = n.parent()
else:
from sage.rings.real_mpfr import RealField
R = RealField()

if n < 0:
Expand Down

0 comments on commit 1d29569

Please sign in to comment.