Ch LAPACK for C LAPACK bindings
|
Ch Professional Edition supports all C LAPACK functions.
/*
This C program uses C LAPACK function dgeev_() to calculate
engenvalues in double data type. The program is readily run in Ch
interpretively without compilation.
*/
#include
#include
#define SIZE 3
int main( ) {
char jobvl = 'V';
char jobvr = 'N';
long int n = SIZE;
double a[SIZE][SIZE] = {1., 3., 1., 0., 4., 5., 0., 0., 9.};
long int lda = SIZE;
double wr[SIZE];
double wi[SIZE];
double vl[3*SIZE];
long int ldvl = SIZE;
double vr[3*SIZE];
long int ldvr = SIZE;
double work[4*SIZE];
long int lwork = 4*SIZE;
long int info;
double b[3][3];
int i, j, nn=3, mm = 3;
for(i=0; i
The output is:
INFO=0
WR[ 0 ] = 1.000000
WR[ 1 ] = 4.000000
WR[ 2 ] = 9.000000
|
|