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:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]


| -----Original Message-----
| From: [EMAIL PROTECTED]
| [mailto:[EMAIL PROTECTED] 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
|
|

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to