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/number_field/number_field.py: Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Oct 2, 2021
1 parent 65e9b98 commit a00d97a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sage/rings/number_field/number_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -9947,12 +9947,12 @@ def hilbert_symbol(self, a, b, P = None):
codom = P.codomain()
from sage.rings.complex_interval_field import is_ComplexIntervalField
from sage.rings.all import (AA, QQbar)
if isinstance(codom, (sage.rings.abc.ComplexField, sage.rings.abc.ComplexDoubleField) or is_ComplexIntervalField(codom) or \
if isinstance(codom, (sage.rings.abc.ComplexField, sage.rings.abc.ComplexDoubleField)) or is_ComplexIntervalField(codom) or \
codom is QQbar:
if P(self.gen()).imag() == 0:
raise ValueError("Possibly real place (=%s) given as complex embedding in hilbert_symbol. Is it real or complex?" % P)
return 1
if isinstance(codom, (sage.rings.abc.RealField, sage.rings.abc.RealDoubleField) or codom is AA:
if isinstance(codom, (sage.rings.abc.RealField, sage.rings.abc.RealDoubleField)) or codom is AA:
if P(a) > 0 or P(b) > 0:
return 1
return -1
Expand Down

0 comments on commit a00d97a

Please sign in to comment.