Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10363

Double precision equality comparison in TH1::SameLimitsAndNBins

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • High
    • Resolution: Fixed
    • 6.18/04
    • None
    • Math Libraries
    • None
    • Any

       

    Description

      Hi,

      In trying to run some operations on some histograms that had floating point numbers at the axis limits, I have found what looks to be dangerous double == double comparison going on here: 

       
      https://root.cern.ch/doc/master/TH1_8cxx_source.html#l05482

       

      This is causing my TH1D::Add calls to fail on histograms that for all intents and purposes should merge fine:

      Error in <Merge>: Cannot merge histograms - limits are inconsistent: first: sig_bin1_SR (100, 0.000000, 1003.819791), second: sig_bin1 (100, 0.000000, 1003.819791)
      

      Attachments

        Activity

          People

            moneta Lorenzo Moneta
            will Will Buttinger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: