Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2006-04-22 11:06:29


"Alberto Ganesh Barbati" wrote

> bool operator()(T x, T y) const { return abs(x - y) < eps; }

Maybe should be:

  bool operator()(T x, T y) const { return abs(x - y) < abs(eps); }

Because I have been caught out when eps was negative ;-)
Negaitive eps is easy to do if it is some function of x y or both, which is
common e.g percentage etc.

regards
Andy little


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