44template class IIR_EXPORT std::complex<double>;
45template class IIR_EXPORT std::complex<float>;
50const double doublePi =3.1415926535897932384626433832795028841971;
51const double doublePi_2 =1.5707963267948966192313216916397514420986;
52const double doubleLn2 =0.69314718055994530941723212145818;
53const double doubleLn10 =2.3025850929940456840179914546844;
55typedef std::complex<double> complex_t;
56typedef std::pair<complex_t, complex_t> complex_pair_t;
58inline const complex_t infinity()
60 return complex_t (std::numeric_limits<double>::infinity());
63template <
typename Ty,
typename To>
64inline std::complex<Ty> addmul (
const std::complex<Ty>& c,
66 const std::complex<To>& c1)
68 return std::complex <Ty> (
69 c.real() + v * c1.real(), c.imag() + v * c1.imag());
75 return log (x + std::sqrt (x * x + 1 ));
79inline bool is_nan (Ty v)
85inline bool is_nan<complex_t> (complex_t v)
87 return Iir::is_nan (v.real()) || Iir::is_nan (v.imag());