Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
include
Utilities
NumericPrecision.h
Go to the documentation of this file.
1
/* This file is part of MoDELib, the Mechanics Of Defects Evolution Library.
2
*
3
*
4
* MoDELib is distributed without any warranty under the
5
* GNU General Public License (GPL) v2 <http://www.gnu.org/licenses/>.
6
*/
7
8
#ifndef model_NumericPrecision_H_
9
#define model_NumericPrecision_H_
10
11
#include <cfloat>
12
13
namespace
model
14
{
15
16
template
<
typename
T>
17
struct
NumericPrecision
18
{
19
static
constexpr
T
epsilon
=DBL_EPSILON;
20
};
21
22
template
<>
23
struct
NumericPrecision
<double>
24
{
25
static
constexpr
double
epsilon
=DBL_EPSILON;
26
};
27
28
29
template
<>
30
struct
NumericPrecision
<float>
31
{
32
static
constexpr
double
epsilon
=FLT_EPSILON;
33
};
34
35
}
// namespace model
36
#endif
model
Definition
DD_converter.dox:2
model::NumericPrecision< double >::epsilon
static constexpr double epsilon
Definition
NumericPrecision.h:25
model::NumericPrecision< float >::epsilon
static constexpr double epsilon
Definition
NumericPrecision.h:32
model::NumericPrecision
Definition
NumericPrecision.h:18
model::NumericPrecision::epsilon
static constexpr T epsilon
Definition
NumericPrecision.h:19
Generated by
1.15.0