?? qsimp.c
字號:
#include <math.h>
#define EPS 1.0e-6
#define JMAX 20
float qsimp(func,a,b)
float a,b;
float (*func)();
{
int j;
float s,st,ost,os,trapzd();
void nrerror();
ost = os = -1.0e30;
for (j=1;j<=JMAX;j++) {
st=trapzd(func,a,b,j);
s=(4.0*st-ost)/3.0;
if (fabs(s-os) < EPS*fabs(os)) return s;
os=s;
ost=st;
}
nrerror("Too many steps in routine QSIMP");
}
#undef EPS
#undef JMAX
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -