ROOT
master
Reference Guide
RooNumber.cxx
Go to the documentation of this file.
1
/*****************************************************************************
2
* Project: RooFit *
3
* Package: RooFitCore *
4
* @(#)root/roofitcore:$Id$
5
* Authors: *
6
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8
* *
9
* Copyright (c) 2000-2005, Regents of the University of California *
10
* and Stanford University. All rights reserved. *
11
* *
12
* Redistribution and use in source and binary forms, *
13
* with or without modification, are permitted according to the terms *
14
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15
*****************************************************************************/
16
17
/**
18
\file RooNumber.cxx
19
\class RooNumber
20
\ingroup Roofitcore
21
22
Class RooNumber implements numeric constants used by RooFit
23
**/
24
25
#include "
RooFit.h
"
26
#include "
RooNumber.h
"
27
28
using namespace
std;
29
30
ClassImp
(
RooNumber
);
31
;
32
33
#ifdef HAS_NUMERIC_LIMITS
34
35
#include <numeric_limits.h>
36
Double_t
RooNumber::_Infinity
= numeric_limits<Double_t>::infinity();
37
#else
38
39
// This assumes a well behaved IEEE-754 floating point implementation.
40
// The next line may generate a compiler warning that can be ignored.
41
Double_t
RooNumber::_Infinity
= 1.0e30 ;
//1./0.;
42
43
#endif
44
45
46
////////////////////////////////////////////////////////////////////////////////
47
/// Return internal infinity representation
48
49
Double_t
RooNumber::infinity
()
50
{
51
return
_Infinity ;
52
}
53
54
55
////////////////////////////////////////////////////////////////////////////////
56
/// Return true if x is infinite by RooNumBer internal specification
57
58
Int_t
RooNumber::isInfinite
(
Double_t
x
)
59
{
60
return
(
x
>= +_Infinity) ? +1 : ((
x
<= -_Infinity) ? -1 : 0);
61
}
62
RooFit.h
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:364
RooNumber
Class RooNumber implements numeric constants used by RooFit.
Definition:
RooNumber.h:21
x
Double_t x[n]
Definition:
legend1.C:17
RooNumber::isInfinite
static Int_t isInfinite(Double_t x)
Return true if x is infinite by RooNumBer internal specification.
Definition:
RooNumber.cxx:58
RooNumber::_Infinity
static Double_t _Infinity
Definition:
RooNumber.h:30
RooNumber.h
RooNumber::infinity
static Double_t infinity()
Return internal infinity representation.
Definition:
RooNumber.cxx:49
Double_t
double Double_t
Definition:
RtypesCore.h:59
int
roofit
roofitcore
src
RooNumber.cxx
ROOT master - Reference Guide Generated on Thu Jan 21 2021 12:47:04 (GVA Time) using Doxygen 1.9.0