Open
Milestone
Description
A constant built from radicals currently reaches 0 by evaluation. It is computed to 100 digits, and downcasting takes any residual under 1e-50 as 0 (measured on #2143). So a check that answers 0 cannot tell an identity from a near miss. For example, take 8y^3 + 4y^2 - 4y - 1 at the Cardano root for cos(2pi/7):
- as written, it simplifies to
0; - with one
7changed to7 + 10^(-50), it also simplifies to0, although its value is2.48e-52 - 3.26e-52 i.
#1019 removes downcasting in v3. A constant like this one then no longer reaches 0 at all, and two things depend on it reaching 0 today:
GroebnerSystemSolver.Satisfiesaccepts a candidate root whenInnerSimplifiedcomes out0(A root check says what it tolerates: zero to about fifty digits #2163).- The trigonometric table's radical entries, such as the one
sin(pi/7)is rewritten into, are checked only numerically, byTrigTest, to about 97 digits.
Proposal: decide e = 0 exactly for an algebraic e, in two steps:
- Compute a polynomial that
eis a root of, from the polynomials that define its radicals, as SymPy'sminimal_polynomialdoes. - If
0is one of that polynomial's roots, decide whethereis that root, using an isolating interval from the interval evaluator (The integrator's sampled-point checks evaluate in intervals, which read no setting #1497).
For sin(pi/7), the steps are the four in the answer on #2143.
References: Algebraic number, Minimal polynomial (field theory).
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsTodo
Activity