Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2828 by [email protected]: primitive() problem
http://code.google.com/p/sympy/issues/detail?id=2828

Before:

python -c 'from sympy import var; var("x y"); print (4.0*x + y/2).primitive()'
(1/2, 2*4.0*x + y)

now:

$ python -c 'from sympy import var; var("x y"); print (4.0*x + y/2).primitive()'
(1, 4.0*x + y/2)


Using bisect:


0f4c696d47032d6ed17facd4c74b376c283c1e1e is the first bad commit
commit 0f4c696d47032d6ed17facd4c74b376c283c1e1e
Author: Chris Smith <[email protected]>
Date:   Thu Jun 16 10:56:24 2011 -0500

    use Add in primitive

        In addition, as_coeff_Mul is used to break up the terms. If
        gcd ever handles Float then this will still work since as_coeff_Mul
returns the leading Number while as_coeff_mul returns only the leading
        Rational.


Not sure which is correct. But this is related to the pull request:

https://github.com/sympy/sympy/pull/702

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

Reply via email to