On Dec 3, 2007 11:16 AM, William Stein <[EMAIL PROTECTED]> wrote: [snip] > I want to time maple, but I just spent 10 minutes and couldn't > even figure out how to raise a matrix to a power!
I couldn't get the Sage interface to Maple to work properly with matrices. When I tried the following in Sage, the generated Maple input was not valid Maple syntax: m = matrix(QQ,3,range(9)); m[0,0] =20; n=m^(-1) b = maple(n) In any case, there's nothing syntactically tricky about matrix exponentation in Maple: just use ^. This is how you'd do it in Maple: > m := > Matrix([[1/20,-1/10,1/20],[-1/10,-37/15,47/30],[1/20,67/30,-77/60]],shape=symmetric): > a := time(): > n := m^20000: > time()-a; 11.170 It's possible the powering could be further sped up with additional options, and the time above can't be directly compared as the above is actual time (as opposed to cpu time). But as it is, it appears that Maple is not competitive with Sage here. Steve --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---