On Tuesday, April 29, 2014 4:06:20 AM UTC-7, [email protected] wrote:
>
> gives AssertionError. Is this a bug? It works for 2 <= n <= 183. 
>
It would seem to be a bug indeed.  

An assertion in 
sage.rings.polynomial.real_roots.interval_bernstein_polynomial_integer.de_casteljau
 
fails.  The assertion seems to test whether information provided about the 
sign of the polynomial at the "midpoint" (if any) is consistent with what 
is computed. Apparently this fails somewhere. Probably an undetected 
precision underflow somewhere.

f[4][0](x/1000).roots(AA, multiplicities=False)

seems to work. There's a comment to this effect at the top of the file:

# * Better initial transformation into Bernstein form
# If a polynomial has roots which are very close to 0, or very large,
# it may be better to rescale the roots (using a transformation like
# p -> p(1000*x)).  This can be done as part of the initial transformation
# into Bernstein form.
# If a polynomial has some roots which are very close to 0, and also
# some roots which are very large, it might be better to isolate the roots
# in two groups.

In fact, just the slightest pertubation seems to do the trick already 
(e.g., substituting 2*x or  x-1) so it's probably an undetected edge case 
somewhere.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" 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-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to