Lines Matching refs:FPT
622 template<typename FPT>
623 inline FPT
624 fpt_abs( FPT arg ) in fpt_abs()
630 template<typename FPT>
631 inline FPT
632 safe_fpt_division( FPT uf1, FPT uf2 ) in safe_fpt_division()
634 return ( uf1 < 1 && uf1 > uf2 * std::numeric_limits<FPT>::max()) in safe_fpt_division()
635 ? std::numeric_limits<FPT>::max() : in safe_fpt_division()
636 ((uf2 > 1 && uf1 < uf2 * std::numeric_limits<FPT>::min() || in safe_fpt_division()
641 template<typename FPT>
645 explicit close_at_tolerance( FPT tolerance, bool strong_or_weak = true )
649 : p_tolerance( std::numeric_limits<FPT>::epsilon() * number_of_rounding_errors/2 ),
652 bool operator()( FPT left, FPT right ) const in operator()
654 FPT diff = fpt_abs( left - right ); in operator()
655 FPT d1 = safe_fpt_division( diff, fpt_abs( right ) ); in operator()
656 FPT d2 = safe_fpt_division( diff, fpt_abs( left ) ); in operator()
666 FPT f;
668 p_tolerance_class(FPT _f=0):f(_f){}; in f()
669 FPT get() const{ return f;}; in get()