30TEST_CASE(
"BisectSolveLower: linear f(x)=x, target=0.75")
32 auto F = [](
double x) {
return x; };
34 CHECK(
v == doctest::Approx(0.75).epsilon(1e-10));
37TEST_CASE(
"BisectSolveLower: exp(x) = e => x = 1")
39 auto F = [](
double x) {
return std::exp(
x); };
41 CHECK(
v == doctest::Approx(1.0).epsilon(1e-10));
44TEST_CASE(
"BisectSolveLower: few iterations gives lower accuracy")
46 auto F = [](
double x) {
return x *
x; };
49 CHECK(std::abs(
v - 2.0) < 0.1);
50 CHECK(std::abs(
v - 2.0) > 1e-6);