HOW TO CALL THE IMSL FORTRAN LIBRARIES FROM C by ...
HOW TO CALL THE IMSL FORTRAN LIBRARIES FROM C by ...
HOW TO CALL THE IMSL FORTRAN LIBRARIES FROM C by ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
3.4 Example<br />
/*<br />
This example solves a linear system of 100 <strong>by</strong> 100<br />
using the <strong>IMSL</strong> routine LSLRG.<br />
*/<br />
#include <br />
#include <br />
#include <br />
#include <br />
#define MAXN 100<br />
main()<br />
{<br />
int<br />
long int<br />
long int<br />
double<br />
double<br />
i, nerr;<br />
n=MAXN, nn=MAXN*MAXN, lda=MAXN;<br />
ipath=2, seed=123457;<br />
ermax=l.e-7;<br />
a[MAXN][MAXN], b[MAXN], x[MAXN], ans[MAXN];<br />
/* generate matrix a with uniform random numbers */<br />
RNSET (&seed);<br />
RNUN (&nn, a);<br />
/* generate a pre-determined answer, ans */<br />
for(i=0;i