]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: speed up the computation of element powers.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 25 Aug 2019 22:39:15 +0000 (18:39 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 25 Aug 2019 22:54:17 +0000 (18:54 -0400)
mjo/eja/eja_element.py

index 85d45715dae0d787e622293e4f4320d755536911..7c861834723344ea6403f9f5da289af8aa299ae7 100644 (file)
@@ -78,7 +78,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
         elif n == 1:
             return self
         else:
-            return (self.operator()**(n-1))(self)
+            return (self**(n-1))*self
 
 
     def apply_univariate_polynomial(self, p):