Say I have a number $x \in \mathbb{Q}$ which possibly cannot be writen exactly in decimal form, but at least $x \notin \mathbb{Z}$ ($x$ is not an integer).
How do I calculate the first $n$ digits of this number $x$, for a given $n$? Also, how do I know if it has a finite or infinite amount of (nonzero) digits in decimal form?
For example, if $x = \frac{1000}{1001}$, how do I calculate the first $n = 10$ digits of this number?
I know this question sounds really basic, but since it is basically always done by means of a calculator or other computing device, I've never really done it before.