ROOT
Version master
v6.36
v6.34
v6.32
v6.30
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
Reference Guide
▼
ROOT
ROOT Reference Documentation
Tutorials
►
Functional Parts
►
Namespaces
►
All Classes
▼
Files
▼
File List
►
bindings
►
core
►
documentation
►
geom
►
graf2d
►
graf3d
►
gui
►
hist
►
io
►
main
►
master
▼
math
doc
►
fftw
►
foam
►
fumili
►
genetic
►
genvector
►
mathcore
►
mathmore
►
matrix
►
minuit
▼
minuit2
doc
►
inc
▼
src
AnalyticalGradientCalculator.cxx
►
BFGSErrorUpdator.cxx
CombinedMinimumBuilder.cxx
DavidonErrorUpdator.cxx
ExternalInternalGradientCalculator.cxx
FumiliBuilder.cxx
FumiliErrorUpdator.cxx
FumiliGradientCalculator.cxx
FumiliMinimizer.cxx
FumiliStandardChi2FCN.cxx
FumiliStandardMaximumLikelihoodFCN.cxx
HessianGradientCalculator.cxx
InitialGradientCalculator.cxx
MinimumBuilder.cxx
►
Minuit2Minimizer.cxx
MnApplication.cxx
►
mnbins.cxx
MnContours.cxx
MnCovarianceSqueeze.cxx
MnEigen.cxx
MnFcn.cxx
MnFumiliMinimize.cxx
MnFunctionCross.cxx
MnGlobalCorrelationCoeff.cxx
MnHesse.cxx
MnLineSearch.cxx
MnMachinePrecision.cxx
►
MnMatrix.cxx
MnMinos.cxx
MnParabolaFactory.cxx
MnParameterScan.cxx
►
MnPlot.cxx
MnPosDef.cxx
►
MnPrint.cxx
►
MnPrintImpl.cxx
MnScan.cxx
MnSeedGenerator.cxx
MnStrategy.cxx
MnTiny.cxx
►
mntplot.cxx
MnTraceObject.cxx
MnUserParameters.cxx
MnUserParameterState.cxx
►
MnUserTransformation.cxx
ModularFunctionMinimizer.cxx
MPIProcess.cxx
►
MPIProcess.h
NegativeG2LineSearch.cxx
Numerical2PGradientCalculator.cxx
►
NumericalDerivator.cxx
ParametricFunction.cxx
ScanBuilder.cxx
SimplexBuilder.cxx
SimplexParameters.cxx
SimplexSeedGenerator.cxx
SinParameterTransformation.cxx
SqrtLowParameterTransformation.cxx
SqrtUpParameterTransformation.cxx
TMinuit2TraceObject.cxx
VariableMetricBuilder.cxx
VariableMetricEDMEstimator.cxx
►
mlp
►
physics
►
quadp
►
rtools
►
smatrix
►
splot
►
unuran
►
vecops
►
montecarlo
►
net
►
proof
►
roofit
►
sql
►
tmva
►
tree
►
tutorials
►
File Members
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
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
#include <limits>
13
14
namespace
ROOT
{
15
16
namespace
Minuit2 {
17
18
MnMachinePrecision::MnMachinePrecision
()
19
{
20
// use double precision values from the numeric_limits standard
21
// and do not determine it anymore using ComputePrecision
22
// epsilon from stundard
23
// note that there is a factor of 2 in the definition of
24
// std::numeric_limitys::epsilon w.r.t DLAMCH epsilon
25
26
fEpsMac
= 4. * std::numeric_limits<double>::epsilon();
27
fEpsMa2
= 2. * std::sqrt(
fEpsMac
);
28
}
29
void
MnMachinePrecision::ComputePrecision
()
30
{
31
fEpsMac
= 4.0E-7;
32
fEpsMa2
= 2. * std::sqrt(
fEpsMac
);
33
34
// determine machine precision using
35
// code similar to DLAMCH LAPACK Fortran function
36
/*
37
char e[] = {"e"};
38
fEpsMac = 8.*dlamch_(e);
39
fEpsMa2 = 2.*std::sqrt(fEpsMac);
40
*/
41
42
MnTiny
mytiny
;
43
44
// calculate machine precision
45
double
epstry
= 0.5;
46
double
epsbak
= 0.;
47
volatile
double
epsp1
= 0.;
// allow to run this method with fast-math
48
double
one
= 1.0;
49
for
(
int
i = 0; i < 100; i++) {
50
epstry
*= 0.5;
51
epsp1
=
one
+
epstry
;
52
epsbak
=
mytiny
(
epsp1
);
53
if
(
epsbak
<
epstry
) {
54
fEpsMac
= 8. *
epstry
;
55
fEpsMa2
= 2. * std::sqrt(
fEpsMac
);
56
break
;
57
}
58
}
59
}
60
61
}
// namespace Minuit2
62
63
}
// namespace ROOT
MnMachinePrecision.h
MnTiny.h
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
ROOT::Minuit2::MnMachinePrecision::ComputePrecision
void ComputePrecision()
compute Machine precision directly instead of using default values from std::numeric_limits
Definition
MnMachinePrecision.cxx:29
ROOT::Minuit2::MnMachinePrecision::fEpsMac
double fEpsMac
Definition
MnMachinePrecision.h:55
ROOT::Minuit2::MnMachinePrecision::MnMachinePrecision
MnMachinePrecision()
Definition
MnMachinePrecision.cxx:18
ROOT::Minuit2::MnMachinePrecision::fEpsMa2
double fEpsMa2
Definition
MnMachinePrecision.h:56
ROOT::Minuit2::MnTiny
Definition
MnTiny.h:17
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition
EExecutionPolicy.hxx:4
math
minuit2
src
MnMachinePrecision.cxx
ROOT master - Reference Guide Generated on Thu Apr 24 2025 15:50:31 (GVA Time) using Doxygen 1.10.0