26 #if ! defined (octave_lo_ieee_h)
27 #define octave_lo_ieee_h 1
29 #include "octave-config.h"
33 #if defined (__cplusplus)
38 #define octave_Inf (lo_ieee_inf_value ())
41 #define octave_NA (lo_ieee_na_value ())
44 #define octave_NaN (lo_ieee_nan_value ())
47 #define octave_Float_Inf (lo_ieee_float_inf_value ())
50 #define octave_Float_NA (lo_ieee_float_na_value ())
53 #define octave_Float_NaN (lo_ieee_float_nan_value ())
96 #if defined (__cplusplus)
100 #define lo_ieee_isnan(x) \
101 (sizeof (x) == sizeof (float) \
102 ? __lo_ieee_float_isnan (x) : __lo_ieee_isnan (x))
104 #define lo_ieee_isfinite(x) \
105 (sizeof (x) == sizeof (float) \
106 ? __lo_ieee_float_isfinite (x) : __lo_ieee_isfinite (x))
108 #define lo_ieee_isinf(x) \
109 (sizeof (x) == sizeof (float) \
110 ? __lo_ieee_float_isinf (x) : __lo_ieee_isinf (x))
112 #define lo_ieee_is_NA(x) \
113 (sizeof (x) == sizeof (float) \
114 ? __lo_ieee_float_is_NA (x) : __lo_ieee_is_NA (x))
116 #define lo_ieee_is_NaN_or_NA(x) \
117 (sizeof (x) == sizeof (float) \
118 ? __lo_ieee_float_is_NaN_or_NA (x) : __lo_ieee_is_NaN_or_NA (x))
120 #define lo_ieee_signbit(x) \
121 (sizeof (x) == sizeof (float) \
122 ? __lo_ieee_float_signbit (x) : __lo_ieee_signbit (x))
124 #if defined (__cplusplus)
128 template <
typename T>
129 struct numeric_limits
132 static T NA (
void) {
return static_cast<T
> (0); }
133 static T
NaN (
void) {
return static_cast<T
> (0); }
134 static T
Inf (
void) {
return static_cast<T
> (0); }
138 struct numeric_limits<double>
141 static double NA (
void) {
return octave_NA; }
147 struct numeric_limits<float>
159 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
161 OCTAVE_DEPRECATED (7,
"use '__lo_ieee_isfinite' instead")
164 OCTAVE_DEPRECATED (7,
"use '__lo_ieee_float_isfinite' instead")
165 inline
int __lo_ieee_float_finite (
float x)
168 #define lo_ieee_finite(x) lo_ieee_isfinite(x)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
OCTAVE_API float lo_ieee_float_nan_value(void)
int __lo_ieee_signbit(double x)
OCTAVE_API double lo_ieee_nan_value(void)
OCTAVE_API float lo_ieee_float_na_value(void)
int __lo_ieee_isfinite(double x)
OCTAVE_API double lo_ieee_inf_value(void)
int __lo_ieee_isinf(double x)
OCTAVE_API int __lo_ieee_is_NA(double)
OCTAVE_API int __lo_ieee_float_is_NA(float)
OCTAVE_API double lo_ieee_na_value(void)
int __lo_ieee_float_isinf(float x)
int __lo_ieee_float_signbit(float x)
OCTAVE_API void octave_ieee_init(void)
int __lo_ieee_float_isfinite(float x)
int __lo_ieee_float_isnan(float x)
OCTAVE_API float lo_ieee_float_inf_value(void)
int __lo_ieee_isnan(double x)
F77_RET_T const F77_DBLE * x