Chapter 6.3 of "Quantum Computation and Quantum Information 10th Anniversary Edition" textbook by Nielsen and Chuang talks about using the Quantum Counting Algorithm to find the number of solutions to the Quantum Search Algorithm before actually implementing it.
For a search space of size $2N$ with $M$ number of solutions, the number of Grover iterations $R$ required to obtain the state of solutions is upper bounded by (Eqn 6.17):
$$R \leq \lceil\frac{\pi}{4}\sqrt{2N/M}\space\rceil $$
At the last paragraph of this chapter, they stated that the angular error after the $R$ number of Grover iterations is at most $\pi/4(1+|\Delta\theta|/\theta)$. I think that this means:
$$|\Delta\theta| R \leq |\Delta\theta|\lceil\frac{\pi}{4}\sqrt{2N/M}\space\rceil = \pi/4(1+|\Delta\theta|/\theta) $$
We know that $\sin^2(\theta/2)=\frac{M}{2N}$, so I tried to use substitution in the attempt to get the stated angular error. This is what I got:
$$|\Delta\theta| R \leq |\Delta\theta| \space \lceil \frac{\pi}{4}\frac{1}{\sin(\theta/2)} \rceil $$
Can someone explain to me how to get the stated angular error?