Menu

#4977 M^^(-n) fails for every 1x1 matrix

None
open
nobody
None
5
13 hours ago
13 hours ago
No

matrix([2])^^(-1) raises "not a matrix: 1/2" although positive powers and larger matrices work

Maxima 5.49post, SBCL 2.6.7.

(%i1) display2d:false$
(%i2) matrix([2])^^(-1);
not a matrix: 1/2
 -- an error. To debug this try: debugmode(true);
(%i3) matrix([2])^^2;
(%o3) matrix([4])
(%i4) matrix([2,0],[0,2])^^(-1);
(%o4) matrix([1/2,0],[0,1/2])

Expected: (%i2) = matrix([1/2]).

(%o3) shows positive powers of the same 1x1 matrix work and (%o4) shows negative powers of a 2x2 work, so the failure is specific to a negative power of a 1x1. mat_function fails with it for the same reason.

Discussion


Log in to post a comment.