Biorithm  1.1
 All Classes Functions Variables Typedefs Friends
constants.h
00001 /**************************************************************************
00002  * Copyright (c) 2004-2011 T. M. Murali                                   *
00003  *                                                                        *
00004  * This file is part of Biorithm.                                         *
00005  *                                                                        *
00006  * Biorithm is free software: you can redistribute it and/or modify       *
00007  * it under the terms of the GNU General Public License as published by   *
00008  * the Free Software Foundation, either version 3 of the License, or      *
00009  * (at your option) any later version.                                    *
00010  *                                                                        *
00011  * Biorithm is distributed in the hope that it will be useful,            *
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of         *
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
00014  * GNU General Public License for more details.                           *
00015  *                                                                        *
00016  * You should have received a copy of the GNU General Public License      *
00017  * along with Biorithm.  If not, see <http://www.gnu.org/licenses/>.      *
00018  *                                                                        *
00019  **************************************************************************/
00020 
00027 #ifndef _CONSTANTS_H
00028 #define _CONSTANTS_H
00029 
00030 #include <math.h>
00031 
00032 #ifndef PI_DEFINED
00033 #define PI_DEFINED 
00034 const double PI = 4*atan2(1.0, 1.0);
00035 #endif //
00036 const double E  = exp(1.0);
00037 const double SQRT2PI = sqrt(2*PI);
00038 const double SQRT2 = sqrt(2.0);
00039 
00040 // added after defining PI and E to disambiguate calls to
00041 // atan2() and exp() in std namespace and outside std namespace.
00042 using namespace std;
00043 
00044 // from http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html. Define a macro for the version of GCC we are running. gcc 3.4.3 will become 30403.
00045 #define GCC_VERSION (__GNUC__ * 10000 \
00046                                + __GNUC_MINOR__ * 100 \
00047                                + __GNUC_PATCHLEVEL__)
00048 
00049 #endif // _CONSTANTS_H 
 All Classes Functions Variables Typedefs Friends