25 return eT(std::rand()) / eT(RAND_MAX);
35 operator std::complex<T> ()
82 tmp1 = eTp(2) * eTp(std::rand()) / eTp(RAND_MAX) - eTp(1);
83 tmp2 = eTp(2) * eTp(std::rand()) / eTp(RAND_MAX) - eTp(1);
84 w = tmp1*tmp1 + tmp2*tmp2;
86 while ( w >= eTp(1) );
108 operator std::complex<T> ()
const 179 template<
typename eT>
185 return eT(
std::log(
double(x))/
double(0.69314718055994530942) );
189 template<
typename eT>
196 return std::log(x) / T(0.69314718055994530942);
200 template<
typename eT>
206 return eT(
std::pow(
double(10),
double(x)) );
210 template<
typename eT>
222 template<
typename eT>
228 return eT(
std::pow(
double(2),
double(x)) );
232 template<
typename eT>
243 template<
typename T1,
typename T2>
247 pow(
const T1 base,
const T2 exponent)
254 template<
typename T1,
typename T2>
258 pow(
const T1 base,
const T2 exponent)
260 return T1(
std::pow(
double(base),
double(exponent) ) );
265 template<
typename eT>
276 template<
typename eT>
290 const eT radix_eT = eT(std::numeric_limits<eT>::radix);
291 const eT digits_m1_eT = eT(std::numeric_limits<eT>::digits - 1);
309 const T radix_T = T(std::numeric_limits<T>::radix);
310 const T digits_m1_T = T(std::numeric_limits<T>::digits - 1);
static arma_float_only< T >::result direct_eps(const std::complex< T > x)
arma_inline eT arma_asinh(const eT x)
arma_inline const eOp< T1, eop_ceil > ceil(const Base< typename T1::elem_type, T1 > &A)
static arma_inline arma_integral_only< eT >::result atanh(const eT x)
static arma_inline arma_float_or_cx_only< eT >::result exp2(const eT x)
arma_inline const eOp< T1, eop_exp > exp(const Base< typename T1::elem_type, T1 > &A)
arma_inline const eOp< T1, eop_log10 > log10(const Base< typename T1::elem_type, T1 > &A)
static arma_inline arma_integral_only< eT >::result acos(const eT x)
arma_inline std::complex< T > arma_asin(const std::complex< T > &x)
static arma_inline arma_float_or_cx_only< eT >::result cos(const eT x)
arma_inline const eOp< T1, eop_sqrt > sqrt(const Base< typename T1::elem_type, T1 > &A)
static arma_inline arma_cx_only< eT >::result atan(const eT x)
static arma_inline arma_signed_only< eT >::result neg(const eT x)
static arma_inline arma_integral_only< eT >::result tan(const eT x)
arma_inline const eOp< T1, eop_cosh > cosh(const Base< typename T1::elem_type, T1 > &A)
static arma_inline arma_signed_integral_only< eT >::result arma_abs(const eT x)
static arma_inline arma_integral_only< eT >::result log(const eT x)
static arma_inline arma_float_only< eT >::result ceil(const eT x)
arma_inline const eOp< T1, eop_cos > cos(const Base< typename T1::elem_type, T1 > &A)
static arma_inline arma_float_only< eT >::result atan(const eT x)
arma_inline const eOp< T1, eop_tanh > tanh(const Base< typename T1::elem_type, T1 > &A)
static arma_inline arma_integral_only< eT >::result cosh(const eT x)
arma_inline const T1 & conj(const Base< typename T1::pod_type, T1 > &A)
arma_inline std::complex< T > arma_atan(const std::complex< T > &x)
static arma_inline arma_float_or_cx_only< eT >::result tan(const eT x)
arma_inline const eOp< T1, eop_sinh > sinh(const Base< typename T1::elem_type, T1 > &A)
static arma_inline arma_integral_only< eT >::result asin(const eT x)
arma_inline const eOp< T1, eop_tan > tan(const Base< typename T1::elem_type, T1 > &A)
static arma_inline arma_cx_only< eT >::result acos(const eT x)
static arma_inline arma_integral_only< eT >::result floor(const eT x)
static arma_inline arma_float_only< T >::result arma_abs(const std::complex< T > x)
static arma_inline arma_not_cx< eT >::result conj(const eT x)
static arma_inline arma_float_or_cx_only< eT >::result log10(const eT x)
static arma_inline arma_integral_only< eT >::result exp10(const eT x)
arma_inline const eOp< T1, eop_sin > sin(const Base< typename T1::elem_type, T1 > &A)
static arma_inline arma_float_only< eT >::result asin(const eT x)
static arma_inline arma_unsigned_integral_only< eT >::result neg(const eT x)
static arma_inline arma_integral_only< eT >::result exp2(const eT x)
static arma_inline arma_float_or_cx_only< eT >::result exp(const eT x)
static arma_inline arma_integral_only< eT >::result sin(const eT x)
static arma_inline arma_float_or_cx_only< eT >::result acosh(const eT x)
static arma_inline arma_float_or_cx_only< eT >::result cosh(const eT x)
static arma_inline arma_float_or_cx_only< eT >::result tanh(const eT x)
static arma_inline arma_float_or_cx_only< eT >::result log(const eT x)
arma_inline eT arma_acosh(const eT x)
static arma_inline arma_integral_only< eT >::result log2(const eT x)
arma_inline const eOp< T1, eop_atan > atan(const Base< typename T1::elem_type, T1 > &A)
static arma_inline arma_cx_only< eT >::result ceil(const eT &x)
static arma_inline arma_float_or_cx_only< eT >::result log2(const eT x)
static arma_inline arma_integral_only< eT >::result exp(const eT x)
static arma_float_only< eT >::result direct_eps(const eT x)
static arma_inline arma_integral_only< eT >::result atan(const eT x)
static arma_inline arma_integral_only< eT >::result acosh(const eT x)
static arma_inline arma_float_only< eT >::result arma_abs(const eT x)
static arma_inline arma_integral_only< eT >::result ceil(const eT x)
static arma_inline arma_integral_only< eT >::result tanh(const eT x)
static arma_inline arma_unsigned_integral_only< eT >::result arma_abs(const eT x)
work around a bug in GCC 4.4
arma_inline const eOp< T1, eop_abs > abs(const Base< typename T1::elem_type, T1 > &X, const typename arma_not_cx< typename T1::elem_type >::result *junk=0)
static arma_inline arma_integral_only< eT >::result log10(const eT x)
arma_inline const eOp< T1, eop_pow > pow(const Base< typename T1::elem_type, T1 > &A, const typename T1::elem_type exponent)
static arma_inline std::complex< T > conj(const std::complex< T > &x)
static arma_inline arma_float_or_cx_only< eT >::result asinh(const eT x)
arma_inline const eOp< T1, eop_asin > asin(const Base< typename T1::elem_type, T1 > &A)
static arma_inline arma_float_or_cx_only< eT >::result sinh(const eT x)
static arma_inline arma_integral_only< eT >::result sqrt(const eT x)
static arma_inline arma_float_or_cx_only< eT >::result exp10(const eT x)
arma_inline const eOp< T1, eop_acos > acos(const Base< typename T1::elem_type, T1 > &A)
static arma_inline arma_cx_only< eT >::result asin(const eT x)
static arma_inline arma_float_only< eT >::result acos(const eT x)
static arma_inline arma_integral_only< eT >::result sinh(const eT x)
arma_inline const eOp< T1, eop_log > log(const Base< typename T1::elem_type, T1 > &A)
arma_inline std::complex< T > arma_acos(const std::complex< T > &x)
arma_inline eT arma_atanh(const eT x)
static arma_inline arma_integral_only< eT >::result direct_eps(const eT)
static arma_inline arma_integral_only< eT >::result asinh(const eT x)
static arma_inline arma_integral_only< T1 >::result pow(const T1 base, const T2 exponent)
static arma_inline arma_integral_only< eT >::result cos(const eT x)
arma_inline const eOp< T1, eop_floor > floor(const Base< typename T1::elem_type, T1 > &A)
static arma_inline arma_cx_only< eT >::result floor(const eT &x)
static arma_inline arma_float_only< eT >::result floor(const eT x)
static arma_inline arma_float_or_cx_only< eT >::result sqrt(const eT x)
static arma_inline arma_float_or_cx_only< T1 >::result pow(const T1 base, const T2 exponent)
static arma_inline arma_float_or_cx_only< eT >::result sin(const eT x)
static arma_inline arma_float_or_cx_only< eT >::result atanh(const eT x)