ATLAS Offline Software
Functions
safeLogRatio.cxx File Reference
#include "TrigBjetHypo/safeLogRatio.h"
#include <cmath>
#include <limits>
Include dependency graph for safeLogRatio.cxx:

Go to the source code of this file.

Functions

float safeLogRatio (float num, float denom)
 

Function Documentation

◆ safeLogRatio()

float safeLogRatio ( float  num,
float  denom 
)

Definition at line 10 of file safeLogRatio.cxx.

10  {
11  // ep(silon) is the smallest non-subnormal number
12  // the recyprocal of this should not overflow
14  float ratio = (std::abs(denom) < ep ? INFINITY : num / denom);
15  return std::abs(ratio) < ep ? -INFINITY : std::log( ratio );
16 }
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
compute_lumi.denom
denom
Definition: compute_lumi.py:76
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
python.compareTCTs.ratio
ratio
Definition: compareTCTs.py:294
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20