How to determine a deficit of base 10 exponent from a minimum unit

17 Views Asked by At

I'm trying to determine if a number includes a portion in deficit of a base 10 exponent from a minimum unit.

For example, given a minimum unit of $0.01$, $1$ would pass the test, but $1.001$ would not.

In my inexperience, I thought a decimal modulo would do it but found that for example $1$ with a minimum unit of $0.03$ would not produce a modulo of $0$ thus fail the test.

How can my intent be expressed in a closed form?

1

There are 1 best solutions below

0
On BEST ANSWER

Let $10^{-k}$ be the minimum unit. If $\lfloor 10^k x\rfloor = 10^k x$, then $x$ is a multiple of the minimum unit and thus would pass the test.

$\lfloor \cdot \rfloor$ is the floor function.