?? xzrhqr.c
字號:
/* Driver for routine zrhqr */
#include <stdio.h>
#include "nr.h"
#include "nrutil.h"
#define M 4 /* degree of polynomial */
#define MP1 (M+1) /* no. of polynomial coefficients */
main()
{
static float a[MP1]={-1.0,0.0,0.0,0.0,1.0};
float *rti,*rtr;
int i;
rti=vector(1,M);
rtr=vector(1,M);
printf("\nRoots of polynomial x^4-1\n");
printf("\n%15s %15s\n","Real","Complex");
zrhqr(a,M,rtr,rti);
for (i=1;i<=M;i++) {
printf("%5d %12.6f %12.6f\n",i,rtr[i],rti[i]);
}
free_vector(rtr,1,M);
free_vector(rti,1,M);
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -