#15519: [invalid, was: Wrong enclosing intervals for real algebraic numbers]
----------------------------+----------------------------------------------
Reporter: | Owner:
mmezzarobba | Status: new
Type: defect | Milestone: sage-duplicate/invalid/wontfix
Priority: major | Resolution:
Component: number | Merged in:
fields | Reviewers:
Keywords: | Work issues:
Authors: | Commit:
Report Upstream: N/A | Stopgaps:
Branch: |
Dependencies: |
----------------------------+----------------------------------------------
Changes (by mmezzarobba):
* milestone: sage-6.1 => sage-duplicate/invalid/wontfix
Old description:
> 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!
> }}}
New description:
--
Comment:
Stupid me forgot that the upper bound of
`RealIntervalField(p)((.9e-20,1.e-20))` is actually the `double` closest
to `1.0`, i.e. `9.999999999999999451532714542...e-21`. Sorry for the
noise.
--
Ticket URL: <http://trac.sagemath.org/ticket/15519#comment:1>
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.