26 #if ! defined (octave_lo_mappers_h)
27 #define octave_lo_mappers_h 1
29 #include "octave-config.h"
43 extern OCTAVE_API
bool isna (
double x);
44 extern OCTAVE_API
bool isna (
float x);
52 inline float copysign (
float x,
float y) {
return std::copysignf (
x, y); }
76 inline double conj (
double x) {
return x; }
77 inline float conj (
float x) {
return x; }
87 inline float log2 (
float x) {
return std::log2f (
x); }
92 extern OCTAVE_API
double log2 (
double x,
int& exp);
93 extern OCTAVE_API
float log2 (
float x,
int& exp);
99 inline float exp2 (
float x) {
return std::exp2f (
x); }
101 template <
typename T>
109 template <
typename T>
121 template <
typename T>
128 template <
typename T>
137 inline float round (
float x) {
return std::roundf (
x); }
139 template <
typename T>
151 if (fabs (
x - t) == 0.5)
162 if (fabsf (
x - t) == 0.5f)
168 template <
typename T>
175 extern OCTAVE_API
double frexp (
double x,
int *expptr);
176 extern OCTAVE_API
float frexp (
float x,
int *expptr);
178 inline bool isnan (
bool) {
return false; }
179 inline bool isnan (
char) {
return false; }
185 template <
typename T>
196 template <
typename T>
207 template <
typename T>
247 template <
typename T>
253 return tmp == 0 ? 0.0 :
x / tmp;
260 template <
typename T>
282 extern OCTAVE_API
int nint (
double x);
283 extern OCTAVE_API
int nint (
float x);
285 template <
typename T>
299 < std::numeric_limits<T>::epsilon ()))
306 volatile T tmp = y *
n;
312 if (
x != y && y != 0)
318 template <
typename T>
332 < std::numeric_limits<T>::epsilon ()))
339 volatile T tmp = y *
n;
345 if (
x != y && y != 0)
352 template <
typename T>
356 return x <= y ?
x : y;
359 template <
typename T>
363 return x >= y ?
x : y;
373 return isnan (y) ?
x : (
x <= y ?
x : y);
379 return isnan (y) ?
x : (
x >= y ?
x : y);
385 return isnan (y) ?
x : (
x <= y ?
x : y);
391 return isnan (y) ?
x : (
x >= y ?
x : y);
394 inline std::complex<double>
395 min (
const std::complex<double>&
x,
const std::complex<double>& y)
400 inline std::complex<float>
401 min (
const std::complex<float>&
x,
const std::complex<float>& y)
406 inline std::complex<double>
407 max (
const std::complex<double>&
x,
const std::complex<double>& y)
412 inline std::complex<float>
413 max (
const std::complex<float>&
x,
const std::complex<float>& y)
418 template <
typename T>
425 template <
typename T>
ColumnVector real(const ComplexColumnVector &a)
ColumnVector imag(const ComplexColumnVector &a)
F77_RET_T const F77_DBLE * x
Complex atan(const Complex &x)
std::complex< T > round(const std::complex< T > &x)
std::complex< T > conj(const std::complex< T > &x)
Complex rc_acos(double x)
bool isfinite(const std::complex< T > &x)
double copysign(double x, double y)
double frexp(double x, int *expptr)
std::complex< T > trunc(const std::complex< T > &x)
bool is_NaN_or_NA(const Complex &x)
float copysign(float x, float y)
octave_idx_type nint_big(double x)
Complex acos(const Complex &x)
Complex asin(const Complex &x)
FloatComplex atan(const FloatComplex &x)
Complex rc_log2(double x)
Complex rc_sqrt(double x)
Complex rc_atanh(double x)
bool negative_sign(double x)
bool isnan(const std::complex< T > &x)
std::complex< T > ceil(const std::complex< T > &x)
Complex rc_acosh(double x)
Complex rc_log10(double x)
Complex rc_asin(double x)
Complex log2(const Complex &x)
std::complex< T > floor(const std::complex< T > &x)
bool isinf(const std::complex< T > &x)
bool positive_sign(double x)
std::complex< double > Complex
std::complex< float > FloatComplex
octave_int< T > xmin(const octave_int< T > &x, const octave_int< T > &y)
octave_int< T > xmax(const octave_int< T > &x, const octave_int< T > &y)
octave_value::octave_value(const Array< char > &chm, char type) return retval