Boost logo

Boost :

From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-07-04 09:08:23


I have just seen a similar warning with the interval library.

However

(v != v)

does now work as expected on MSVC 7.1 (all comparisons with NaN fail)

so I think it does work OK for this compiler.

But it would be much better if isNaN was properly defined somewhere. Perhaps we
have to wait for the Standards committee to see if C99 is to be added to the C++
Library.

Paul

Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
Mobile mailto:pabristow_at_[hidden]
mailto:pbristow_at_[hidden]

| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of jvd
| Sent: Friday, July 04, 2003 12:34 PM
| To: Boost mailing list
| Subject: [boost] is_nan
|
|
| Dear boosters,
|
| seems like this code
|
| template< typename T >
| bool is_nan( const T& v )
| {
| return std::numeric_limits<T>::has_quiet_NaN && (v != v);
| }
|
| does not work correctly on some machines.
|
| As far, as I can remember, intervals library also use similar implementation
| of is_nan. So there should be just the same problem.
|
| Respect,
| Justinas V.D.
| _______________________________________________
| Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
|
|


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