iir1
Toggle main menu visibility
Loading...
Searching...
No Matches
iir
MathSupplement.h
1
35
36
#pragma once
37
38
#include "Common.h"
39
40
#include<complex>
41
42
#ifdef _MSC_VER
43
// Under Unix these have already default instantiations but not under Vis Studio
44
template
class
IIR_EXPORT std::complex<double>;
45
template
class
IIR_EXPORT std::complex<float>;
46
#endif
47
48
namespace
Iir
{
49
50
const
double
doublePi =3.1415926535897932384626433832795028841971;
51
const
double
doublePi_2 =1.5707963267948966192313216916397514420986;
52
const
double
doubleLn2 =0.69314718055994530941723212145818;
53
const
double
doubleLn10 =2.3025850929940456840179914546844;
54
55
typedef
std::complex<double> complex_t;
56
typedef
std::pair<complex_t, complex_t> complex_pair_t;
57
58
inline
const
complex_t infinity()
59
{
60
return
complex_t (std::numeric_limits<double>::infinity());
61
}
62
63
template
<
typename
Ty,
typename
To>
64
inline
std::complex<Ty> addmul (
const
std::complex<Ty>& c,
65
Ty v,
66
const
std::complex<To>& c1)
67
{
68
return
std::complex <Ty> (
69
c.real() + v * c1.real(), c.imag() + v * c1.imag());
70
}
71
72
template
<
typename
Ty>
73
inline
Ty asinh (Ty x)
74
{
75
return
log (x + std::sqrt (x * x + 1 ));
76
}
77
78
template
<
typename
Ty>
79
inline
bool
is_nan (Ty v)
80
{
81
return
!(v == v);
82
}
83
84
template
<>
85
inline
bool
is_nan<complex_t> (complex_t v)
86
{
87
return
Iir::is_nan (v.real()) || Iir::is_nan (v.imag());
88
}
89
90
}
Iir
Definition
Biquad.cpp:40
Generated on
for iir1 by
1.17.0