56 lines
1.3 KiB
ReStructuredText
Executable File
56 lines
1.3 KiB
ReStructuredText
Executable File
==============
|
|
Special values
|
|
==============
|
|
|
|
|
|
NA values
|
|
=========
|
|
|
|
All OBITypes have an associated NA (Not Available) value.
|
|
NA values are implemented by specifying an explicit NA value for each type,
|
|
corresponding to the R standards as much as possible:
|
|
|
|
* For the type ``OBIInt_t``, the NA value is ``INT_MIN``.
|
|
|
|
* For the type ``OBIBool_t``, the NA value is ``2``.
|
|
|
|
* For the type ``OBIIdx_t`` and ``OBITaxid_t``, the NA value is ``SIZE_MAX``.
|
|
|
|
* For the type ``OBIChar_t``: the NA value is ``\0``.
|
|
|
|
* For the type ``OBIFloat_t``::
|
|
|
|
typedef union
|
|
{
|
|
double value;
|
|
unsigned int word[2];
|
|
} ieee_double;
|
|
|
|
static double NA_value(void)
|
|
{
|
|
volatile ieee_double x;
|
|
x.word[hw] = 0x7ff00000;
|
|
x.word[lw] = 1954;
|
|
return x.value;
|
|
}
|
|
|
|
|
|
Minimum and maximum values for ``OBIInt_t``
|
|
===========================================
|
|
|
|
* Maximum value : ``INT_MAX``
|
|
* Minimum value : ``INT_MIN(-1?)``
|
|
|
|
|
|
Infinity values for the type ``OBIFloat_t``
|
|
===========================================
|
|
|
|
* Positive infinity : ``INFINITY`` (should be defined in ``<math.h>``)
|
|
* Negative infinity : ``-INFINITY``
|
|
|
|
|
|
NaN value for the type ``OBIFloat_t``
|
|
=====================================
|
|
|
|
* NaN (Not a Number) value : ``NAN`` (should be defined in ``<math.h>`` but probably needs to be tested)
|