isNaN(x) provides a reliable way to determine if x is one of the "not a
number" floating point forms.
More...
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:
- float, double
- std::complex<P> (P is one of the above precisions)
- SimTK::conjugate<P>
- SimTK::negator<T> (T is any of the above)
For complex and conjugate types, isNaN() returns true if either the real or imaginary part or both are NaN.
◆ isNaN() [1/8]
bool SimTK::isNaN |
( |
const negator< float > & |
x | ) |
|
|
inline |
◆ isNaN() [2/8]
bool SimTK::isNaN |
( |
const negator< double > & |
x | ) |
|
|
inline |
◆ isNaN() [3/8]
template<class P >
bool SimTK::isNaN |
( |
const negator< std::complex< P > > & |
x | ) |
|
|
inline |
◆ isNaN() [4/8]
◆ isNaN() [5/8]
bool SimTK::isNaN |
( |
const float & |
x | ) |
|
|
inline |
◆ isNaN() [6/8]
bool SimTK::isNaN |
( |
const double & |
x | ) |
|
|
inline |
◆ isNaN() [7/8]
template<class P >
bool SimTK::isNaN |
( |
const std::complex< P > & |
x | ) |
|
|
inline |
◆ isNaN() [8/8]
template<class P >
bool SimTK::isNaN |
( |
const conjugate< P > & |
x | ) |
|
|
inline |