qm-dsp  1.8
MathAliases.h
Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
00002 
00003 /*
00004     QM DSP Library
00005 
00006     Centre for Digital Music, Queen Mary, University of London.
00007     This file 2005-2006 Christian Landone.
00008 
00009     This program is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU General Public License as
00011     published by the Free Software Foundation; either version 2 of the
00012     License, or (at your option) any later version.  See the file
00013     COPYING included with this distribution for more information.
00014 */
00015 
00016 #ifndef MATHALIASES_H
00017 #define MATHALIASES_H
00018 
00019 #include <cmath>
00020 #include <complex>
00021 
00022 using namespace std;
00023 typedef complex<double> ComplexData;
00024 
00025 
00026 #ifndef PI
00027 #define PI (3.14159265358979232846)
00028 #endif
00029 
00030 #define TWO_PI          (2. * PI)
00031 
00032 #define EPS 2.2204e-016
00033 
00034 /* aliases to math.h functions */
00035 #define EXP                             exp
00036 #define COS                             cos
00037 #define SIN                             sin
00038 #define ABS                             fabs
00039 #define POW                             powf
00040 #define SQRT                    sqrtf
00041 #define LOG10                   log10f
00042 #define LOG                             logf
00043 #define FLOOR                   floorf
00044 #define TRUNC                   truncf
00045 
00046 /* aliases to complex.h functions */
00048 #define EXPC                    cexpf
00049 
00050 #define CEXPC                   cexp
00051 
00052 #define ARGC                    cargf
00053 
00054 #define ABSC                    cabsf
00055 
00056 #define REAL                    crealf
00057 
00058 #define IMAG                    cimagf
00059 
00060 #endif