...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::math::fpc::small_with_tolerance — Predicate for comparing floating point numbers against 0.
// In header: <boost/test/tools/floating_point_comparison.hpp> template<typename FPT> class small_with_tolerance { public: // types typedef bool result_type; // construct/copy/destruct explicit small_with_tolerance(FPT); // public member functions bool operator()(FPT) const; };
Serves the same purpose as boost::math::fpc::close_at_tolerance, but used when one of the operand is null.