Boost logo

Boost Users :

From: Matt Gruenke (mgruenke_at_[hidden])
Date: 2008-03-04 14:26:17


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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net