c@241: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ c@241: c@241: /* c@241: QM DSP Library c@241: c@241: Centre for Digital Music, Queen Mary, University of London. c@241: This file copyright 2005-2006 Christian Landone. c@241: All rights reserved. c@241: */ c@241: c@241: #ifndef MATHALIASES_H c@241: #define MATHALIASES_H c@241: c@241: #include c@241: #include c@241: c@241: using namespace std; c@241: typedef complex ComplexData; c@241: c@241: c@241: #ifndef PI c@241: #define PI (3.14159265358979232846) c@241: #endif c@241: c@279: #define TWO_PI (2. * PI) c@241: c@241: #define EPS 2.2204e-016 c@241: c@241: /* aliases to math.h functions */ c@241: #define EXP exp c@241: #define COS cos c@241: #define SIN sin c@241: #define ABS fabs c@241: #define POW powf c@241: #define SQRT sqrtf c@241: #define LOG10 log10f c@241: #define LOG logf c@241: #define FLOOR floorf c@241: #define TRUNC truncf c@241: c@241: /* aliases to complex.h functions */ c@241: /** sample = EXPC(complex) */ c@241: #define EXPC cexpf c@241: /** complex = CEXPC(complex) */ c@241: #define CEXPC cexp c@241: /** sample = ARGC(complex) */ c@241: #define ARGC cargf c@241: /** sample = ABSC(complex) norm */ c@241: #define ABSC cabsf c@241: /** sample = REAL(complex) */ c@241: #define REAL crealf c@241: /** sample = IMAG(complex) */ c@241: #define IMAG cimagf c@241: c@241: #endif