1#ifndef WXM_ROOT_FINDERS_H
2#define WXM_ROOT_FINDERS_H
4#include "warpxm/warpxm_config.h"
88 static const real epsilon = 1e-15;
89 if (fun(a) * fun(b) >= 0)
93 WxExcept wxe(
"wxm::root_finders::bisection You have not assumed correct bounds");
95 throw wxe <<
" a = " << a <<
" b = " << b << std::endl;
102 while (b - a >= epsilon)
113 else if (fun(c) * fun(a) < 0)
wxm::lib::Except is the class to use for creating and throwing exceptions.
Definition: wxexcept.h:31
real bisection(const T &fun, real a, real b)
Definition: root_finders.h:76
Base namespace for everything not included in the global namespace.
Definition: field_source.h:8
#define real
Definition: wmoclunstructuredreconstruction.h:11