Qucs-core  0.0.19
consts.h
Go to the documentation of this file.
00001 /*
00002  * consts.h - global math constant header file
00003  *
00004  * Copyright (C) 2004, 2005, 2007 Stefan Jahn <stefan@lkcc.org>
00005  * Copyright (C) 2015 Guilherme Brondani Torri <guitorri@gmail.com>
00006  *
00007  * This is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2, or (at your option)
00010  * any later version.
00011  *
00012  * This software is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this package; see the file COPYING.  If not, write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
00020  * Boston, MA 02110-1301, USA.
00021  *
00022  * $Id$
00023  *
00024  */
00025 
00033 #ifndef __CONSTS_H__
00034 #define __CONSTS_H__
00035 
00036 #include <cmath>
00037 
00038 namespace qucs {
00039 
00047 static const double pi = 3.1415926535897932384626433832795029;
00048 
00050 static const double pi_over_2 = 1.5707963267948966192313216916397514;
00051 
00053 static const double pi_over_4 = 0.7853981633974483096156608458198757;
00054 
00056 static const double one_over_pi = 0.3183098861837906715377675267450287;
00057 
00058 /*\brief Twice the inverse of Archimedes' constant (\f$2/\pi\f$) */
00059 static const double two_over_pi = 0.6366197723675813430755350534900574;
00060 
00062 static const double sqrt_pi = 1.77245385090551602729816748334;
00063 
00065 static const double euler = 2.7182818284590452353602874713526625;
00066 
00068 static const double log10e = 0.4342944819032518276511289189166051;
00069 
00071 static const double log2e = 1.4426950408889634073599246810018922;
00072 
00074 static const double ln2 = 0.6931471805599453094172321214581766;
00075 
00077 static const double ln10 = 2.3025850929940456840179914546843642;
00078 
00080 static const double sqrt2 = 1.4142135623730950488016887242096981;
00081 
00083 static const double sqrt1_2 = 0.7071067811865475244008443621048490;
00084 
00086 static const double limitexp = 80.0;
00087 
00092 } // namespace qucs
00093 
00094 #endif /* __CONSTS_H__ */