/* ** nl7.e - Trigonometric Function ** More, Garbow and Hillstrom, 1981, "Testing Unconstrained ** Optimization Software", TOMS 7, 17-41. */ library nlsys; n = 10; si = seqa(1,1,n); proc F(x); local cx; cx = cos(x); retp(n * (1 + si .* (1 - cx) - sin(x)) - sumc(cx)); endp; output file = nl7.out reset; nlset; /* starting values */ x0 = ones(n,1)*1/n; __title = "Trigonometric Function"; _nlchpf = 0; _nlalgr = 1; call nlprt(nlsys(&f,x0)); output off;