inverse matrix by ksk

open Array
let a=make_matrix 9 18 0.let(%)x f=mapi f x;;a%(fun($)i y->(y$i+9)1.;a%fun j z->Scanf.scanf"%f "(y$j))set;(a%fun i y->y%(fun p k z->y.(k)<-z/.(p+.1.)+.a.(8).(k))y.(0);a%fun j z->z%(fun u t k w->z.(k)<-w-.y.(k)*.t/.u;i=j&()=z.(k)<-w/.u)y.(i)z.(i));a%fun i y->a%fun j z->Printf.printf"%.f%c"(y.(j+9)+.0.1)" 

Note that non-ascii characters in the above source code will be escaped (such as \x9f).


return to the top page