I wondered how to calculate the minimum place value in $x$ (Or the number of digits after the decimal point) in math way. For quantity of digits in number (or max place value) used is a $\lfloor\lg(n)\rfloor+1$, and I need a "reverse operation". I have not found solutions to this problem, if you know please write.
I myself have come up with only a few ideas. First idea is find partial sum of $\sum_{n=1}^m 10^{m-n} \lfloor 10^{n}x - 10 \lfloor 10^{n-1}x \rfloor \rfloor$, then equate it to $10^m(x-\lfloor x \rfloor)$ and express $m$ ($m$ is number of digits after decimal point). It turns out something like that where $x \in \Bbb{Q }\ \mathit{with}\ \mathit{terminating}\ \mathit{decimal}$: $$10^m(x-\lfloor x \rfloor) = \sum_{n=1}^m 10^{n-1} \lfloor 10^{m-n+1}x - 10 \lfloor 10^{m-n}x \rfloor \rfloor $$ For example, for $x = 0.365$ then $10^m(x-\lfloor x \rfloor) = 365$. In turn partial sum gets the digits of each place value, and multiplies it by the place value. Unfortunately I am not very sophisticated in deep mathematics, and I know very little about simplify of series, partial sums, convergence and divergence.
Second idea is this infinity series. She definitely gives the correct logic answer for $x \in \Bbb{Q }\ \mathit{with}\ \mathit{terminating}\ \mathit{decimal}$, but I'm not sure can it be shortened and convergence or divergence this. $$\sum_{n=1}^\infty \lceil 10^{n-1}x - \lfloor 10^{n-1}x \rfloor \rceil $$ This series is round every exist remainder to $1$ after multiplying by $10^{n-1}$.
Thanks in advance for your help.
I came with a solution but it is not quite satisfying regarding its efficiency. Notice first that the number of digits of an integer is a regular notion in the sense that $n$ has $m$ digits if and only if $10^m\leqslant n<10^{m+1}$. But this is not the case of the number of digits after the decimal point. Let $f(x)$ be a fonction such that $f(x)$ is the number of digits after the decimal point whenever $x$ is a decimal number, then we would have $f(0)=0$, $f(0.1)=1$ but near these numbers, $f\left(\frac{1}{10^m}\right)=m$ for all $m$ therefore such a function $f$ has to be irregular (in particular it cannot be continuous by pieces at all). Thus don't expect $f$ to be pleasing. Anyway I say that $$ f(x)=\sum_{m=0}^{+\infty}1_{\{10^m x\notin\mathbb{Z}\}} $$ Now, the trick is that for all $x\in\mathbb{R}$, we have $x\in\mathbb{Z}\iff \cos^2(\pi x)=1\iff \lfloor\cos^2(\pi x)\rfloor=1$ because when $x\notin\mathbb{Z}$, $\cos^2(\pi x)\in [0,1)$ and thus $\lfloor\cos^2(\pi x)\rfloor=0$. Therefore, $$ f(x)=\sum_{m=0}^{+\infty}\left(1-\lfloor\cos^2(\pi 10^m x)\rfloor\right) $$ fits.