x <- rgamma(100, 1, 1)
double_reverse_log_obj <- double_reverse_log(x)
double_reverse_log_obj
p <- predict(double_reverse_log_obj)
x2 <- predict(double_reverse_log_obj, newdata = p, inverse = TRUE)
all.equal(x2, x)
Run the code above in your browser using DataLab