00001 00003 00004 // 00005 // Copyright (c) 2005-2007 University of Southern California 00006 // Rob Peters <rjpeters at usc dot edu> 00007 // 00008 // created: Mon Jan 16 18:18:40 2006 00009 // commit: $Id: compat_cmath.cc 10065 2007-04-12 05:54:56Z rjpeters $ 00010 // $HeadURL: file:///lab/rjpeters/svnrepo/code/trunk/groovx/src/rutz/compat_cmath.cc $ 00011 // 00012 // -------------------------------------------------------------------- 00013 // 00014 // This file is part of GroovX. 00015 // [http://www.klab.caltech.edu/rjpeters/groovx/] 00016 // 00017 // GroovX is free software; you can redistribute it and/or modify it 00018 // under the terms of the GNU General Public License as published by 00019 // the Free Software Foundation; either version 2 of the License, or 00020 // (at your option) any later version. 00021 // 00022 // GroovX is distributed in the hope that it will be useful, but 00023 // WITHOUT ANY WARRANTY; without even the implied warranty of 00024 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00025 // General Public License for more details. 00026 // 00027 // You should have received a copy of the GNU General Public License 00028 // along with GroovX; if not, write to the Free Software Foundation, 00029 // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 00030 // 00032 00033 #ifndef GROOVX_RUTZ_COMPAT_CMATH_CC_UTC20060117021840_DEFINED 00034 #define GROOVX_RUTZ_COMPAT_CMATH_CC_UTC20060117021840_DEFINED 00035 00036 #include "rutz/compat_cmath.h" 00037 00038 #ifdef MISSING_M_PI 00039 00040 #include <cmath> 00041 00042 namespace 00043 { 00044 const double m_pi_value = 4.0 * atan(1.0); 00045 const double m_pi_2_value = 2.0 * atan(1.0); 00046 const double m_e_value = exp(1.0); 00047 const double m_ln2_value = log(2.0); 00048 } 00049 00050 double rutz::compat_m_pi() { return m_pi_value; } 00051 double rutz::compat_m_pi_2() { return m_pi_2_value; } 00052 double rutz::compat_m_e() { return m_e_value; } 00053 double rutz::compat_m_ln2() { return m_ln2_value; } 00054 00055 #endif 00056 00057 static const char __attribute__((used)) vcid_groovx_rutz_compat_cmath_cc_utc20060117021840[] = "$Id: compat_cmath.cc 10065 2007-04-12 05:54:56Z rjpeters $ $HeadURL: file: 00058 #endif // !GROOVX_RUTZ_COMPAT_CMATH_CC_UTC20060117021840DEFINED