Logo ROOT  
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
22Class RooNumber implements numeric constants used by RooFit
23**/
24
25#include "RooNumber.h"
26
27using namespace std;
28
30;
31
32#ifdef HAS_NUMERIC_LIMITS
33
34#include <numeric_limits.h>
35double RooNumber::_Infinity= numeric_limits<double>::infinity();
36#else
37
38// This assumes a well behaved IEEE-754 floating point implementation.
39// The next line may generate a compiler warning that can be ignored.
40double RooNumber::_Infinity= 1.0e30 ; //1./0.;
41
42#endif
43
44
45////////////////////////////////////////////////////////////////////////////////
46/// Return internal infinity representation
47
49{
50 return _Infinity ;
51}
52
53
54////////////////////////////////////////////////////////////////////////////////
55/// Return true if x is infinite by RooNumBer internal specification
56
58{
59 return (x >= +_Infinity) ? +1 : ((x <= -_Infinity) ? -1 : 0);
60}
61
#define ClassImp(name)
Definition: Rtypes.h:375
Class RooNumber implements numeric constants used by RooFit.
Definition: RooNumber.h:21
static double _Infinity
Definition: RooNumber.h:30
static double infinity()
Return internal infinity representation.
Definition: RooNumber.cxx:48
static Int_t isInfinite(double x)
Return true if x is infinite by RooNumBer internal specification.
Definition: RooNumber.cxx:57
Double_t x[n]
Definition: legend1.C:17