Hi

In particular: Try .simplify()!

In my case that produced an improvement factor >1000 in some cases.

Best
    Jonas

On 24.11.2014 20:54, Ben Hutz wrote:
Thanks Vincent. I can give that a try. We did try to approximate earlier
with CC and the errors were compounding too much (we do a bunch more
stuff after this), but maybe approximating the roots with CIF will do a
better job.

It sounds like the recursion depth error is actually expected for
numbers like this,

(btw, type is defined in the example as 6, but it doesn't really matter)

On Monday, November 24, 2014 1:55:05 PM UTC-5, vdelecroix wrote:

    Hi Ben,

    You are dealing with complicated numbers, it is not surprising that
    things like "exactify" or "__cmp__" lead to maximum recursion errors.
    If you want something faster than QQbar you can either:
      - do approximation earlier in the code
      - try to work with number fields

    Note that your example can be simplified
    {{{
    z = polygen(ZZ)
    f = z^2 + 3/4
    g = f
    for _ in range(5): g = f(g)
    roots = (g-z).roots(QQbar, multiplicities=False)
    }}}

    Then instead of applying "d" I would suggest that you do the
    approximation now
    {{{
    R = ComplexIntervalField(256)
    approx_roots = [r.interval_exact(R) for r in roots]
    }}}
    and start your computation from there.

    By the way, I was not able to go through your example since "type" is
    not defined. I tried with type=7 and get quite accurate results (the
    diameter was < 10^-43).

    Vincent

--
You received this message because you are subscribed to the Google
Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to sage-devel+unsubscr...@googlegroups.com
<mailto:sage-devel+unsubscr...@googlegroups.com>.
To post to this group, send email to sage-devel@googlegroups.com
<mailto:sage-devel@googlegroups.com>.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to