frb.c

来自「数值算法库」· C语言 代码 · 共 18 行

C
18
字号
/*  frb.c    CCM mathematics library source code. * *  Copyright (C)  2000   Daniel A. Atkinson    All rights reserved. *  This code may be redistributed under the terms of the GNU general *  public license. ( See the gpl.license file for details.) * ------------------------------------------------------------------------ *//* Rosenbrock function:   minimum = 0 at x[0]=1.0 x[1]=1.0*/double frb(x)double x[];{ double f,y; extern int count;  ++count;  y=x[0]; f=1.0-y; y=x[1]-y*y;  return 100.0*y*y+f*f;}

⌨️ 快捷键说明

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