From 4ae07417bbdf9bf2b8f6245c099dd1793c9b973a Mon Sep 17 00:00:00 2001 From: Stefan Kroboth Date: Thu, 15 Feb 2024 11:20:55 +0100 Subject: [PATCH] Fixed Schaffer tests --- .../proptest-regressions/schaffer.txt | 1 + crates/argmin-testfunctions/src/schaffer.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/crates/argmin-testfunctions/proptest-regressions/schaffer.txt b/crates/argmin-testfunctions/proptest-regressions/schaffer.txt index 9f9c19d21..a03f76eee 100644 --- a/crates/argmin-testfunctions/proptest-regressions/schaffer.txt +++ b/crates/argmin-testfunctions/proptest-regressions/schaffer.txt @@ -15,3 +15,4 @@ cc 32f4a71a9cf4ea177319bc4648d42fa3476bd4b0582fdd2cc0905cbfce3dfe8a # shrinks to cc b0e73b49416e7496e88c5d497c3da019326e8ce90d51af06bcafe51e930fc9fd # shrinks to a = -6.778903037873863, b = 9.998923372712351 cc ba68ebaf8145cc34c8e18a92d23af2ace5a2e05a5f5b00d69adb3bc4e97d2ac9 # shrinks to a = 0.7151643912856506, b = 9.195105492749027 cc aa45ef4cc9423b3818346b7e7de37a6d85f0d271aba79e6071631466dde39166 # shrinks to a = -9.698581173014253, b = 9.502752154451573 +cc e6113fccb87c871faf8448b3137c6b763925d1ba0488aaf0d458fed5874deb67 diff --git a/crates/argmin-testfunctions/src/schaffer.rs b/crates/argmin-testfunctions/src/schaffer.rs index c16c201b4..a5c6d836b 100644 --- a/crates/argmin-testfunctions/src/schaffer.rs +++ b/crates/argmin-testfunctions/src/schaffer.rs @@ -314,8 +314,8 @@ mod tests { assert_relative_eq!( derivative[i], derivative_fd[i], - epsilon = 1e-5, - max_relative = 1e-3 + epsilon = 1e-3, + max_relative = 1e-2 ); } } @@ -339,8 +339,8 @@ mod tests { assert_relative_eq!( hessian[i][j], hessian_fd[i][j], - epsilon = 1e-4, - max_relative = 1e-3 + epsilon = 1e-3, + max_relative = 1e-2 ); } } @@ -373,7 +373,7 @@ mod tests { assert_relative_eq!( derivative[i], derivative_fd[i], - epsilon = 1e-4, + epsilon = 1e-3, max_relative = 1e-2, ); } @@ -399,7 +399,7 @@ mod tests { assert_relative_eq!( hessian[i][j], hessian_fd[i][j], - epsilon = 1e-4, + epsilon = 1e-3, max_relative = 1e-2 ); }