HOPS
HOPS class reference
Public Member Functions | List of all members
MHO_CheckForNaN Class Reference

checks if a value is NaN for various numerical types More...

#include <MHO_CheckForNaN.hh>

Public Member Functions

bool isnan (const double &value)
 Checks if a given double value is NaN. More...
 
bool isnan (const float &value)
 Checks if a float value is NaN using std::isnan. More...
 
bool isnan (const long double &value)
 Checks if a given value is Not-a-Number (NaN) using standard library's isnan(). More...
 
bool isnan (const std::complex< double > &value)
 Checks if a complex double value is NaN by examining its real and imaginary parts. More...
 
bool isnan (const std::complex< float > &value)
 Checks if a complex float value is NaN by examining its real and imaginary parts. More...
 
bool isnan (const std::complex< long double > &value)
 Checks if a complex long double value is NaN by examining its real and imaginary parts. More...
 

Detailed Description

checks if a value is NaN for various numerical types

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date
Thu Aug 12 11:16:36 2021 -0400

Member Function Documentation

◆ isnan() [1/6]

bool MHO_CheckForNaN< double >::isnan ( const double &  value)
inline

Checks if a given double value is NaN.

Parameters
valueInput double value to check for NaN.
Returns
True if value is NaN, false otherwise.

◆ isnan() [2/6]

bool MHO_CheckForNaN< float >::isnan ( const float &  value)
inline

Checks if a float value is NaN using std::isnan.

Parameters
valueInput float value to check for NaN.
Returns
Boolean indicating whether the input value is NaN.

◆ isnan() [3/6]

bool MHO_CheckForNaN< long double >::isnan ( const long double &  value)
inline

Checks if a given value is Not-a-Number (NaN) using standard library's isnan().

Parameters
valueInput long double value to check for NaN
Returns
Boolean indicating whether the input value is NaN or not

◆ isnan() [4/6]

bool MHO_CheckForNaN< std::complex< double > >::isnan ( const std::complex< double > &  value)
inline

Checks if a complex double value is NaN by examining its real and imaginary parts.

Parameters
valueInput complex double value to check for NaN.
Returns
True if either real or imaginary part is NaN, false otherwise.

◆ isnan() [5/6]

bool MHO_CheckForNaN< std::complex< float > >::isnan ( const std::complex< float > &  value)
inline

Checks if a complex float value is NaN by examining its real and imaginary parts.

Parameters
valueInput complex float value to check for NaN.
Returns
True if either real or imaginary part is NaN, false otherwise.

◆ isnan() [6/6]

bool MHO_CheckForNaN< std::complex< long double > >::isnan ( const std::complex< long double > &  value)
inline

Checks if a complex long double value is NaN by examining its real and imaginary parts.

Parameters
valueInput complex number to check for NaN
Returns
True if either real or imaginary part is NaN, false otherwise

The documentation for this class was generated from the following file: