#1588: after #1566, new errors in converting symbolic compositions to
polynomials
are exposed.
----------------------+-----------------------------------------------------
Reporter: mhansen | Owner: was
Type: defect | Status: new
Priority: minor | Milestone: sage-3.2.2
Component: calculus | Resolution:
Keywords: |
----------------------+-----------------------------------------------------
Comment (by mabshoff):
This now throws a not implemented error in Sage 3.2.1.rc1:
{{{
[EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.2.1.final$ ./sage
----------------------------------------------------------------------
| Sage Version 3.2.1.rc1, Release Date: 2008-12-01 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: sqrt(2).polynomial(RQDF)
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call
last)
/scratch/mabshoff/release-cycle/sage-3.2.1.final/<ipython console> in
<module>()
/scratch/mabshoff/release-cycle/sage-3.2.1.final/local/lib/python2.5/site-
packages/sage/calculus/calculus.pyc in polynomial(self, base_ring)
1803 V = R.variable_names()
1804 return self.substitute_over_ring(
-> 1805 dict([(var(V[i]),G[i]) for i in range(len(G))]),
ring=R)
1806
1807 def _polynomial_(self, R):
/scratch/mabshoff/release-cycle/sage-3.2.1.final/local/lib/python2.5/site-
packages/sage/calculus/calculus.pyc in substitute_over_ring(self, in_dict,
ring, **kwds)
3763 return X._recursive_sub(kwds)
3764 else:
-> 3765 return X._recursive_sub_over_ring(kwds, ring)
3766
3767
/scratch/mabshoff/release-cycle/sage-3.2.1.final/local/lib/python2.5/site-
packages/sage/calculus/calculus.pyc in _recursive_sub_over_ring(self,
kwds, ring)
6164 def _recursive_sub_over_ring(self, kwds, ring):
6165 ops = self._operands
-> 6166 return ring(ops[0](ops[1]._recursive_sub_over_ring(kwds,
ring=ring)))
6167
6168 def _is_atomic(self):
/scratch/mabshoff/release-cycle/sage-3.2.1.final/local/lib/python2.5/site-
packages/sage/calculus/calculus.pyc in __call__(self, x, *args, **kwds)
8259 except AttributeError:
8260 pass
-> 8261 return self._do_sqrt(x, *args, **kwds)
8262
8263 def _approx_(self, x):
/scratch/mabshoff/release-cycle/sage-3.2.1.final/local/lib/python2.5/site-
packages/sage/calculus/calculus.pyc in _do_sqrt(self, x, prec, extend,
all)
8234 else:
8235 return ComplexField(prec)(x).sqrt(all=all)
-> 8236 z = SymbolicComposition(self, SR(x))
8237 if all:
8238 return [z, -z]
/scratch/mabshoff/release-cycle/sage-3.2.1.final/local/lib/python2.5/site-
packages/sage/calculus/calculus.pyc in __call__(self, x)
452 msg, s, pos = err.args
453 raise TypeError, "%s: %s !!! %s" % (msg, s[:pos],
s[pos:])
--> 454 return self._coerce_impl(x)
455
456 def _coerce_impl(self, x):
/scratch/mabshoff/release-cycle/sage-3.2.1.final/local/lib/python2.5/site-
packages/sage/calculus/calculus.pyc in _coerce_impl(self, x)
476 elif is_Polynomial(x) or is_MPolynomial(x):
477 if x.base_ring() != self: # would want coercion to go
the other way
--> 478 return SymbolicPolynomial(x)
479 else:
480 raise TypeError, "Basering is Symbolic Ring,
please coerce in the other direction."
/scratch/mabshoff/release-cycle/sage-3.2.1.final/local/lib/python2.5/site-
packages/sage/calculus/calculus.pyc in __init__(self, p)
4396 # not clear to me why we need anything else in this class
-Bobby
4397 def __init__(self, p):
-> 4398 if p.parent().base_ring().characteristic() != 0:
4399 raise TypeError, "polynomial must be over a field of
characteristic 0."
4400 Symbolic_object.__init__(self, p)
/scratch/mabshoff/release-cycle/sage-3.2.1.final/local/lib/python2.5/site-
packages/sage/rings/ring.so in sage.rings.ring.Ring.characteristic
(sage/rings/ring.c:4377)()
/scratch/mabshoff/release-cycle/sage-3.2.1.final/local/lib/python2.5/site-
packages/sage/structure/element.so in
sage.structure.element.RingElement.additive_order
(sage/structure/element.c:9573)()
NotImplementedError:
sage:
}}}
Cheers,
Michael
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/1588#comment:1>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---