chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a75f93b
)
whoops, fix gradient
author
stevenj
<stevenj@alum.mit.edu>
Sun, 2 Sep 2007 02:10:52 +0000
(22:10 -0400)
committer
stevenj
<stevenj@alum.mit.edu>
Sun, 2 Sep 2007 02:10:52 +0000
(22:10 -0400)
darcs-hash:
20070902021052
-c8de0-
a9be63facbd050d1e2a61a62cce45c0175fca451
.gz
test/testfuncs.c
patch
|
blob
|
history
diff --git
a/test/testfuncs.c
b/test/testfuncs.c
index 06856f9e24f0514eaf4cee361a32b7d747507c32..cff30974aefa358a3b3d11e7cc18b46ccf2aa91a 100644
(file)
--- a/
test/testfuncs.c
+++ b/
test/testfuncs.c
@@
-362,7
+362,7
@@
static double osc1d_f(int n, const double *x, double *grad, void *data)
{
double y = *x - 1.23456789;
UNUSED(data);
- if (grad) grad[0] = y*0.02
-
sin(y - 2*sin(3*y)) * (1 - 6*cos(3*y));
+ if (grad) grad[0] = y*0.02
+
sin(y - 2*sin(3*y)) * (1 - 6*cos(3*y));
RETURN(sqr(y*0.1) - cos(y - 2*sin(3*y)));
}