I know it's getting pretty far afield, but this reminds me of a floating point enumerator I once wrote, in order to test various numeric optimizations by perfect induction. It works much like an iterator, and can be used to cover all valid float values in a given range. Would there be interest in something like that? Again, sorry to follow a tangent, but another floating point utility I've found useful is an epsilon function. Unlike std::numeric_limits<>::epsilon(), it takes an argument. It also returns 1, for integral types (this is USEFUL - why doesn't the standard library's?!?). Matt Robert Kindred wrote:
Just a quick reply: Is there any plans to include efficient comparison (equality) of floating point numbers? I could not find anything related in the library docs.
Hermann O. Rodrigues
No.
--Johan
I would like to second this motion, as there are many pitfalls in doing this manually. Here is a link I found on the pitfalls involved and ways to solve them:
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
Robert Kindred
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users