R/logspace_add.R

Defines functions logspace_add

logspace_add <-
function(logx, logy) {
  if(logx==-Inf) return(logy) else max(logx, logy) + log1p(exp (-abs (logx - logy)));
}
lukejharmon/netphy documentation built on May 21, 2017, 3:43 p.m.