isPowerOf10

Checks whether a _decimal value is a power of ten. This operation is silent, no exception flags are set and no exceptions are thrown.

bool
isPowerOf10
(
D
)
(
auto const ref D x
)

Parameters

x D

any _decimal value

Return Value

Type: bool

true if x is power of ten, false otherwise (NaN, infinity, 0, negative)

Examples

assert (isPowerOf10(decimal32("1000")));
assert (isPowerOf10(decimal32("0.001")));

Meta