R/logSumExp.R

#trick to allow multiplying many small numbers in real space using addition in log space
logSumExp = function(x)
{
  a = max(x)
  return(a+log(sum(exp(x-a))))
}
ndukler/tkSim documentation built on May 16, 2019, 8:12 p.m.