Tests the number of non-zero decimal places within a number.

decimalplaces(x)

Arguments

x

The number for the number of decimal places is to be measured.

Value

A single number, indicating the number of non-zero decimal places in `x`.

Examples

decimalplaces(23.43234525)
#> [1] 8
decimalplaces(334.3410000000000000)
#> [1] 3
decimalplaces(2.000)
#> [1] 0