#15519: Wrong enclosing intervals for real algebraic numbers
-----------------------------+----------------------------
   Reporter:  mmezzarobba    |            Owner:
       Type:  defect         |           Status:  new
   Priority:  major          |        Milestone:  sage-6.1
  Component:  number fields  |         Keywords:
  Merged in:                 |          Authors:
  Reviewers:                 |  Report Upstream:  N/A
Work issues:                 |           Branch:
     Commit:                 |     Dependencies:
   Stopgaps:                 |
-----------------------------+----------------------------
 Consider a polynomial with two close roots:
 {{{
 sage: x = polygen(QQ); pol = x^7-2*(10^20*x-1)^2
 sage: pol.roots(RIF)
 [(9.999999999999999999999999999999999999999999999999999999999999999999999?e-21,
   1),
 (1.000000000000000000000000000000000000000000000000000000000000000000001?e-20,
   1),
  (1.14869835499703500680?e8, 1)]
 }}}
 and represent one of these roots as an element of `AA`:
 {{{
 sage: a = AA.polynomial_root(pol, RIF((0.9e-20,1.0e-20)))
 }}}
 Then the upper bound stored internally is smaller than the actual root:
 {{{
 sage: a._descr._interval.upper()
 9.99999999999999946e-21
 }}}
 and indeed we have:
 {{{
 sage: pol(a._descr._interval.lower().exact_rational()).sign()
 -1
 sage: pol(a._descr._interval.lower().exact_rational()).sign()
 -1
 sage: sage: a.n(50)
 ...
 ValueError: Refining interval that does not bound unique root!
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/15519>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to