#include <v_lib.h>
#include "math_u.h"

int main()
{
	matrix_t *m,*i,*p;
	file_t out=fileOpenWrite("CON");
	m=matAlloc(3,3);
	p=matAlloc(3,3);
	umMakeRandomMatrix(m,-1000,1000,true,true);
	i=matInverse(m,true);
	matMatMul(p,m,i);
	umDumpMatrix(out,m,"M=",NULL,NULL,"\t|"," ","|\n",true);
	umDumpMatrix(out,i,"I=",NULL,NULL,"\t|"," ","|\n",true);
	umDumpMatrixAsFractions(out,i,"I=",NULL,NULL,"\t|"," ","|\n",true);
	umDumpMatrix(out,p,"P=",NULL,NULL,"\t|"," ","|\n",true);
	return 0;
}
