Example to use newton_raphson class.
#include "../configure_logging.h"
auto main() -> int {
configure_logging();
constexpr double target = 3.0;
finder.init(target);
finder.solve();
logger.info()("solver: {:15}", finder.variable());
const double reference = std::pow(target, 1.0 / 3.0);
logger.info()("std::pow: {:15}", reference);
return 0;
}
Class of Newton-Raphson method.
Class of test function to calculate cubic root of a number.
Definition of cubic_root_test_function class.
Definition of logger class.
Definition of newton_raphson class.