R/utils.R
is_nearly_whole.Rd
Checks whether a number is near to a whole number
is_nearly_whole(x)
a numeric
TRUE or FALSE
TRUE
FALSE
Kelly Sovacool sovacool@umich.edu
is_nearly_whole(.Machine$double.eps^0.5) #> [1] FALSE is_nearly_whole(.Machine$double.eps^0.6) #> [1] TRUE is_nearly_whole(1) #> [1] TRUE