# Calculating how long it will take for X to be within P% of C?

I need to work out the amount of time it will take for $X$ to be within $P$% of $C$ using the following formula at $H$ hertz: $$X = X + (C - X)\ Y$$ where $Y$ is a value between $0$ and $1$.

How can I accomplish this?

-
I have formatted your question using LaTeX. – Martin Argerami Dec 13 '12 at 13:41

The first thing to notice is that $X$ always stays at the same side of $C$.
Initially the distance between $X$ and $C$ is $d=|C-X|$. After the first step this distance becomes $(1-Y)d$. After the second step this distance becomes $(1-Y)^2d$. ...
The third step being $(1-Y)^3d$, right? – Steffan 'Ruirize' Donal Dec 13 '12 at 13:31