#include <source/toolbox/base/IEEE.h>
Static Public Member Functions | |
static void | setupExceptionHandlers () |
static float | getSignalingFloatNaN () |
static double | getSignalingNaN () |
static int | getINT_MAX () |
static int | getINT_MIN () |
static float | getFLT_MAX () |
static float | getFLT_MIN () |
static float | getFLT_EPSILON () |
static double | getDBL_MAX () |
static double | getDBL_MIN () |
static double | getDBL_EPSILON () |
static void | setNaN (float &f) |
static void | setNaN (double &d) |
static void | initializeArrayToSignalingNaN (Array< float > &data) |
static void | initializeArrayToSignalingNaN (Array< double > &data) |
static void | initializeArrayToINT_MAX (Array< int > &data) |
static void | initializeArrayToINT_MIN (Array< int > &data) |
static void | initializeArrayToFLT_MAX (Array< float > &data) |
static void | initializeArrayToFLT_MIN (Array< float > &data) |
static void | initializeArrayToDBL_MAX (Array< double > &data) |
static void | initializeArrayToDBL_MIN (Array< double > &data) |
static void | initializeArrayToSignalingNaN (float *data, const int n=1) |
static void | initializeArrayToSignalingNaN (double *data, const int n=1) |
static void | initializeArrayToINT_MAX (int *data, const int n=1) |
static void | initializeArrayToINT_MIN (int *data, const int n=1) |
static void | initializeArrayToFLT_MAX (float *data, const int n=1) |
static void | initializeArrayToFLT_MIN (float *data, const int n=1) |
static void | initializeArrayToDBL_MAX (double *data, const int n=1) |
static void | initializeArrayToDBL_MIN (double *data, const int n=1) |
static bool | isNaN (const float &f) |
static bool | isNaN (const double &d) |
The implementation of this class depends heavily on the particular computer architecture and how it implements floating point arithmetic and hardware traps. Unfortunately, there is no POSIX/IEEE standard on how to manage the traps generated by floating point calculations.
|
Set up IEEE exception handlers so that normal IEEE exceptions will cause a program abort. This is useful for tracking down errors. Note, however, that this may cause problems if your code relies on IEEE underflow or overflow traps. |
|
Get the IEEE float signaling NaN on architectures that support it. Using this value in a numerical expression will cause a program abort. |
|
Get the IEEE double signaling NaN on architectures that support it. Using this value in a numerical expression will cause a program abort. |
|
Get max int - INT_MAX (may be compiler dependent; typical value is 2147483647). |
|
Get min int - INT_MIN (may be compiler dependent; typical value is -2147483648). |
|
Get max float - FLT_MAX (may be compiler dependent; typical value is 3.40282e+38). |
|
Get min float - FLT_MIN (may be compiler dependent; typical value is 1.17549e-38). |
|
Get epsilon for float - FLT_EPSILON (may be compiler dependent; typical value is 1.19209e-07). |
|
Get max double - DBL_MAX (may be compiler dependent; typical value is 1.79769e+308). |
|
Get min double - DBL_MIN (may be compiler dependent; typical value is 2.22507e-308). |
|
Get epsilon for double - DBL_EPSILON (may be compiler dependent; typical value is 2.22045e-16). |
|
Set supplied value to the signaling NaN. |
|
Set supplied value to the signaling NaN. |
|
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 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 ints to system INT_MAX. |
|
Initialize an array of ints to system INT_MIN. |
|
Initialize an array of floats to system FLT_MAX. |
|
Initialize an array of floats to system FLT_MIN. |
|
Initialize an array of doubles to system DBL_MAX. |
|
Initialize an array of doubles to system DBL_MIN. |
|
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 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 ints to system INT_MAX. |
|
Initialize an array of ints to system INT_MIN. |
|
Initialize an array of floats to system FLT_MAX. |
|
Initialize an array of floats to system FLT_MIN. |
|
Initialize an array of doubles to system DBL_MAX. |
|
Initialize an array of doubles to system DBL_MIN. |
|
Indicates whether the supplied value is NaN. |
|
Indicates whether the supplied value is NaN. |