Comment #7 on issue 2607 by asmeurer: as_numer_denom() is too slow
http://code.google.com/p/sympy/issues/detail?id=2607

Well, thanks to starblue on stackoverflow (see the above link), I have the efficient algorithm. The key is to compute it iteratively. So if you have a1/d1 + a2/d2 + … + an/dn then you compute (…(a1/d1 + a2/d2) + … ) + an/dn. If you work it out on paper, you'll see that this avoids all duplicate multiplications that can be avoided.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to