Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
22Class RooNumber implements numeric constants used by RooFit
23**/
24
25#include "RooFit.h"
26#include "RooNumber.h"
27
28using namespace std;
29
31;
32
33#ifdef HAS_NUMERIC_LIMITS
34
35#include <numeric_limits.h>
36Double_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.
41Double_t RooNumber::_Infinity= 1.0e30 ; //1./0.;
42
43#endif
44
45
46////////////////////////////////////////////////////////////////////////////////
47/// Return internal infinity representation
48
50{
51 return _Infinity ;
52}
53
54
55////////////////////////////////////////////////////////////////////////////////
56/// Return true if x is infinite by RooNumBer internal specification
57
59{
60 return (x >= +_Infinity) ? +1 : ((x <= -_Infinity) ? -1 : 0);
61}
62
double Double_t
Definition RtypesCore.h:59
#define ClassImp(name)
Definition Rtypes.h:364
Class RooNumber implements numeric constants used by RooFit.
Definition RooNumber.h:21
static Int_t isInfinite(Double_t x)
Return true if x is infinite by RooNumBer internal specification.
Definition RooNumber.cxx:58
static Double_t infinity()
Return internal infinity representation.
Definition RooNumber.cxx:49
static Double_t _Infinity
Definition RooNumber.h:30
Double_t x[n]
Definition legend1.C:17