RTXI  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
filtmath.cpp
Go to the documentation of this file.
1 //
2 // file = filtmath.cpp
3 //
4 // special functions for computing performance
5 // of equiripple filters
6 //
7 #include "filtmath.h"
8 #include "misdefs.h"
9 #include <fstream>
10 #include <iostream>
11 #include <math.h>
12 #include <stdlib.h>
13 
14 double
15 DSubInf(double delta_p, double delta_s)
16 {
17  double log_delta_p, work;
18  double a1 = 5.309e-3;
19  double a2 = 7.114e-2;
20  double a3 = -4.761e-1;
21  double a4 = -2.66e-3;
22  double a5 = -5.941e-1;
23  double a6 = -4.278e-1;
24 
25  log_delta_p = log10(delta_p);
26 
27  work = a2 + a1 * log_delta_p;
28  work *= log_delta_p;
29  work += a3;
30  work *= log10(delta_s);
31 
32  work += a4 * log_delta_p * log_delta_p;
33  work += a5 * log_delta_p;
34  work += a6;
35 
36  return work;
37 }
double DSubInf(double delta_p, double delta_s)
Definition: filtmath.cpp:15