13#include <boost/numeric/conversion/bounds.hpp> 
   15#if BOOST_VERSION >= 106700 
   16#    include <boost/integer/common_factor.hpp> 
   18namespace _bmint = boost::integer;
 
   20#    include <boost/math/common_factor.hpp> 
   21namespace _bmint = boost::math;
 
   33static const double PI = 3.14159265358979323846;
 
   51static const float SINGLE_PRECISION_EPSILON  = 1.19e-7f;
 
   52static const double DOUBLE_PRECISION_EPSILON = 2.22e-16;
 
   69template <
typename float_t>
 
   98template <
typename float_t>
 
  101template <
typename float_t>
 
  104template <
typename float_t>
 
  107template <
typename float_t>
 
  110template <
typename float_t>
 
  113template <
typename float_t>
 
  119template <
typename float_t>
 
  121template <
typename float_t>
 
  123template <
typename float_t>
 
  125template <
typename float_t>
 
  127template <
typename float_t>
 
  129template <
typename float_t>
 
  132template <
typename float_t>
 
  134template <
typename float_t>
 
  136template <
typename float_t>
 
  138template <
typename float_t>
 
  140template <
typename float_t>
 
  142template <
typename float_t>
 
  154static const float SINGLE_PRECISION_DELTA  = 1e-3f;
 
  155static const double DOUBLE_PRECISION_DELTA = 1e-5;
 
  158static const double FREQ_COMPARISON_DELTA_HZ = 0.1;
 
  161namespace fp_compare {
 
  176template <
typename float_t>
 
  190template <
typename float_t>
 
  192template <
typename float_t>
 
  194template <
typename float_t>
 
  196template <
typename float_t>
 
  198template <
typename float_t>
 
  200template <
typename float_t>
 
  205template <
typename float_t>
 
  207template <
typename float_t>
 
  209template <
typename float_t>
 
  211template <
typename float_t>
 
  213template <
typename float_t>
 
  215template <
typename float_t>
 
  218template <
typename float_t>
 
  220template <
typename float_t>
 
  222template <
typename float_t>
 
  224template <
typename float_t>
 
  226template <
typename float_t>
 
  228template <
typename float_t>
 
  241    return std::pow(10, (dB_val) / 10.0);
 
  246    return 10 * std::log10(val);
 
  251template <
typename IntegerType>
 
  252inline IntegerType 
lcm(IntegerType x, IntegerType y)
 
  255    return _bmint::lcm<IntegerType>(x, y);
 
  259template <
typename IntegerType>
 
  260inline IntegerType 
gcd(IntegerType x, IntegerType y)
 
  263    return _bmint::gcd<IntegerType>(x, y);
 
UHD_INLINE fp_compare_delta(float_t value)
 
float_t _delta
Definition: math.hpp:187
 
UHD_INLINE void operator=(const fp_compare_delta ©)
Definition: fp_compare_delta.ipp:52
 
UHD_INLINE ~fp_compare_delta()
Definition: fp_compare_delta.ipp:48
 
float_t _value
Definition: math.hpp:186
 
float_t _epsilon
Definition: math.hpp:80
 
UHD_INLINE ~fp_compare_epsilon()
Definition: fp_compare_epsilon.ipp:43
 
UHD_INLINE void operator=(const fp_compare_epsilon ©)
Definition: fp_compare_epsilon.ipp:47
 
float_t _value
Definition: math.hpp:79
 
UHD_INLINE fp_compare_epsilon(float_t value)
 
#define UHD_INLINE
Definition: config.h:52
 
UHD_INLINE bool operator!=(fp_compare_delta< float_t > lhs, fp_compare_delta< float_t > rhs)
Definition: fp_compare_delta.ipp:64
 
UHD_INLINE bool operator<=(fp_compare_delta< float_t > lhs, fp_compare_delta< float_t > rhs)
Definition: fp_compare_delta.ipp:75
 
UHD_INLINE bool operator==(fp_compare_delta< float_t > lhs, fp_compare_delta< float_t > rhs)
Definition: fp_compare_delta.ipp:58
 
UHD_INLINE bool operator<(fp_compare_delta< float_t > lhs, fp_compare_delta< float_t > rhs)
Definition: fp_compare_delta.ipp:69
 
UHD_INLINE bool operator>(fp_compare_delta< float_t > lhs, fp_compare_delta< float_t > rhs)
Definition: fp_compare_delta.ipp:80
 
UHD_INLINE bool operator>=(fp_compare_delta< float_t > lhs, fp_compare_delta< float_t > rhs)
Definition: fp_compare_delta.ipp:86
 
IntegerType lcm(IntegerType x, IntegerType y)
Portable version of lcm() across Boost versions.
Definition: math.hpp:252
 
UHD_INLINE bool frequencies_are_equal(double lhs, double rhs)
Definition: math.hpp:233
 
double dB_to_lin(const double dB_val)
Definition: math.hpp:239
 
IntegerType gcd(IntegerType x, IntegerType y)
Portable version of gcd() across Boost versions.
Definition: math.hpp:260
 
double lin_to_dB(const double val)
Definition: math.hpp:244
 
Definition: build_info.hpp:12