Skip to contents

Checks whether a number is near to a whole number

Usage

is_nearly_whole(x)

Arguments

x

a numeric

Value

TRUE or FALSE

Author

Kelly Sovacool sovacool@umich.edu

Examples

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