simp1.c
来自「Numerical Recipes Software 提供的算法子程序集」· C语言 代码 · 共 24 行
C
24 行
#include <math.h>
void simp1(a,mm,ll,nll,iabf,kp,bmax)
float **a,*bmax;
int *kp,iabf,ll[],mm,nll;
{
int k;
float test;
*kp=ll[1];
*bmax=a[mm+1][*kp+1];
for (k=2;k<=nll;k++) {
if (iabf == 0)
test=a[mm+1][ll[k]+1]-(*bmax);
else
test=fabs(a[mm+1][ll[k]+1])-fabs(*bmax);
if (test > 0.0) {
*bmax=a[mm+1][ll[k]+1];
*kp=ll[k];
}
}
}
/* (C) Copr. 1986-92 Numerical Recipes Software . */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?