IHMO it's just the usual fp hell: data gets moved from registers into
memory and back, etc (but maybe I am wrong here, don't know)

Anyway, there is a way to avoid taking sqrt at all, just solve the
equation f(x^2)=0, not f(x)=0.

Dmitrii

On Feb 8, 11:26 pm, YannLC <[email protected]> wrote:
> > It can do sqrt(-734/3), but fails on
> > sqrt(-244.6666666666667? + 0.?e-39*I)
> > for some reason.
>
> > Dmitrii
>
> It's worse than failing, it also changes the value:
>
> sage: x = polygen(QQbar)
> sage: f = 3*x^4 - 4*x^3 - 1046148*x^2 - 335575956*x - 30288853512
> sage: rts = f.roots(multiplicities=False)
> sage: r1 = rts[1]
> sage: r1
> -244.6666666666667? + 0.?e-39*I
> sage: r1.sqrt()
> ...
> AttributeError: 'sage.rings.real_mpfi.RealIntervalFieldElement' object
> has no attribute 'argument'
> sage: r1
> -734/3

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to