qm-dsp 1.8
MathAliases.h
Go to the documentation of this file.
1/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3/*
4 QM DSP Library
5
6 Centre for Digital Music, Queen Mary, University of London.
7 This file 2005-2006 Christian Landone.
8
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information.
14*/
15
16#ifndef MATHALIASES_H
17#define MATHALIASES_H
18
19#include <cmath>
20#include <complex>
21
22using namespace std;
23typedef complex<double> ComplexData;
24
25
26#ifndef PI
27#define PI (3.14159265358979232846)
28#endif
29
30#define TWO_PI (2. * PI)
31
32#define EPS 2.2204e-016
33
34/* aliases to math.h functions */
35#define EXP exp
36#define COS cos
37#define SIN sin
38#define ABS fabs
39#define POW powf
40#define SQRT sqrtf
41#define LOG10 log10f
42#define LOG logf
43#define FLOOR floorf
44#define TRUNC truncf
45
46/* aliases to complex.h functions */
48#define EXPC cexpf
50#define CEXPC cexp
52#define ARGC cargf
54#define ABSC cabsf
56#define REAL crealf
58#define IMAG cimagf
59
60#endif
complex< double > ComplexData
Definition MathAliases.h:23