1 | /*
|
---|
2 | * vmg - a versatile multigrid solver
|
---|
3 | * Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
|
---|
4 | *
|
---|
5 | * vmg is free software: you can redistribute it and/or modify
|
---|
6 | * it under the terms of the GNU General Public License as published by
|
---|
7 | * the Free Software Foundation, either version 3 of the License, or
|
---|
8 | * (at your option) any later version.
|
---|
9 | *
|
---|
10 | * vmg is distributed in the hope that it will be useful,
|
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
13 | * GNU General Public License for more details.
|
---|
14 | *
|
---|
15 | * You should have received a copy of the GNU General Public License
|
---|
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
17 | */
|
---|
18 |
|
---|
19 | /**
|
---|
20 | * @file math.hpp
|
---|
21 | *
|
---|
22 | * @author Julian Iseringhausen
|
---|
23 | *
|
---|
24 | * @brief Mathematical constants
|
---|
25 | *
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef MATH_HPP_
|
---|
29 | #define MATH_HPP_
|
---|
30 |
|
---|
31 | namespace VMG
|
---|
32 | {
|
---|
33 |
|
---|
34 | namespace Math
|
---|
35 | {
|
---|
36 |
|
---|
37 | const double e = 2.7182818284590452354; /* e */
|
---|
38 | const double log2e = 1.4426950408889634074; /* log_2 e */
|
---|
39 | const double log10e = 0.43429448190325182765; /* log_10 e */
|
---|
40 | const double ln2 = 0.69314718055994530942; /* log_e 2 */
|
---|
41 | const double ln10 = 2.30258509299404568402; /* log_e 10 */
|
---|
42 | const double pi = 3.14159265358979323846; /* pi */
|
---|
43 | const double pi_2 = 1.57079632679489661923; /* pi/2 */
|
---|
44 | const double pi_4 = 0.78539816339744830962; /* pi/4 */
|
---|
45 | const double pi_inv = 0.31830988618379067154; /* 1/pi */
|
---|
46 | const double pi_2_inv = 0.63661977236758134308; /* 2/pi */
|
---|
47 | const double sqrtpi_2_inv = 1.12837916709551257390; /* 2/sqrt(pi) */
|
---|
48 | const double sqrt2 = 1.41421356237309504880; /* sqrt(2) */
|
---|
49 | const double sqrt2_inv = 0.70710678118654752440; /* 1/sqrt(2) */
|
---|
50 |
|
---|
51 | }
|
---|
52 |
|
---|
53 | }
|
---|
54 |
|
---|
55 | #endif /* MATH_HPP_ */
|
---|