#7735: [with patch] incorrect sage exponentiation in interreduced_basis '^' vs
'**'
-----------------------------------------------------------+----------------
Reporter: lftabera | Owner:
AlexGhitza
Type: defect | Status: new
Priority: major | Milestone:
sage-4.3
Component: algebra | Keywords:
interreduced_basis, python
Work_issues: | Author: Luis
Felipe Tabera
Upstream: Not yet reported upstream; Will do shortly. | Reviewer:
Merged: |
-----------------------------------------------------------+----------------
There is a bug in the code of interreduced_basis in
sage/rings/polynomial/multi_polynomial_ideal.py
{{{
sage: R=QQ['t'].fraction_field()['x,y']
sage: R.inject_variables()
Defining x, y
sage: I=x*R
sage: I.interreduced_basis()
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call
last)
/home/luisfe/<ipython console> in <module>()
/opt/SAGE/sage/local/lib/python2.6/site-
packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in
wrapper(*args, **kwds)
362 """
363 with RedSBContext():
--> 364 return func(*args, **kwds)
365
366 from sage.misc.sageinspect import sage_getsource
/opt/SAGE/sage/local/lib/python2.6/site-
packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in
interreduced_basis(self)
1542 for f in self._singular_().interred():
1543 f = R(f)
-> 1544 ret.append(f.lc()^(-1)*f) # lead coeffs are
not reduced by interred
1545 s.option("set",o)
1546 except TypeError:
/opt/SAGE/sage/local/lib/python2.6/site-packages/sage/structure/element.so
in sage.structure.element.Element.__xor__
(sage/structure/element.c:4469)()
RuntimeError: Use ** for exponentiation, not '^', which means xor
in Python, and has the wrong precedence.
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7735>
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.