# Re: [ROOT] What does negative zero mean?

From: Gabriel Tabacaru (tabacaru@comp.tamu.edu)
Date: Thu Apr 01 2004 - 23:36:53 MEST

```Hi,

It is normal when you use "B" option for Divide() and the two histograms
are identical!
Look what does it mean binomial distribution.
Below few corrections for your test.

Cheers,
Gabriel

> void test()
> {
>
>    TH1F* dH = new TH1F("dH","dH",10,0,10);
>    TH1F* nH = new TH1F("nH","nH",10,0,10);
>    TH1F* rH = new TH1F("rH","rH",10,0,10);
>
>    for(Int_t i=2; i<8; i++){
>
Stat_t content = i;
dH->SetBinContent(i,content);
Stat_t content = i*1.1; //for example
nH->SetBinContent(i,content);
>    }
>
>    rH->Sumw2();
>    rH->Divide(nH,dH,1,1,"B");
>    rH->SetMarkerStyle(20);
>    rH->SetMarkerColor(2);
//here option "PE"
rH->Draw("PE");
>
>    for(Int_t i=1; i<=10; i++){
>      cout << i << "\t : " << rH->GetBinContent(i)
> 	 << ", " << rH->GetBinError(i) << endl;
>    }
>
> }
>
> I expected exact 1 efficiency plot, but I got the following:
>
> <output> :
>
> No points are ploted at all.
>
> root [0] .x test.C
> <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
> 1        : 0, 0
> 2        : 1, -0
> 3        : 1, -0
> 4        : 1, -0
> 5        : 1, -0
> 6        : 1, -0
> 7        : 1, -0
> 8        : 0, 0
> 9        : 0, 0
> 10       : 0, 0
> root [1]
>
>
>

--
===============================================
Dr. Gabriel Tabacaru                          =
Cyclotron Institute - Texas A&M University    =
Univ. Drive                                   =
MS 3366, College Station, Texas 77843-3366    =
USA                                           =
Tel.  : ++ 979 845 1411                       =
e-mail: tabacaru@comp.tamu.edu                =
tabacaru@tamu.edu                     =
===============================================
```

This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET