STK++ 1.0
STK_Const_Math.h
Go to the documentation of this file.
00001 /*--------------------------------------------------------------------*/
00002 /*     Copyright (C) 2004-2007  Serge Iovleff
00003 
00004     This program is free software; you can redistribute it and/or modify
00005     it under the terms of the GNU Lesser General Public License as
00006     published by the Free Software Foundation; either version 2 of the
00007     License, or (at your option) any later version.
00008 
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU Lesser General Public License for more details.
00013 
00014     You should have received a copy of the GNU Lesser General Public
00015     License along with this program; if not, write to the
00016     Free Software Foundation, Inc.,
00017     59 Temple Place,
00018     Suite 330,
00019     Boston, MA 02111-1307
00020     USA
00021 
00022     Contact : Serge.Iovleff@stkpp.org
00023 */
00024 
00025 /*
00026  * Project:  stkpp::STatistiK::Analysis
00027  * Purpose:  Main mathematical constants
00028  * Author:   Serge Iovleff, serge.iovleff@stkpp.org
00029  *
00030  **/
00031 
00039 #ifndef STK_CONST_MATH_H
00040 #define STK_CONST_MATH_H
00041 
00042 #include "../../STKernel/include/STK_Real.h"
00043 
00044 namespace STK
00045 {
00046 
00047 namespace Const
00048 {
00050 static const Real _E_          = 2.718281828459045235360287471353;
00052 static const Real _PI_   = 3.141592653589793238462643383279502884197169399375;
00054 static const Real _EULER_  = 0.57721566490153286060651209008240243104215933594;
00056 static const Real _2PI_        = 6.283185307179586476925286766559;
00058 static const Real _PI_2_       = 1.570796326794896619231321691640;
00060 static const Real _PI_4_       = 0.785398163397448309615660845820;
00062 static const Real _1_PI     = 0.318309886183790671537767526745;
00064 static const Real _2_PI_     = 0.636619772367581343075535053490;
00066 static const Real _LOG2_       = 0.301029995663981195213738894724;
00068 static const Real _LOGE_       = 0.434294481903251827651128918917;
00070 static const Real _LN2_        = 0.693147180559945309417232121458;
00072 static const Real _LN10_       = 2.302585092994045684017991454684;
00074 static const Real _SQRT2_      = 1.414213562373095048801688724210;
00076 static const Real _SQRT3_      = 1.732050807568877293527446341506;
00078 static const Real _SQRT32_     = 5.656854249492380195206754896838;
00080 static const Real _1_SQRT2_  = 0.707106781186547524400844362105;
00082 static const Real _SQRTPI_     = 1.772453850905516027298167483341;
00084 static const Real _SQRT2_PI_   = 0.797884560802865355879892119869;
00086 static const Real _SQRT2PI_    = 2.506628274631000502415765284811045253007;
00088 static const Real _1_SQRTPI_ = 0.564189583547756286948079451561;
00090 static const Real _2_SQRTPI_ = 1.128379167095512573896158903122;
00092 static const Real _1_SQRT2PI_= 0.398942280401432677939946059934;
00094 static const Real _LNSQRTPI_   = 0.572364942924700087071713675677;
00096 static const Real _LNSQRT2PI_ = 0.918938533204672741780329736406;
00098 static const Real _LNSQRTPI_2_ = 0.225791352644727432363097614947;
00099 
00103 Real pi();
00104 
00108 inline Real pi_2() { return pi()/2.0;}
00109 
00113 Real euler();
00114 
00115 } // namespace Const
00116 
00117 } // namespace STK
00118 
00119 #endif // STK_CONSTMATH_H