On Fri, Apr 9, 2010 at 1:07 PM, Ben Goodrich <goodrich....@gmail.com> wrote:
> On Apr 9, 3:09 pm, Ondrej Certik <ond...@certik.cz> wrote:
>>
>> And if this helps, we can then try to think how to make this
>> automatic, so that you can just write:
>>
>> first * second - third**2
>>
>> and it will be the same fast.
>>
>> Ondrej
>
> Okay, I had already assumed that if first * second - third**2 was
> inside quo() like
>
> quo(first * second - third**2, fourth)
>
> that it would decide how to expand the numerator optimally, but maybe
> not quite yet.
>
> I see that sympy/sympy/polyclasses.py has a Dense Multivariate
> Polynomial class with methods that overload mul, sub, and sqr, which
> hopefully the following utilizes
>
> quo(Poly(first, domain='QQ') * Poly(second, domain='QQ') - Poly(third,
> domain='QQ')**2, Poly(fourth, domain='QQ'))

You can check the Poly.__mul__ methods just to be sure what is happening inside.

>
> So far, that is only using a small amount of RAM, but it is still
> calculating. I will report back when it finishes or errors.

Yep, report back.

Ondrej

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

Reply via email to