Utility function to test if x is "numerically" integer wrt machine epsilon taken from example section of help of is.integer
Useful links