1 #include <catch2/catch_all.hpp>
22 CHECK(std::abs(x0_est - x0) <=
tol);
27 constexpr
Scalar x0 = 0.23235104239409;
29 CHECK(std::abs(x0_est - x0) <=
tol);
36 CHECK(std::abs(x0_est - x0) <=
tol);
TEST_CASE("Bisection x^3")
sopt::Vector< Scalar > t_Vector
sopt::Matrix< Scalar > t_Matrix
void set_level(const std::string &level)
Method to set the logging level of the default Log object.
double t_real
Root of the type hierarchy for real numbers.
std::enable_if< std::is_same< t_real, K >::value, K >::type bisection_method(const K &function_value, const std::function< K(K)> &func, const K &a, const K &b, const t_real &rel_convergence=1e-4)
Find root to a function within an interval.
Eigen::Matrix< T, Eigen::Dynamic, 1 > Vector
A vector of a given type.
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > Matrix
A matrix of a given type.