26 #if ! defined (octave_lo_mappers_h)
27 #define octave_lo_mappers_h 1
29 #include "octave-config.h"
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); }
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>
178 inline bool isnan (
bool) {
return false; }
179 inline bool isnan (
char) {
return false; }
185 template <
typename T>
196 template <
typename T>
206 template <
typename T>
214 template <
typename T>
254 template <
typename T>
260 return tmp == 0 ? 0.0 :
x / tmp;
267 template <
typename T>
292 template <
typename T>
306 < std::numeric_limits<T>::epsilon ()))
313 volatile T tmp = y *
n;
319 if (
x != y && y != 0)
325 template <
typename T>
339 < std::numeric_limits<T>::epsilon ()))
346 volatile T tmp = y *
n;
352 if (
x != y && y != 0)
359 template <
typename T>
363 return x <= y ?
x : y;
366 template <
typename T>
370 return x >= y ?
x : y;
380 return isnan (y) ?
x : (
x <= y ?
x : y);
386 return isnan (y) ?
x : (
x >= y ?
x : y);
392 return isnan (y) ?
x : (
x <= y ?
x : y);
398 return isnan (y) ?
x : (
x >= y ?
x : y);
401 inline std::complex<double>
402 min (
const std::complex<double>&
x,
const std::complex<double>& y)
407 inline std::complex<float>
408 min (
const std::complex<float>&
x,
const std::complex<float>& y)
413 inline std::complex<double>
414 max (
const std::complex<double>&
x,
const std::complex<double>& y)
419 inline std::complex<float>
420 max (
const std::complex<float>&
x,
const std::complex<float>& y)
425 template <
typename T>
432 template <
typename T>
ColumnVector real(const ComplexColumnVector &a)
ColumnVector imag(const ComplexColumnVector &a)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
OCTAVE_API bool isna(double x)
OCTAVE_API Complex rc_sqrt(double)
Complex atan(const Complex &x)
OCTAVE_API Complex asin(const Complex &x)
OCTAVE_API double frexp(double x, int *expptr)
bool positive_sign(double x)
OCTAVE_API bool is_NaN_or_NA(const Complex &x)
std::complex< T > trunc(const std::complex< T > &x)
OCTAVE_API Complex rc_log(double)
OCTAVE_API int nint(double x)
OCTAVE_API Complex rc_acosh(double)
OCTAVE_API bool negative_sign(double x)
OCTAVE_API Complex acos(const Complex &x)
std::complex< T > floor(const std::complex< T > &x)
OCTAVE_API Complex rc_log2(double)
double copysign(double x, double y)
std::complex< T > ceil(const std::complex< T > &x)
OCTAVE_API Complex rc_atanh(double)
OCTAVE_API Complex rc_acos(double)
OCTAVE_API octave_idx_type nint_big(double x)
OCTAVE_API Complex rc_asin(double)
OCTAVE_API Complex rc_log10(double)
F77_RET_T const F77_DBLE * 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)