From f56cdc48c8b9598b902f591af2297f9b8a99939d Mon Sep 17 00:00:00 2001 From: stevenj Date: Sat, 1 Sep 2007 22:10:52 -0400 Subject: [PATCH] whoops, fix gradient darcs-hash:20070902021052-c8de0-a9be63facbd050d1e2a61a62cce45c0175fca451.gz --- test/testfuncs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testfuncs.c b/test/testfuncs.c index 06856f9..cff3097 100644 --- 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))); } -- GitLab