fhv.c

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

C
21
字号
/*  fhv.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.) * ------------------------------------------------------------------------ *//* Helical valley function   minimum value = 0 at x[0]=1.0, x[1]=x[2]=0.0*/#include <math.h>#define Tpi 6.283185308double fhv(x)double x[];{ double r,an; extern int count;  ++count;  r=x[0]*x[0]+x[1]*x[1]; r=sqrt(r)-1.;  an=x[2]-10.*atan2(x[1],x[0])/Tpi;  return (100.*(an*an+r*r)+x[2]*x[2]);}

⌨️ 快捷键说明

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