How to find the value of a function correct to $n$ decimal places as efficiently as possible?
For example, how to find $\sin(1)$ correct to six decimal places as efficiently as possible?
I computed $\sin(1)$ correct to six decimal places as follows:
$$|\sin(1) - (1 - \frac{1}{3!} + \frac{1}{5!} - \frac{1}{7!} + \frac{1}{9!} - \frac{1}{11!})| < \frac{1}{(2 \times 6 + 1)!} \fallingdotseq 1.6059 \times10^{-10}.$$
$$1 = 1.000000000.$$
$$-\frac{1}{3!} \fallingdotseq -0.166666667.$$
$$\frac{1}{5!} \fallingdotseq 0.008333333.$$
$$-\frac{1}{7!} \fallingdotseq -0.000198413.$$
$$\frac{1}{9!} \fallingdotseq 0.000002756.$$
$$-\frac{1}{11!} \fallingdotseq -0.000000025.$$
$$1 - \frac{1}{3!} + \frac{1}{5!} - \frac{1}{7!} + \frac{1}{9!} - \frac{1}{11!} \fallingdotseq 0.841470984.$$
$$|0.841470984 - (1 - \frac{1}{3!} + \frac{1}{5!} - \frac{1}{7!} + \frac{1}{9!} - \frac{1}{11!})| \leq 6 \times (5 \times 10^{-10}) = 30 \times 10^{-10}.$$
So,
$$|\sin(1) - 0.841470984| < 1.6059 \times10^{-10} + 30 \times 10^{-10} < 100 \times 10^{-10} = 10^{-8}.$$
So,
$$0.841470974 < \sin(1) < 0.841470994.$$
So, the answer is $\sin(1) \fallingdotseq 0.841470$.
By the way, how to find the value of $1 + \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \frac{1}{16} + \cdots$ correct to six decimal places in a similar way?
I guess we cannot compute the value of $1 + \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \frac{1}{16} + \cdots$ correct to six decimal places in a similar way.
There is no general answer. It depends very much on what you want to calculate and what tools you have available. Your calculation of $\sin(1)$ is a good one-it is justified by the alternating series theorem and is not too hard. It is basically using the Taylor series around $0$. The natural improvement would be to use the Taylor series around some closer point. That would take fewer terms, but they will be harder to calculate. You could say $\sin (1)=\cos(\frac \pi 2 -1)$ so $$\sin(1)\approx1-\frac1{2!}(\frac \pi 2-1)^2+\frac1{4!}(\frac \pi 2-1)^4-\frac 1{6!}(\frac \pi 2-1)^6$$ where the error bound is about $3\cdot 10^{-7}$. This has fewer terms than your expression, but each one is more complicated. Your expression was simplified by the fact that your argument was $1$. It would not be so nice if you asked for $\sin(.99343424)$. In that case my version would win easily.
Another subtlety is when you ask for correct to six places do you mean within $\pm 5\cdot 10^{-7}$ or do you mean you write down six decimal places that are correct. In the second case you might (but are unlikely to) be very close to a point where the rounding flips from one value to another and then need an extremely accurate value to get six good places.
For series like your $1 + \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \frac{1}{16} + \cdots$ where all the terms are positive you need to find another way of bounding the error. This one we sum analytically and get $2$.