Loading [MathJax]/extensions/tex2jax.js
ROOT
6.12/07
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
+
Namespaces
Namespace List
+
Namespace Members
+
All
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
w
x
+
Enumerations
a
e
f
g
m
p
t
w
y
+
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
w
+
All Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
f
+
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
+
File Members
+
All
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerations
c
e
f
i
l
m
p
r
u
x
+
Enumerator
a
c
d
e
f
g
h
i
k
l
n
o
p
r
s
v
w
+
Macros
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
math
minuit2
src
MnMachinePrecision.cxx
Go to the documentation of this file.
1
// @(#)root/minuit2:$Id$
2
// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4
/**********************************************************************
5
* *
6
* Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7
* *
8
**********************************************************************/
9
10
#include "
Minuit2/MnMachinePrecision.h
"
11
#include "
Minuit2/MnTiny.h
"
12
13
namespace
ROOT
{
14
15
namespace
Minuit2 {
16
17
18
MnMachinePrecision::MnMachinePrecision
() :
19
fEpsMac(4.0
E
-7),
20
fEpsMa2(2.*
sqrt
(4.0
E
-7)) {
21
22
//determine machine precision
23
/*
24
char e[] = {"e"};
25
fEpsMac = 8.*dlamch_(e);
26
fEpsMa2 = 2.*sqrt(fEpsMac);
27
*/
28
29
// std::cout<<"machine precision eps: "<<Eps()<<std::endl;
30
31
MnTiny
mytiny;
32
33
//calculate machine precision
34
double
epstry = 0.5;
35
double
epsbak = 0.;
36
volatile
double
epsp1 = 0.;
// allow to run this method with fast-math
37
double
one = 1.0;
38
for
(
int
i = 0; i < 100; i++) {
39
epstry *= 0.5;
40
epsp1 = one + epstry;
41
epsbak = mytiny(epsp1);
42
if
(epsbak < epstry) {
43
fEpsMac
= 8.*epstry;
44
fEpsMa2
= 2.*
sqrt
(
fEpsMac
);
45
break
;
46
}
47
}
48
49
}
50
51
}
// namespace Minuit2
52
53
}
// namespace ROOT
ROOT
Namespace for new ROOT classes and functions.
Definition:
StringConv.hxx:21
sqrt
double sqrt(double)
MnMachinePrecision.h
ROOT::Minuit2::MnMachinePrecision::fEpsMa2
double fEpsMa2
Definition:
MnMachinePrecision.h:58
MnTiny.h
TMath::E
constexpr Double_t E()
Definition:
TMath.h:74
ROOT::Minuit2::MnMachinePrecision::fEpsMac
double fEpsMac
Definition:
MnMachinePrecision.h:57
ROOT::Minuit2::MnTiny
Definition:
MnTiny.h:18
ROOT::Minuit2::MnMachinePrecision::MnMachinePrecision
MnMachinePrecision()
Definition:
MnMachinePrecision.cxx:18