On 1/5/2011 7:03 AM, Sergey Senozhatsky wrote:
Hello,
IIRC, general approach to consider a and b being equal is based
on how close a to b is (a should be within epsilon).
We compare double values via operator== which may be incorrect
for floating point numbers.
yeah comparing to epsilon is generally the right approach
there is one special case where this is not needed, being "exactly zero"
since that can be expressed exactly
(and will come from explicit initialization, not from math)
> Arjan, what do you think about using ::epsilon comparison?
can we stick this in lib.cpp instead of a new file?
_______________________________________________
Discuss mailing list
Discuss@lesswatts.org
http://lists.lesswatts.org/listinfo/discuss