Changes between Version 45 and Version 47 of Ticket #24247


Ignore:
Timestamp:
01/08/18 09:15:53 (3 years ago)
Author:
jdemeyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24247

    • Property Commit changed from c5b1be1372141cf3447ea4c28208b60aeaa3ae03 to 3a3bd034ff7236457414f11bfe33682fd0bb32ef
  • Ticket #24247 – Description

    v45 v47  
    33To deal with this integer powering, we implement an action `IntegerPowAction`. This action calls a special method `_pow_int()` on the element. In other words, `x ^ n` for an integer `n` becomes `x._pow_int(n)`. We also provide a default implementation of `_pow_int` for `MonoidElement` and `RingElement` which uses the square-and-multiply algorithm implemented in `generic_power()`.
    44
    5 For backward compatibility reasons, we also call this action for elements of `IntegerModRing(m)`. In the future, we may rethink what to do here.
     5For backward compatibility reasons, we also call this action for elements of `IntegerModRing(m)`. In the future, we may rethink what to do here, see #15709.
    66
    77Apart from this, powering behaves like other binary operators: coercion to a common parent is done if no action is defined.