GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
#include"typedef.h"1#include"tools.h"2#include"matrix.h"3#include"getput.h"456main (int argc, char *argv[])7{8matrix_TYP **M,9*Trf;10int erg,11anz,12i;1314read_header(argc, argv);15if(FILEANZ != 1)16{17printf("Usage: %s 'file' [-t]\n",argv[0]);18printf("\n");19printf("file: matrix_TYP containing rational matrices.\n");20printf("\n");21printf("Calculates for each matrix in file a Gauss reduced matrix (row reduced).\n");22printf("More precisely, by applying integral elementary transformations\n");23printf("from the left, a staircase form of the input matrix is achieved.\n");24printf("\n");25printf("CAUTION: The program works with single precision and should be used only\n");26printf(" for small examples.\n");27printf("\n");28printf("Options:\n");29printf(" -t : give the transforming matrices as well.\n");30printf("\n");31printf("Cf. Long_solve.\n");32if (is_option('h')){33exit(0);34}35else{36exit(31);37}38}3940M = mget_mat(FILENAMES[0],&anz);41for (i=0;i<anz;i++){42Trf = init_mat(M[i]->rows, M[i]->rows, "");43erg = Trf_gauss(M[i], Trf);44put_mat(M[i], NULL, "row-gauss of matrix", 0);45if (is_option('t')) put_mat(Trf, NULL, "Transformtion matrix", 0);46free_mat(Trf);47free_mat(M[i]);48}4950exit(0);51}525354