1 #ifndef _USE_MATH_DEFINES
2 #define _USE_MATH_DEFINES
54 for (j = 0; j < n; j++)
60 apivot =
a[j + j * n];
62 for (i = j; i < n; i++)
64 if (fabs(apivot) < fabs(
a[i + j * n]))
66 apivot =
a[i + j * n];
78 for (i = 0; i < n + rhs_num; i++)
80 temp =
a[ipivot + i * n];
81 a[ipivot + i * n] =
a[j + i * n];
88 for (k = j; k < n + rhs_num; k++)
90 a[j + k * n] =
a[j + k * n] / apivot;
95 for (i = 0; i < n; i++)
99 factor =
a[i + j * n];
101 for (k = j; k < n + rhs_num; k++)
103 a[i + k * n] =
a[i + k * n] - factor *
a[j + k * n];