mirror of
https://github.com/vale981/arb
synced 2025-03-05 17:31:38 -05:00
poly_roots example program: make real roots exactly real
This commit is contained in:
parent
dfc7965898
commit
8567d197d3
1 changed files with 8 additions and 1 deletions
|
@ -47,8 +47,15 @@ poly_roots(const fmpz_poly_t poly,
|
|||
flint_printf("%wd isolated roots | ", isolated);
|
||||
TIMEIT_ONCE_STOP
|
||||
|
||||
if (isolated == deg && check_accuracy(roots, deg, target_prec))
|
||||
if (isolated == deg && check_accuracy(roots, deg, target_prec) &&
|
||||
acb_poly_validate_real_roots(roots, cpoly, prec))
|
||||
{
|
||||
for (i = 0; i < deg; i++)
|
||||
{
|
||||
if (arb_contains_zero(acb_imagref(roots + i)))
|
||||
arb_zero(acb_imagref(roots + i));
|
||||
}
|
||||
|
||||
flint_printf("done!\n");
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue