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/mtransp.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 libm/double/mtransp.c (limited to 'libm/double/mtransp.c') diff --git a/libm/double/mtransp.c b/libm/double/mtransp.c new file mode 100644 index 000000000..b4a54dd0f --- /dev/null +++ b/libm/double/mtransp.c @@ -0,0 +1,61 @@ +/* mtransp.c + * + * Matrix transpose + * + * + * + * SYNOPSIS: + * + * int n; + * double A[n*n], T[n*n]; + * + * mtransp( n, A, T ); + * + * + * + * DESCRIPTION: + * + * + * T[r][c] = A[c][r] + * + * + * Transposes the n by n square matrix A and puts the result in T. + * The output, T, may occupy the same storage as A. + * + * + * + */ + + +mtransp( n, A, T ) +int n; +double *A, *T; +{ +int i, j, np1; +double *pAc, *pAr, *pTc, *pTr, *pA0, *pT0; +double x, y; + +np1 = n+1; +pA0 = A; +pT0 = T; +for( i=0; i