xxx/mkfilter.h
00001
00002
00003
00004
00005
00006
00007 #include <string.h>
00008
00009 #define VERSION "4.6"
00010 #undef PI
00011 #define PI 3.14159265358979323846
00012 #define TWOPI (2.0 * PI)
00013 #define EPS 1e-10
00014 #define MAXORDER 12
00015 #define MAXPZ 2048
00016
00017 #define MAXSTRING 256
00018
00019 typedef void (*proc)();
00020 typedef unsigned int uint;
00021
00022 double atof(const char *);
00023 int atoi(char *);
00024 void exit(int);
00025
00026 extern const char *progname;
00027 extern void readdata(char*, double&, int&, double*, int&, double*);
00028
00029 inline double sqr(double x)
00030 {
00031 return x*x;
00032 }
00033
00034 inline bool seq(char *s1, char *s2)
00035 {
00036 return strcmp(s1, s2) == 0;
00037 }
00038
00039 inline bool onebit(uint m)
00040 {
00041 return (m != 0) && ((m & m - 1) == 0);
00042 }
00043
00044 inline double asinh(double x)
00045 {
00046
00047 return log(x + sqrt(1.0 + sqr(x)));
00048 }
00049
00050 inline double fix(double x)
00051 {
00052
00053 return (x >= 0.0) ? floor(0.5 + x) : -floor(0.5 - x);
00054 }