/* ** nl8.e - Helical Valley Function ** More, Garbow and Hillstrom, 1981, "Testing Unconstrained ** Optimization Software", TOMS 7, 17-41. */ library nlsys; proc F(x); local eqns; eqns = x; eqns[1] = 10*(x[3] - 10 * (atan(x[2]/x[1])/(2*pi) + (x[1] < 0)/2)); eqns[2] = 10*(sqrt(x[1]*x[1] + x[2]*x[2]) - 1); retp(eqns); endp; output file = nl8.out reset; nlset; /* starting values */ x0 = { -1, 0, 0 }; __title = "Helical Valley Function"; _nlchpf = 1; _nlalgr = 2; call nlprt(nlsys(&f,x0)); output off;