Corretly sort entry for bug #4355
[maxima.git] / share / cobyla / ex / ex2.mac
blobbec8702df1105d7d2e1ae7b548ccadb2c7b5fb40
1 /*
2  * 2D unit circle
3  *
4  * f = x1*x2
5  * 1-x1^2-x2^2 >= 0
6  *
7  * True solution: x1=1/sqrt(2), x2=-1/sqrt(2)
8  */
10 fmin_cobyla(x1*x2, [x1, x2], [1,1], constraints = [1>=x1^2+x2^2], iprint=1);
12 /* Output
14    Normal return from subroutine COBYLA
16    NFVALS =   66   F =-5.000000E-01    MAXCV = 1.999956E-12
17    X = 7.071058E-01  -7.071077E-01
18 [[x1 = .7071058493484819,x2 = -.7071077130247994],-.4999999999992633,
19          66, 0];
23 /* True output
25        Output from test problem 2 (2D unit circle calculation)
27    Normal return from subroutine COBYLA
29    NFVALS =   66   F =-5.000000E-01    MAXCV = 1.999956E-12
30    X = 7.071058E-01  -7.071077E-01