bessy.c

来自「Numerical Recipes Software 提供的算法子程序集」· C语言 代码 · 共 22 行

C
22
字号
float bessy(n,x)
float x;
int n;
{
	float bessy0(),bessy1();
	void nrerror();
	int j;
	float by,bym,byp,tox;

	if (n < 2) nrerror("Index n less than 2 in bessy");
	tox=2.0/x;
	by=bessy1(x);
	bym=bessy0(x);
	for (j=1;j<n;j++) {
		byp=j*tox*by-bym;
		bym=by;
		by=byp;
	}
	return by;
}
/* (C) Copr. 1986-92 Numerical Recipes Software . */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?