glucat 0.13.0
long_double.h
Go to the documentation of this file.
1#ifndef _GLUCAT_LONG_DOUBLE_H
2#define _GLUCAT_LONG_DOUBLE_H
3/***************************************************************************
4 GluCat : Generic library of universal Clifford algebra templates
5 long_double.h : Define std functions for long double
6 -------------------
7 begin : 2001-12-18
8 copyright : (C) 2001-2016 by Paul C. Leopardi
9 ***************************************************************************
10
11 This library is free software: you can redistribute it and/or modify
12 it under the terms of the GNU Lesser General Public License as published
13 by the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
15
16 This library is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU Lesser General Public License for more details.
20
21 You should have received a copy of the GNU Lesser General Public License
22 along with this library. If not, see <http://www.gnu.org/licenses/>.
23
24 ***************************************************************************
25 This library is based on a prototype written by Arvind Raja and was
26 licensed under the LGPL with permission of the author. See Arvind Raja,
27 "Object-oriented implementations of Clifford algebras in C++: a prototype",
28 in Ablamowicz, Lounesto and Parra (eds.)
29 "Clifford algebras with numeric and symbolic computations, Birkhauser, 1996."
30 ***************************************************************************
31 See also Arvind Raja's original header comments and references in glucat.h
32 ***************************************************************************/
33
34#include "glucat/global.h"
35#include "glucat/scalar.h"
36
37namespace glucat
38{
39#if defined(__USE_GNU)
40 static const long double l_pi = M_PIl;
41 static const long double l_ln2 = M_LN2l;
42#else
43 static const long double l_pi = 3.1415926535897932384626433832795029L;
44 static const long double l_ln2 = 0.6931471805599453094172321214581766L;
45#endif
46
48 template<>
49 inline
50 auto
52 pi() -> long double
53 { return l_pi; }
54
56 template<>
57 inline
58 auto
60 ln_2() -> long double
61 { return l_ln2; }
62}
63#endif // _GLUCAT_LONG_DOUBLE_H
static auto ln_2() -> Scalar_T
log(2)
Definition scalar.h:196
static auto pi() -> Scalar_T
Pi.
Definition scalar.h:189
static const long double l_pi
Definition long_double.h:43
static const long double l_ln2
Definition long_double.h:44