glucat
0.8.4
glucat
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
namespace
glucat
35
{
36
#if defined(__USE_GNU)
37
static
const
long
double
l_pi
= M_PIl;
38
static
const
long
double
l_ln2
= M_LN2l;
39
#else
40
static
const
long
double
l_pi
= 3.1415926535897932384626433832795029L;
41
static
const
long
double
l_ln2
= 0.6931471805599453094172321214581766L;
42
#endif
43
44
#if defined(_GLUCAT_USE_QD)
45
template
<>
47
struct
48
numeric_traits<long double>
::
49
demoted {
typedef
long
double
type
;};
50
#else
51
template
<>
53
struct
54
numeric_traits<double>
::
55
promoted {
typedef
long
double
type;};
56
58
template
<>
59
struct
60
numeric_traits<long double>
::
61
promoted {
typedef
long
double
type;};
62
64
template
<>
65
struct
66
numeric_traits<long double>::
67
demoted {
typedef
double
type;};
68
#endif
69
71
template
<>
72
inline
73
long
double
74
numeric_traits<long double>::
75
pi
()
76
{
return
l_pi
; }
77
79
template
<>
80
inline
81
long
double
82
numeric_traits<long double>::
83
ln_2
()
84
{
return
l_ln2
; }
85
}
86
#endif // _GLUCAT_LONG_DOUBLE_H
glucat::numeric_traits::demoted::type
long double type
Definition:
long_double.h:49
glucat::l_ln2
static const long double l_ln2
Definition:
long_double.h:41
glucat::numeric_traits::pi
static Scalar_T pi()
Pi.
Definition:
scalar.h:188
glucat::numeric_traits::ln_2
static Scalar_T ln_2()
log(2)
Definition:
scalar.h:195
glucat::numeric_traits
Extra traits which extend numeric limits.
Definition:
scalar.h:47
glucat
Definition:
clifford_algebra.h:39
glucat::l_pi
static const long double l_pi
Definition:
long_double.h:40
Generated on Sun Jul 12 2020 00:00:00 for glucat by
1.8.20