Skip to content
Snippets Groups Projects
Commit 83b1b1c3 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

sqrt -> std::sqrt

parent 5b7eb847
No related branches found
No related tags found
No related merge requests found
......@@ -48,8 +48,8 @@ int main() {
SmallVector numerical_descent;
J.descentDirection(start, numerical_descent);
SmallVector analytic_descent = { -(7 / sqrt(5) - 1),
-(11.5 / sqrt(5) - 2) };
SmallVector analytic_descent = { -(7 / std::sqrt(5) - 1),
-(11.5 / std::sqrt(5) - 2) };
assert(two_distance<dim>(analytic_descent, numerical_descent) < 1e-10);
functionTester(J, start, 6);
......@@ -61,8 +61,8 @@ int main() {
SmallVector numerical_descent;
J.descentDirection(start, numerical_descent);
SmallVector analytic_descent = { -(8 / sqrt(5) - 1),
-(13.5 / sqrt(5) - 2) };
SmallVector analytic_descent = { -(8 / std::sqrt(5) - 1),
-(13.5 / std::sqrt(5) - 2) };
assert(two_distance<dim>(analytic_descent, numerical_descent) < 1e-10);
functionTester(J, start, 6);
......
......@@ -34,8 +34,8 @@ int main() {
= 17*(6, 9.5) - (1, 2) + 2/sqrt(5) (1, 2)
= (102 - 1 + 2/sqrt(5), 161.5 - 2 + 4/sqrt(5))
*/
SmallVector analytic_descent = { -(102 - 1 + 2 / sqrt(5)),
-(161.5 - 2 + 4 / sqrt(5)) };
SmallVector analytic_descent = { -(102 - 1 + 2 / std::sqrt(5)),
-(161.5 - 2 + 4 / std::sqrt(5)) };
SmallVector numerical_descent;
J.descentDirection(SmallVector({ 17, 34 }), numerical_descent);
assert(two_distance<dim>(analytic_descent, numerical_descent) < 1e-10);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment