Skip to content

Commit 51e21e7

Browse files
committed
Fix primes_of_bounded_norm for noninteger entries
1 parent 7888c42 commit 51e21e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sage/rings/number_field/number_field.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3932,6 +3932,8 @@ def primes_of_bounded_norm(self, B):
39323932
Fractional ideal (3)]
39333933
sage: K.primes_of_bounded_norm(1)
39343934
[]
3935+
sage: K.primes_of_bounded_norm(1.1)
3936+
[]
39353937
sage: x = polygen(QQ, 'x')
39363938
sage: K.<a> = NumberField(x^3 - 2)
39373939
sage: P = K.primes_of_bounded_norm(30)
@@ -3951,7 +3953,7 @@ def primes_of_bounded_norm(self, B):
39513953
B = ZZ(B)
39523954
except (TypeError, AttributeError):
39533955
try:
3954-
B = ZZ(B.ceil())
3956+
B = ZZ(B.floor())
39553957
except (TypeError, AttributeError):
39563958
raise TypeError("%s is not valid bound on prime ideals" % B)
39573959
if B < 2:

0 commit comments

Comments
 (0)