/*********************************************************
 This example shows how to compute the pseudo inverse of an
 n x m matrix with elements of type real. 
***********************************************************/
module top;

real Q[3:0][2:0];
real IQ[3:0][2:0];
real S[0:0][3:0];
real P[0:0][2:0];
integer mone;

initial begin
#1;

Q = {1.0, 1.0, 1.0, 
     1.0, 2.0, 1.0,
     1.0, 1.0, 2.0,
     2.0, 1.0, 1.0};
S = {6.0, 8.0, 9.0, 7.0};

$PrintM(Q, "%e");
$PrintM(S, "%e");

P = S/Q;
$PrintM(P,"%e"); 
mone = -1.0;
IQ = Q**(mone);
P = S*IQ;
$PrintM(P,"%e"); 

end
endmodule