#16721: symbolic gcd()
-----------------------------+------------------------
Reporter: rws | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.3
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps: todo
-----------------------------+------------------------
Comment (by nbruin):
You'd first need to decide what "gcd(A,B)" of two symbolic expressions is:
- if it's "integer" gcd then it can be evaluated for integers entries,
it's an error if you feed it something else ostensibly numeric, and it can
be left unevaluated if there are variables in there.
- if it's (univariate) polynomial gcd, there needs to be some heuristic
to choose the variable wrt. which it would be the gcd (or better, this
variable would be part of the input). Anything else would be considered an
(invertible) coefficient. This would never be left unevaluated. This is
close to what we have now.
We have too little information to define gcd on SR properly. Currently
even this doesn't work:
{{{
gcd(x,sqrt(2)*x)
}}}
The gcd we are currently interfacing with is:
{{{
x.gcd
}}}
which is limited to polynomials over QQ, but at least it fixes the choice:
it's polynomial gcd.
That means `gcd(x,4)` should indeed be `1` (or at least a constant).
In any setting, gcd tends to be not stable under evaluation, meaning that
if
{{{
G(x) = gcd (a(x),b(x))
}}}
then for a specialization `x0` of x, one can easily have that
`gcd(a(x0),b(x0)) != G(x0)`. That means a "symbolic" gcd will always be
problematic.
--
Ticket URL: <http://trac.sagemath.org/ticket/16721#comment:11>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.