conditional – do[psi[n+1] = Si[cond. A, If[cond. B, form. 1, form. 2], shape. 2], {n, 0,11} does not perform well

I had trouble getting the program to do what I wanted.
I have defined a conditional recursive algorithm to evaluate the next pair of coordinates (psi[n+1], phi[n+1]) of (psi[n], phi[n]):

$ displaystyle ( psi[n+1] phi[n+1]) = begin {cases} ( psi[n]+2 phi[n] phi[n]), & text {if} L < psi[n]+2 phi[n]<2 pi-L, \
& \
( psi_2[Psi[Psi[psi[psi[n] phi[n]], phi_2[Psi[Psi[psi[psi[n] phi[n]]), & text {elsewhere. } end {cases} $

Right here $ psi_2 (u, v) $ and $ phi_2 (u, v) $ are two functions.
These functions work well if I give the value directly.
For example, if (psi[n], phi[n]) = (u, v) = (5.14159,0.1) (this appears later), then the functions give (psi[n+1], phi[n+1]) = (psi2[u,v], phi2[u,v]) = (2.81768.1.95294).

However, the execution of the recursive program fails the first nontrivial condition (that is, when L <Mod[psi[psi[psi[psi[n] + 2 * phi[n], 2 ft]<2 Pi – L).
Please let me know if I can make the following description clearer. Thank you!

The functions:

R = 100;
b = 95;
r = 10;
T = ArcCos[(R^2 + b^2 - r^2)/(2*b*R)]; (* the angle Psi_A *)
L = ArcCos[(R^2 - r^2 - b^2)/(2*b*r)]; (* the angle psi_A *)
Phi[u_, v_] : = ArcCos[(r*Cos[v] + b * Cos[u + v])

; (* withdrawal angle on Gamma_R *)
psi[u_, v_] : = u + v - Phi[u, v] - 2 * Pi; (* withdrawal position *)
not[u_, v_] : = Floor[(T-Psi[(T-Psi[(T-Psi[(T-Psi[u, v]) / (2 * Phi[u, v])]; (* reflection numbers on Gamma_R *)
phi2[u_, v_] : = ArcCos[(R*Cos[Phi[(R*Cos[Phi[(R*Cos[Phi[(R*Cos[Phi[u, v]]- b * Cos[Psi[Psi[Psi[Psi[u, v] + (2 * n[u, v] + 1) * Phi[u, v]])

; (* the returing angle on Gamma_r *)
psi2[u_, v_] : = Psi[u, v] + (2 * n[u, v] + 1) * Phi[u, v] + phi2[u, v]; (* the return position *)

The conditional recursive part (essentially the structure that I describe in the title, with only two coordinates):

psi[0] = Pi;
phi[0] = 0.1;
Make[psi[n + 1] =
Yes[L<Mod[psi[L<Mod[psi[L

The first nine or ten steps work well. However, it is not possible to evaluate n = 11 from n = 10. The output ((I've skipped the results here))

{0, [Pi], 0.1}
{} 1,3.34159,0.1
...
{} 10,5.14159,0.1
{11.4.28843 +0.953167 (1 + 2 10[5.14159,0.1]) + ArcCos[1/10(579104-95Cos[428843+0953167(1+210[1/10(579104-95Cos[428843+0953167(1+210[1/10(579104-95Cos[428843+0953167(1+210[1/10(579104-95Cos[428843+0953167(1+210[5.14159,0.1])])], ArcCos[1/10(579104-95Cos[428843+0953167(1+210[1/10(579104-95Cos[428843+0953167(1+210[1/10(579104-95Cos[428843+0953167(1+210[1/10(579104-95Cos[428843+0953167(1+210[5.14159,0.1])])]}
{12, if[ArcCos[35/76]<Mod[428843+0953167(1+210[428843+0953167(1+210[428843+0953167(1+210[428843+0953167(1+210[5.14159,0.1]) +3 ArcCos[1/10(579104-95Cos[428843+0953167(1+210[1/10(579104-95Cos[428843+0953167(1+210[1/10(579104-95Cos[428843+0953167(1+210[1/10(579104-95Cos[428843+0953167(1+210[5.14159,0.1])])], 2 [Pi]],Yes[Mod[psi[Mod[psi[Mod[psi[Mod[psi[n]+2 phi[n], 2 [Pi]]<2 [Pi]-L, psi[n]+2 phi[n]psi2[psi[psi[psi[psi[n], phi[n]]]psi2[psi[psi[psi[psi[n], phi[n]]],Yes[ArcCos[35/76]<Mod[428843+0953167(1+210[428843+0953167(1+210[428843+0953167(1+210[428843+0953167(1+210[5.14159,0.1]) +3 ArcCos[1/10(579104-95Cos[428843+0953167(1+210[1/10(579104-95Cos[428843+0953167(1+210[1/10(579104-95Cos[428843+0953167(1+210[1/10(579104-95Cos[428843+0953167(1+210[5.14159,0.1])])], 2 [Pi]],Yes[Mod[psi[Mod[psi[Mod[psi[Mod[psi[n]+2 phi[n], 2 [Pi]]<2 [Pi]-L, phi[n], phi2[psi[psi[psi[psi[n], phi[n]]], phi2[psi[psi[psi[psi[n], phi[n]]]}