New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for real algebraic domains in isolation of real polynomial roots #673

Merged
merged 1 commit into from Aug 21, 2018

Conversation

1 participant
@skirpichev
Copy link
Collaborator

skirpichev commented Aug 13, 2018

No description provided.

@skirpichev skirpichev added this to the 0.10 milestone Aug 13, 2018

@skirpichev skirpichev force-pushed the skirpichev:rootisolation-real-algebraics branch from 9a0560e to d2daad0 Aug 14, 2018

@skirpichev skirpichev changed the title [wip] polys: support for real algebraic domains in isolation of real roots Support for real algebraic domains in isolation of real roots Aug 19, 2018

@skirpichev skirpichev changed the title Support for real algebraic domains in isolation of real roots Support for real algebraic domains in isolation of real polynomial roots Aug 19, 2018

@skirpichev skirpichev force-pushed the skirpichev:rootisolation-real-algebraics branch from d2daad0 to 6bc6907 Aug 19, 2018

polys: support for real algebraic domains in isolation of real roots
    In [1]: from diofant.polys.rootisolation import dup_isolate_real_roots_sqf
    In [2]: A = QQ.algebraic_field(sqrt(2))
    In [3]: p = Poly(-x**3 + sqrt(2)*x - 1, x, domain=A)
    In [4]: r = p.rep.rep
    In [5]: dup_isolate_real_roots_sqf(r, A)
    Out[5]: [(-2, -1)]
    In [6]: dup_isolate_real_roots_sqf(r, A, eps=QQ(1, 1000))
    Out[6]:
    ⎡⎛-74   -29 ⎞⎤
    ⎢⎜────, ────⎟⎥
    ⎣⎝ 51    20 ⎠⎦
    In [7]: A.to_expr(dup_isolate_real_roots_sqf(r, A, eps=QQ(1, 1000),
       ...:                                      blackbox=True)[0].center).n(5)
       ...:
    Out[7]: -1.4505
    In [8]: nroots(p.as_expr(), 5)[0]
    Out[8]: -1.4504

dup_root_upper_bound() currently don't support algebraic domains
properly.

@skirpichev skirpichev force-pushed the skirpichev:rootisolation-real-algebraics branch from 6bc6907 to 8e13a2f Aug 20, 2018

@skirpichev skirpichev merged commit fdabee0 into diofant:master Aug 21, 2018

3 checks passed

codecov/patch 100% of diff hit (target 97%)
Details
codecov/project 96% (+<1%) compared to 0b49200
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@skirpichev skirpichev deleted the skirpichev:rootisolation-real-algebraics branch Aug 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment