All pastes #453793 Raw Edit

Mine

public text v1 · immutable
·published 2007-04-23 05:59 UTC
rendered paste body
   public static Matrix pow(Matrix A, int exp) {
	   Matrix B = A;
	   for (int i = 1; i < exp; i++) {
		   B = B.times(A);
	   }
	   return B;
   }

I know that the times() method works, but I am getting the wrong answers. I am trying to calculate A^16 where A is a symmetrix, square matrix.