Boost logo

Boost :

From: Dave Gomboc (dave_at_[hidden])
Date: 2001-12-06 14:47:39


> What I suggest is to provide something like:
>
> template<class T> bool fp_equal(T const& l,T const& r) ;
> template<class T> bool fp_equal2(T const& l,T const& r, T const& tol)
;
> template<class T> bool fp_equal32(T const& l,T const& r, T const& tol)
;

Using a fixed epsilon is bogus for the numerical applications that I am
familiar with. What we really need to do is make the third argument a
binary predicate returning bool whose operator() is called with the
first two arguments. That wasn't a great explanation, but I hope you
get what I mean.

Dave Gomboc


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk