Download this file
1 2 3 4 5
safe.exp <- function (x) { xx = sign(x) * pmin(abs(x), 500) return(exp(xx)) }