Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2007-05-16 05:51:00


 

>-----Original Message-----
>From: boost-bounces_at_[hidden]
>[mailto:boost-bounces_at_[hidden]] On Behalf Of John Maddock
>Sent: 16 May 2007 09:56
>To: boost_at_[hidden]
>Subject: Re: [boost] [test] comparing floating point values
>
>Gennadiy Rozental wrote:
>>> No it failed, when I expected it to pass, however I don't have the
>>> test case
>>> to hand any more so maybe I misread the error messages?
>>
>> Why do you expect two infinity values to be close with any tolerance?
>
>Interesting question: if the too values are the same, then I
>would have
>expected BOOST_CHECK_CLOSE to pass. But then we get into
>philisophical
>discussions about whether two infinities are really the same :-)

Well we certainly don't want any philosophical discussions :-))

In BOOST_CHECK we are really comparing two bit patterns - both of which are std::numeric_limits<T>::infinity() and will presumably
pass a BOOST_CHECK_EQUAL test, so I also would expect a BOOST_CHECK_CLOSE pass, whatever the tolerance.

But most important is to try to agree and to document our conclusion?

Paul

---
Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
+44 1539561830 & SMS, Mobile +44 7714 330204 & SMS
pbristow_at_[hidden]
 

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk