powered by
is.wholenumber(x, tol = .Machine$double.eps^0.5)
x
x = c(0.5, 1, 2L, 1e-20) is.wholenumber(x)
Run the code above in your browser using DataLab