# Ox Predefined Constants

Constants defined in `oxstd.oxh` (requires `#include <oxstd.oxh>`)

    FALSE           0
    TRUE            1

    WFL_DECFAILED   1
    WFL_ITMAX       2
    WFL_CONCAT      4

Constants defined in `oxfloat.oxh` (requires `#include <oxfloat.oxh>`)

    M_PI            pi (3.1415...)
    M_2PI           2*pi
    M_PI_2          pi / 2
    M_1_PI          1 / pi
    M_SQRT2PI		sqrt(2*pi)
    M_E             e = exp(1)
    M_EULER         Euler's constant,
    M_NAN           .NaN (Not a Number),
                    also see isnan() and isdotnan()
    M_INF           .Inf, representing Infinity
    M_INF_POS       +.Inf, representing Infinity
    M_INF_NEG       -.Inf, representing minus Infinity
    DBL_DIG         number of decimal digits of precision
    DBL_EPSILON     machine precision
    DBL_MANT_DIG    number of bits in mantissa
    DBL_MAX         maximum double value
    DBL_MIN         minimum positive double value
    DBL_MIN_EXP     minimum 2 exponent
    DBL_MAX_EXP     maximum 2 exponent
    DBL_MIN_E_EXP   minimum exp(.) exponent
    DBL_MAX_E_EXP   maximum exp(.) exponent
    DBL_MIN_10_EXP  minimum 10 exponent
    DBL_MAX_10_EXP  maximum 10 exponent
    INT_MAX         maximum integer value
    INT_MIN         minimum integer value

The following constants are predefined by the Ox compiler:

    OX_64_BIT      when running 64-bit Ox
    OX_AIX         when running on IBM/AIX
    OX_BIG_ENDIAN  only on a big-endian machine (Unix workstations)
    OX_DecUNIX     when running on Dec/UNIX
    OX_HPUX        when running on HP-UX
    OX_Irix        when running on SGI/Irix
    OX_Linux       when running on Linux/PC
    OX_OS_X        when running on Mac/OS X
    OX_PARALLEL    indicates that parallel and serial keywords are supported (Ox 7 onwards)
    OX_Sun         when running on Sun
    OX_Windows     when running under Windows

## Missing values (NaN)

The hardware-defined missing value is called Not a Number, or `.NaN` for short. Any computation involving a `.NaN` results in a `.NaN`. The format used when printing output is `.NaN`.

In a matrix constant, either `.NaN`, `M_NAN` or a dot may be used to represent a missing value (`M_NAN` requires `oxfloat.oxh`). If the dot is the first or last element, an extra space is required to avoid confusion with dot-greater/less than.

In a double constant, either `.NaN` or `M_NAN` may be used to represent a missing value (`M_NAN` requires `oxfloat.oxh`). A number of procedures are available to deal with missing values, most importantly:

`deletec()`: | deletes all columns which have a `.NaN`,
`deleter()`: | deletes all rows which have a `.NaN`,
`isdotnan()`: | returns matrix of 0's and 1's: 1 if the element is a `.NaN`, 0 otherwise,
`isnan()`: | returns 1 if any element is a `.NaN`, 0 otherwise.
`selectc()`: | selects all columns which have a `.NaN`,
`selectr()`: | selects all rows which have a `.NaN`,

## Infinity

Infinity also exists as a special value supported by the hardware. Infinity can be positive or negative (printed as `+.Inf` and `-.Inf`), and can be used in comparisons as any normal number. You can use `.Inf`, `+.Inf` and `-.Inf` in your code. Alternatively, the predefined constants `M_INF`, `M_INF_POS`, and `M_INF_NEG` are defined in `oxfloat.oxh`.

Ox version 7.00. © JA Doornik This file last changed
.