I’ve always assumed that the convention of “lower edge included, upper edge excluded” held for all bins in a TH1, but now I’m getting some results that seem to contradict this. Looking again at the documentation for TH1, I see that no convention for bins other than underflow, first, last and overflow is explicitly stated, so I’m wondering whether the results I’m getting should indeed be expected.
This is what I get from an interactive ROOT session on 6.30/06:
Thanks for the interesting post and welcome to the ROOT community!
By looking at the code, it seems that this is in place since a long time: do you find this surprising?
I am adding the math experts in the loop, for their information @moneta@jonas .
I found this surprising only because I always thought that the same rules that hold for the first bin of a TH1 (“lower edge is included”) and the last (“upper edge is excluded”) were also valid for all other bins. Now I see that this is probably not the case, and so I was just looking for a confirmation about it from ROOT developers, before eventually suggesting to explicitly mention it in the TH1 documentation.
Thanks a lot for the links! I searched both this forum and GitHub’s issue tracker before opening this thread, but I couldn’t find those…
As I wrote in my previous reply, if the idea is to guarantee in the code that the lower edge of a bin be part of the same bin, may I suggest to mention this in the documentation if/once the PR is accepted?