Boost logo

Boost Users :

From: Robert Kindred (RKindred_at_[hidden])
Date: 2008-03-04 10:35:50


"Johan Råde" <rade_at_[hidden]> wrote in message
news:fqh5ob$l9m$1_at_ger.gmane.org...
[]
>>> http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
[]
>> Why don't you write code for this and submit to Boost?
>>
>> --Johan
>
> Thanks, Johan, are you suggesting I add this to your library? If so, I
> would use your traits mechanism.
>
> Robert Kindred

Of course you can do that.

I'm not sure what the formal procedure is,
but we could find out.

Could you give a brief explanation of exactly what it is you want to add?
I looked at the link, and there they discussed several different problems.

--Johan

We have software we wrote in-house to run engine stands to perform data
acquisition and control, according to tests specified by the Society of
Automotive Engineers.

Oops, I am already not brief. The short of it is that, in the real world,
floating point numbers are almost never equal, even when you think they
should be. Even if I convert a floating point number to a string and back
again, there is a good chance the 'before' and the 'after' differ bitwise.
We are using the absolute-value-epsilon approach now, but we have, I think 3
different epsilons that we use, depending on what we predict the magnitude
of the compared values will be. I am looking into this Sign-Magnitude
comparison routine for high-speed floating point compares. One caveat is
that it would only work on IEEE floating point numbers. This seemed like a
floating point utility to me, so the name of your library caught my eye.

Robert Kindred


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