48 return gnulib::trunc (x);
54 return gnulib::copysign (x, y);
65 return gnulib::round (x);
73 if (fabs (x - t) == 0.5)
95 return gnulib::log2 (x);
102 static double ln2 = M_LN2;
104 static double ln2 = gnulib::log (2);
107 return std::log (x) / ln2;
113 #if defined (HAVE_EXP2)
117 static double ln2 = M_LN2;
119 static double ln2 = gnulib::log (2);
122 return exp (x * ln2);
129 return gnulib::frexp (x, &exp);
136 double lax =
xlog2 (ax, exp);
137 return (ax != lax) ? (x / ax) * lax : x;
142 #if ! defined(HAVE_CMATH_ISNAN)
150 #if ! defined(HAVE_CMATH_ISFINITE)
158 #if ! defined(HAVE_CMATH_ISINF)
188 double xr =
real (x);
194 return -i * log (x + i * sqrt (tmp));
200 return log (x + sqrt (x + 1.0) * sqrt (x - 1.0));
215 double xr =
real (x);
221 return -i * log (i*x + sqrt (tmp));
227 return log (x + sqrt (x*x + 1.0));
235 return i * log ((i + x) / (i - x)) / 2.0;
241 return log ((1.0 + x) / (1.0 - x)) / 2.0;
283 return gnulib::truncf (x);
289 return gnulib::copysignf (x, y);
294 return gnulib::floorf (x);
300 return gnulib::roundf (x);
308 if (fabsf (x - t) == 0.5)
330 return gnulib::log2f (x);
337 static float ln2 = M_LN2;
339 static float ln2 = log (2);
342 return std::log (x) / ln2;
348 #if defined (HAVE_EXP2F)
350 #elif defined (HAVE_EXP2)
354 static float ln2 = M_LN2;
356 static float ln2 = log2 (2);
359 return exp (x * ln2);
366 return gnulib::frexpf (x, &exp);
373 float lax =
xlog2 (ax, exp);
374 return (ax != lax) ? (x / ax) * lax : x;
379 #if ! defined(HAVE_CMATH_ISNANF)
387 #if ! defined(HAVE_CMATH_ISFINITEF)
395 #if ! defined(HAVE_CMATH_ISINFF)
420 if (
imag (x) == 0.0
f)
431 return -i * log (x + i * sqrt (tmp));
437 return log (x + sqrt (x + 1.0
f) * sqrt (x - 1.0
f));
447 if (
imag (x) == 0.0
f)
458 return -i * log (i*x + sqrt (tmp));
464 return log (x + sqrt (x*x + 1.0
f));
472 return i * log ((i + x) / (i - x)) / 2.0f;
478 return log ((1.0
f + x) / (1.0
f - x)) / 2.0f;
563 const double pi = 3.14159265358979323846;
564 return x < 0.0 ?
Complex (gnulib::log (-x), pi) :
Complex (gnulib::log (x));
570 const float pi = 3.14159265358979323846f;
579 const double pil2 = 4.53236014182719380962;
586 const float pil2 = 4.53236014182719380962f;
593 const double pil10 = 1.36437635384184134748;
594 return x < 0.0 ?
Complex (log10 (-x), pil10) :
Complex (log10 (x));
600 const float pil10 = 1.36437635384184134748f;
664 return static_cast<int> ((x > 0) ? (x + 0.5) : (x - 0.5));
675 return static_cast<int> ((x > 0) ? (x + 0.5) : (x - 0.5));
Complex rc_asin(double x)
int __lo_ieee_signbit(double x)
Complex asinh(const Complex &x)
int __lo_ieee_float_signbit(float x)
Complex rc_acos(double x)
Complex xmax(const Complex &x, const Complex &y)
bool xnegative_sign(double x)
#define lo_ieee_finite(x)
Complex xmin(const Complex &x, const Complex &y)
Complex acosh(const Complex &x)
F77_RET_T const double const double * f
Complex atanh(const Complex &x)
Complex rc_sqrt(double x)
bool octave_is_NaN_or_NA(const Complex &x)
Complex rc_log2(double x)
Complex rc_atanh(double x)
Complex rc_log10(double x)
charNDArray max(char d, const charNDArray &m)
Complex rc_acosh(double x)
Complex asin(const Complex &x)
ColumnVector imag(const ComplexColumnVector &a)
std::complex< float > FloatComplex
std::complex< T > floor(const std::complex< T > &x)
double xcopysign(double x, double y)
std::complex< double > Complex
octave_idx_type NINTbig(double x)
Complex acos(const Complex &x)
ColumnVector real(const ComplexColumnVector &a)
Complex atan(const Complex &x)
F77_RET_T const double * x
charNDArray min(char d, const charNDArray &m)
bool octave_is_NA(double x)