# HG changeset patch
# User Craig Citro <craigcitro@gmail.com>
# Date 1232716498 28800
# Node ID daa90769ff1093afc4e69d5331032b7b26d8c10f
# Parent f8fb0bf3e547d65a0f90f5b27d543c8cf4ca9da0
Fix numerical noise in complex_roots (trac #5026).
diff -r f8fb0bf3e547 -r daa90769ff10 sage/rings/polynomial/complex_roots.py
a
|
b
|
|
268 | 268 | sage: complex_roots(x^5 - x - 1) |
269 | 269 | [(1.167303978261419?, 1), (0.181232444469876? + 1.083954101317711?*I, 1), (0.181232444469876? - 1.083954101317711?*I, 1), (-0.764884433600585? + 0.352471546031727?*I, 1), (-0.764884433600585? - 0.352471546031727?*I, 1)] |
270 | 270 | sage: complex_roots(x^2 + 27*x + 181) |
271 | | [(-14.61803398874990?..., 1), (-12.38196601125010? + 0.?e-27*I, 1)] |
| 271 | [(-14.61803398874990?..., 1), (-12.3819660112501...? + 0.?e-27*I, 1)] |
272 | 272 | |
273 | 273 | sage: K.<im> = NumberField(x^2 + 1) |
274 | 274 | sage: eps = 1/2^100 |