Classes | Macros | Functions
approx.h File Reference
#include "catch.h"
#include <limits>
#include <sstream>
#include <iomanip>
Include dependency graph for approx.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  __approx_epsilon< F >
struct  __approx_epsilon< double >
struct  __approx_epsilon< float >
struct  __approx_margin< F >
struct  __approx_margin< double >
struct  __approx_margin< float >


#define __APPROX_MARGIN   std::numeric_limits<float>::epsilon()
#define approx_abs(D)   Catch::WithinAbs( (D), approx_margin((D)) )
#define approx_equals(D)   ( approx_abs(D) || approx_rel(D) )
#define approx_rel(D)   Catch::WithinRel( (D), approx_epsilon((D)) )


template<typename F >
Approx approx (F f)
template<typename F >
approx_epsilon (F)
template<typename F >
approx_margin (F)
template<class T >
std::string full_precision (T const d)

Macro Definition Documentation


Definition at line 86 of file approx.h.

#define __APPROX_MARGIN   std::numeric_limits<float>::epsilon()

Definition at line 66 of file approx.h.

#define approx_abs (   D)    Catch::WithinAbs( (D), approx_margin((D)) )

Definition at line 140 of file approx.h.

#define approx_equals (   D)    ( approx_abs(D) || approx_rel(D) )

Definition at line 144 of file approx.h.

#define approx_rel (   D)    Catch::WithinRel( (D), approx_epsilon((D)) )

Definition at line 142 of file approx.h.

Function Documentation

template<typename F >
Approx approx ( f)

Definition at line 106 of file approx.h.

template<typename F >
F approx_epsilon ( )

Definition at line 91 of file approx.h.

template<typename F >
F approx_margin ( )

Definition at line 71 of file approx.h.

template<class T >
std::string full_precision ( T const  d)

Definition at line 152 of file approx.h.

Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:24