23 #if ! defined (octave_lo_ieee_h) 24 #define octave_lo_ieee_h 1 28 #include "octave-config.h" 30 #if defined (__cplusplus) 35 #define octave_Inf (lo_ieee_inf_value ()) 38 #define octave_NA (lo_ieee_na_value ()) 41 #define octave_NaN (lo_ieee_nan_value ()) 44 #define octave_Float_Inf (lo_ieee_float_inf_value ()) 47 #define octave_Float_NA (lo_ieee_float_na_value ()) 50 #define octave_Float_NaN (lo_ieee_float_nan_value ()) 67 #define LO_IEEE_NA_HW_OLD 0x7ff00000 68 #define LO_IEEE_NA_LW_OLD 1954 69 #define LO_IEEE_NA_HW 0x7FF840F4 70 #define LO_IEEE_NA_LW 0x40000000 71 #define LO_IEEE_NA_FLOAT 0x7FC207A2 101 #if defined (__cplusplus) 105 #define lo_ieee_isnan(x) \ 106 (sizeof (x) == sizeof (float) \ 107 ? __lo_ieee_float_isnan (x) : __lo_ieee_isnan (x)) 109 #define lo_ieee_finite(x) \ 110 (sizeof (x) == sizeof (float) \ 111 ? __lo_ieee_float_finite (x) : __lo_ieee_finite (x)) 113 #define lo_ieee_isinf(x) \ 114 (sizeof (x) == sizeof (float) \ 115 ? __lo_ieee_float_isinf (x) : __lo_ieee_isinf (x)) 117 #define lo_ieee_is_NA(x) \ 118 (sizeof (x) == sizeof (float) \ 119 ? __lo_ieee_float_is_NA (x) : __lo_ieee_is_NA (x)) 121 #define lo_ieee_is_NaN_or_NA(x) \ 122 (sizeof (x) == sizeof (float) \ 123 ? __lo_ieee_float_is_NaN_or_NA (x) : __lo_ieee_is_NaN_or_NA (x)) 125 #define lo_ieee_signbit(x) \ 126 (sizeof (x) == sizeof (float) \ 127 ? __lo_ieee_float_signbit (x) : __lo_ieee_signbit (x)) 129 #if defined (__cplusplus) 133 template <
typename T>
134 struct numeric_limits
136 static T
NA (
void) {
return static_cast<T
> (0); }
137 static T
NaN (
void) {
return static_cast<T
> (0); }
138 static T
Inf (
void) {
return static_cast<T
> (0); }
142 struct numeric_limits<
double>
150 struct numeric_limits<
float>
int __lo_ieee_finite(double x)
OCTAVE_API double lo_ieee_inf_value(void)
OCTAVE_API float lo_ieee_float_na_value(void)
OCTAVE_API int __lo_ieee_is_NA(double)
OCTAVE_API double lo_ieee_na_value(void)
int __lo_ieee_signbit(double x)
OCTAVE_API int __lo_ieee_float_is_NA(float)
OCTAVE_API double __lo_ieee_replace_old_NA(double)
int __lo_ieee_float_isinf(float x)
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the special constant used to designate missing values Note that NA always compares not equal to NA(NA !=NA). To find NA values
OCTAVE_API void octave_ieee_init(void)
int __lo_ieee_isnan(double x)
OCTAVE_API float lo_ieee_float_nan_value(void)
int __lo_ieee_isinf(double x)
OCTAVE_API double lo_ieee_nan_value(void)
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the IEEE symbol NaN(Not a Number). NaN is the result of operations which do not produce a well defined 0 result. Common operations which produce a NaN are arithmetic with infinity ex($\infty - \infty$)
int __lo_ieee_float_isnan(float x)
int __lo_ieee_float_signbit(float x)
int __lo_ieee_float_finite(float x)
OCTAVE_API float lo_ieee_float_inf_value(void)
OCTAVE_API int __lo_ieee_is_old_NA(double)
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE * x