#21009: Fix symbolic GCD to accept any expression
----------------------------+-------------------------
Reporter: rws | Type: defect
Status: new | Priority: major
Milestone: sage-7.3 | Component: symbolics
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
----------------------------+-------------------------
Visible already in sage-7.1v, difficult to get a good minimal test case.
{{{
sage: (1/24*((sqrt(3)*2^(2/3)*gamma(1/3) + I*2^(2/3)*gamma(1/3))/pi +
4*2^(2/3)*gamma(1/3)/(pi*(sqrt(3) + I)))/x^(1/3)).collect_common_factors()
1/24*2^(2/3)*(sqrt(3) + 4/(sqrt(3) + I) + I)*gamma(1/3)/(pi*x^(1/3))
sage: (1/24*((I*2^(2/3)*gamma(1/3))/pi + 4*2^(2/3)*gamma(1/3)/(pi*(sqrt(3)
+ I)))/x^(1/3)).collect_common_factors()
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
<ipython-input-6-c25fe41fc3c2> in <module>()
----> 1 _.collect_common_factors()
/home/ralf/sage-7.1v/src/sage/symbolic/expression.pyx in
sage.symbolic.expression.Expression.collect_common_factors
(/home/ralf/sage-7.1v/src/build/cythonized/sage/symbolic/expression.cpp:37782)()
6649 sig_on()
6650 try:
-> 6651 x = g_collect_common_factors(self._gobj)
6652 finally:
6653 sig_off()
ValueError: gcd: arguments must be polynomials over the rationals
}}}
It is not difficult to fix the symbolic gcd to accept any expression. The
method is already implemented in Pynac's giac interface.
--
Ticket URL: <https://trac.sagemath.org/ticket/21009>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.