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

Commit

Permalink
trac 26957 not fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Oct 6, 2020
1 parent f6250c2 commit 3d9551d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/sage/rings/polynomial/real_roots.pyx
Expand Up @@ -3963,6 +3963,28 @@ def real_roots(p, bounds=None, seed=None, skip_squarefree=False, do_logging=Fals
sage: f = 2503841067*x^13 - 15465014877*x^12 + 37514382885*x^11 - 44333754994*x^10 + 24138665092*x^9 - 2059014842*x^8 - 3197810701*x^7 + 803983752*x^6 + 123767204*x^5 - 26596986*x^4 - 2327140*x^3 + 75923*x^2 + 7174*x + 102
sage: len(real_roots(f,seed=1))
13
Checks for :trac:`26955` and :trac:`26957`::
sage: l = [1, 0, 3, 2, -1, 0, 1, 2, -2, 0, 0, 27, 1, -1, -1, 1,
....: 1, 0, -2, 1, 1, 1, -2, 0, -176, -3, -1, 116, 2, -1,
....: 0, 0, -2, 8, 8, 34, 3, 1, 0, -1, -6, 1]
sage: p = ZZ['x'](l)
sage: len(p.roots(AA))
?
....: l = [-1, 7, -2, 6, -1, -16, 1, 3, -1, -1, -6, 10, 1, -3,
....: 3, 1, 10, -1, 0, 1, 1, 1, 0, -1, 1, 4, -1, 1, 1, 158, -12,
....: -1, 1, -1, 1, 1, 1, 3, 0, 2, 0, 2, -1, -1, 1, -1, 3, 1]
sage: p = ZZ['x'](l)
sage: len(p.roots(AA))
?
sage: l = [1, -1, 0, 1, 0, 1, -14, 6, 1, 12, 0, 2, -4, 0, -1, 0, 0,
....: -1188, -12, 1, 1 -6, -1, -1, 18, 0, -1, 15, 0, 1, 1, -1,
....: 1, 1, 2, -1, -8, -2, -2, 2, 1, -1, 4, 0,
....: -2, -2, 122, 0, 0, 1, -1, -1, 2, 0, 0, -1, -2, 1]
sage: p = ZZ['x'](l)
sage: len(p.roots(AA))
6
"""
base = p.base_ring()

Expand Down

0 comments on commit 3d9551d

Please sign in to comment.