On (01/05/11 07:03), Arjan van de Ven wrote:
> 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?
> 

Sure. Will send patch.

Thanks,
        Sergey

Attachment: pgp6pAyVvUkGb.pgp
Description: PGP signature

_______________________________________________
Discuss mailing list
[email protected]
http://lists.lesswatts.org/listinfo/discuss

Reply via email to