|
IBAMR
IBAMR version 0.19.
|
#include <tbox/IEEE.h>
Static Public Member Functions | |
| static void | setupFloatingPointExceptionHandlers () |
| static float | getSignalingFloatNaN () |
| static double | getSignalingNaN () |
| static dcomplex | getSignalingComplexNaN () |
| static void | setNaN (float &f) |
| static void | setNaN (double &d) |
| static void | setNaN (dcomplex &dc) |
| static void | initializeArrayToSignalingNaN (Array< float > &array) |
| static void | initializeArrayToSignalingNaN (Array< double > &array) |
| static void | initializeArrayToSignalingNaN (Array< dcomplex > &array) |
| static void | initializeArrayToSignalingNaN (float *array, int n=1) |
| static void | initializeArrayToSignalingNaN (double *array, int n=1) |
| static void | initializeArrayToSignalingNaN (dcomplex *array, int n=1) |
| static bool | isNaN (const float &f) |
| static bool | isNaN (const double &d) |
| static bool | isNaN (const dcomplex &dc) |
Class IEEE is a utility providing rotuines for managing IEEE trap handlers and data set to signaling NaNs. Signaling NaNs force a trap if they are used in a numerical operation, so they are a useful way to track uninitialized floating point data. Signaling NaN's may only be used for double and float data (and the real ans imaginary parts of dcomplex data) and so operations are provided here for those types only.
IMPORTANT: To properly trap operations based on signaling NaN values, the routine IEEE::setupFloatingPointExceptionHandlers() must be called. This is normally done in the SAMRAIManager::startup() routine.
Note that all operations provided by this class (except for setting up exception handling) are implemented in
|
static |
|
static |
Get the IEEE float signaling NaN on architectures that support it. Using this value in a numerical expression will cause a program abort.
|
static |
Get the IEEE double signaling NaN on architectures that support it. Using this value in a numerical expression will cause a program abort.
|
static |
Get the dcomplex value with real and imaginary parts set to the IEEE double signaling NaN on architectures that support it. Using this value in a numerical expression will cause a program abort.
|
static |
Set supplied float value to the signaling NaN.
|
static |
Set supplied double value to the signaling NaN.
|
static |
Set real and imaginary parts of supplied dcomplex value to the double signaling NaN.
|
static |
Initialize an array of floats to signaling NaNs. Before using this array in any operation, the NaN value should be reset. Otherwise, an unrecoverable exception will result (as long as floating point exception handling is supported by the compiler).
Initialize an array of doubles to signaling NaNs. Before using this array in any operation, the NaN value should be reset. Otherwise, an unrecoverable exception will result (as long as floating point exception handling is supported by the compiler).
Initialize an array of dcomplex to signaling NaNs. Before using this array in any operation, the NaN value should be reset. Otherwise, an unrecoverable exception will result (as long as floating point exception handling is supported by the compiler).
|
static |
Initialize an array of floats to signaling NaNs. Before using this array in any operation, the NaN value should be reset. Otherwise, an unrecoverable exception will result (as long as floating point exception handling is supported by the compiler).
Initialize an array of doubles to signaling NaNs. Before using this array in any operation, the NaN value should be reset. Otherwise, an unrecoverable exception will result (as long as floating point exception handling is supported by the compiler).
|
static |
Initialize an array of dcomplex to signaling NaNs. Before using this array in any operation, the NaN value should be reset. Otherwise, an unrecoverable exception will result (as long as floating point exception handling is supported by the compiler).
|
static |
Return true if the supplied float value is NaN; else, false.
Return true if the supplied double value is NaN; else, false.
Return true if if either real and imaginary part of the supplied
dcomplex value is NaN; else, false.
1.8.17