#5242: [with patch, needs review] generic_power can now handle semi-groups
---------------------------+------------------------------------------------
Reporter: hivert | Owner: hivert
Type: enhancement | Status: assigned
Priority: major | Milestone: sage-3.3
Component: algebra | Resolution:
Keywords: generic power |
---------------------------+------------------------------------------------
Comment (by hivert):
Replying to [comment:5 cremona]:
Actually it seems that for n it is possible because we know its type. On
the contrary it is not possible for a. Indeed a can be a plain Python int
(wich forbid the use of {{{a.is_zero()}}}) of any type eg polynomial with
forbid the use of {{{== 0}}} so I don't know what else to do (I'm far from
being a cython expert) :
{{{
sage -t "devel/sage-combinat/sage/rings/polynomial/polydict.pyx"
**********************************************************************
File "/usr/local/sage/devel/sage-
combinat/sage/rings/polynomial/polydict.pyx", line 695:
sage: (f-f)**0
Expected:
Traceback (most recent call last):
...
ArithmeticError: 0^0 is undefined.
Got:
PolyDict with representation {0: 1}
}}}
So if there is no better suggestion I'll stick with the current patch.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5242#comment:7>
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
-~----------~----~----~----~------~----~------~--~---