Inf                    
 -Inf                   
 .Machine$double.xmax   
 is.finite              


 forcefinite <- function(x) ifelse(is.finite(x), x, sign(x)*.Machine$double.xmax)

 forcefinite(c(1, -1, 0, .Machine$double.xmax, -.Machine$double.xmax, Inf, -Inf))