Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Class template small_with_tolerance

boost::math::fpc::small_with_tolerance — Predicate for comparing floating point numbers against 0.

Synopsis

// In header: <boost/test/tools/floating_point_comparison.hpp>

template<typename FPT> 
class small_with_tolerance {
public:
  // types
  typedef bool result_type;

  // public member functions
  explicit small_with_tolerance(FPT);
  bool operator()(FPT) const;
};

Description

Serves the same purpose as boost::math::fpc::close_at_tolerance, but used when one of the operand is null.

small_with_tolerance public member functions

  1. explicit small_with_tolerance(FPT tolerance);
  2. bool operator()(FPT fpv) const;

PrevUpHomeNext