Simbody  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages

isNaN(x) provides a reliable way to determine if x is one of the "not a number" floating point forms. More...

Functions

bool SimTK::isNaN (const negator< float > &x)
 
bool SimTK::isNaN (const negator< double > &x)
 
bool SimTK::isNaN (const negator< long double > &x)
 
template<class P >
bool SimTK::isNaN (const negator< std::complex< P > > &x)
 
template<class P >
bool SimTK::isNaN (const negator< conjugate< P > > &x)
 
bool SimTK::isNaN (const float &x)
 
bool SimTK::isNaN (const double &x)
 
bool SimTK::isNaN (const long double &x)
 
template<class P >
bool SimTK::isNaN (const std::complex< P > &x)
 
template<class P >
bool SimTK::isNaN (const conjugate< P > &x)
 

Detailed Description

isNaN(x) provides a reliable way to determine if x is one of the "not a number" floating point forms.

Comparing x==NaN does not work because any relational operation involving NaN always return false, even (NaN==NaN)! This routine is specialized for all SimTK scalar types:

For complex and conjugate types, isNaN() returns true if either the real or imaginary part or both are NaN.

Function Documentation

bool SimTK::isNaN ( const negator< float > &  x)
inline
bool SimTK::isNaN ( const negator< double > &  x)
inline
bool SimTK::isNaN ( const negator< long double > &  x)
inline
template<class P >
bool SimTK::isNaN ( const negator< std::complex< P > > &  x)
inline
template<class P >
bool SimTK::isNaN ( const negator< conjugate< P > > &  x)
inline
bool SimTK::isNaN ( const float &  x)
inline
bool SimTK::isNaN ( const double &  x)
inline
bool SimTK::isNaN ( const long double &  x)
inline
template<class P >
bool SimTK::isNaN ( const std::complex< P > &  x)
inline
template<class P >
bool SimTK::isNaN ( const conjugate< P > &  x)
inline