From 1077fa4d772832f77a677ce7fb7c2d513b959e3f Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 10 May 2001 00:40:28 +0000 Subject: uClibc now has a math library. muahahahaha! -Erik --- libm/double/minv.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 libm/double/minv.c (limited to 'libm/double/minv.c') diff --git a/libm/double/minv.c b/libm/double/minv.c new file mode 100644 index 000000000..df788fecf --- /dev/null +++ b/libm/double/minv.c @@ -0,0 +1,61 @@ +/* minv.c + * + * Matrix inversion + * + * + * + * SYNOPSIS: + * + * int n, errcod; + * double A[n*n], X[n*n]; + * double B[n]; + * int IPS[n]; + * int minv(); + * + * errcod = minv( A, X, n, B, IPS ); + * + * + * + * DESCRIPTION: + * + * Finds the inverse of the n by n matrix A. The result goes + * to X. B and IPS are scratch pad arrays of length n. + * The contents of matrix A are destroyed. + * + * The routine returns nonzero on error; error messages are printed + * by subroutine simq(). + * + */ + +minv( A, X, n, B, IPS ) +double A[], X[]; +int n; +double B[]; +int IPS[]; +{ +double *pX; +int i, j, k; + +for( i=1; i