#7007: variables() method for polynomial rings returns the constant as well as
the
variable.
---------------------+------------------------------------------------------
Reporter: jason | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-4.1.2
Component: algebra | Keywords:
Reviewer: | Author:
Merged: |
---------------------+------------------------------------------------------
Comment(by kcrisman):
Maybe the more natural fix to this is to change
symbolic/expression_conversions.py in PolynomialConverter.__init__ , where
instead of checking repr(v) one would check ring.base_ring()(1)*v, I
think. For this to work, there needs to be consistency in the
representations of these, of course.
However, as it turns out, somebody (Pynac?) simplifies like this patch
does already, but for the symbolic ring, though only for the case with
Ring(1), not Ring(2) or others.
{{{
sage: RR(1)*x
x
sage: RR(2)*x
2.000..000*x
}}}
Reverting that to at least printing 1.0 (and cutting off the extra zeros,
which happens for RDF) seems to be the best strategy. Then one could
change PolynomialConverter. But I don't know how to fix Pynac
representations of this kind.
Incidentally, note that #5755 probably will be fixed by this ticket, one
way or another (the current patch fixes it, though as noted above not in a
manner to my liking).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7007#comment:5>
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 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/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---