26 #if ! defined (octave_lo_ieee_h)
27 #define octave_lo_ieee_h 1
29 #include "octave-config.h"
31 #if defined (__cplusplus)
40 #define octave_Inf (lo_ieee_inf_value ())
43 #define octave_NA (lo_ieee_na_value ())
46 #define octave_NaN (lo_ieee_nan_value ())
49 #define octave_Float_Inf (lo_ieee_float_inf_value ())
52 #define octave_Float_NA (lo_ieee_float_na_value ())
55 #define octave_Float_NaN (lo_ieee_float_nan_value ())
74 #if defined (__cplusplus)
112 #if defined (__cplusplus)
116 #define lo_ieee_isnan(x) \
117 (sizeof (x) == sizeof (float) \
118 ? __lo_ieee_float_isnan (x) : __lo_ieee_isnan (x))
120 #define lo_ieee_isfinite(x) \
121 (sizeof (x) == sizeof (float) \
122 ? __lo_ieee_float_isfinite (x) : __lo_ieee_isfinite (x))
124 #define lo_ieee_isinf(x) \
125 (sizeof (x) == sizeof (float) \
126 ? __lo_ieee_float_isinf (x) : __lo_ieee_isinf (x))
128 #define lo_ieee_is_NA(x) \
129 (sizeof (x) == sizeof (float) \
130 ? __lo_ieee_float_is_NA (x) : __lo_ieee_is_NA (x))
132 #define lo_ieee_signbit(x) \
133 (sizeof (x) == sizeof (float) \
134 ? __lo_ieee_float_signbit (x) : __lo_ieee_signbit (x))
136 #if defined (__cplusplus)
140 template <
typename T>
141 struct numeric_limits
144 static T NA () {
return static_cast<T
> (0); }
145 static T
NaN () {
return static_cast<T
> (0); }
146 static T
Inf () {
return static_cast<T
> (0); }
150 struct numeric_limits<double>
153 static double NA () {
return octave_NA; }
159 struct numeric_limits<float>
167 OCTAVE_END_NAMESPACE(
octave)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
double lo_ieee_inf_value(void)
double lo_ieee_na_value(void)
float lo_ieee_float_inf_value(void)
int __lo_ieee_signbit(double x)
void octave_ieee_init(void)
int __lo_ieee_isfinite(double x)
int __lo_ieee_isinf(double x)
int __lo_ieee_float_isinf(float x)
int __lo_ieee_float_signbit(float x)
double lo_ieee_nan_value(void)
int __lo_ieee_float_isfinite(float x)
int __lo_ieee_float_is_NA(float)
float lo_ieee_float_na_value(void)
float lo_ieee_float_nan_value(void)
int __lo_ieee_float_isnan(float x)
int __lo_ieee_isnan(double x)
int __lo_ieee_is_NA(double)
F77_RET_T const F77_DBLE * x