-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Description
Summary
For algebraic numbers (real roots of polynomials with rational coefficients), extract the
defining polynomial and the index of the root among the polynomial's real roots. Complements
the existing algebraic.rs which has arithmetic operations and comparisons but no way to
recover the underlying polynomial representation.
Z3 APIs
Z3_algebraic_get_poly— extract the minimal polynomial whose root this algebraic number isZ3_algebraic_get_i— get the index of this root among the real roots of its polynomial
(ordered from least to greatest)
Notes
- Both APIs are only meaningful on algebraic (non-rational) values; the high-level API should
returnOptionorResultfor inputs that are rational get_polyreturns coefficients as aVec<Real>(rational constants); the wrapper should
expose this as aVec<ast::Real>- Together these two APIs allow fully reconstructing an algebraic number from its canonical
representation, useful for interoperability with other CAS tools
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels