I have a circle of known radius $R$, and I have three arbitrary points defined around a circle at angles $\phi_1$, $\phi_2$, and $\phi_3$. In the figure below the red circles are the locations of the $\phi_i$ angles, the black circle is the circles origin, the blue line is the circle, and the dashed yellow lines are the chords between the locations of the phi angles (let's call these $D_{12}$, $D_{23}$, and $D_{31}$)
Now I am going to choose an arbitrary point, that is relatively close to the origin called $(x_0,y_0)$. I don't know exactly what this point it, but I do know the angles this new point makes with the $\phi$ locations (we can call these the $\theta_{12}$, $\theta_{23}$, and $\theta_{31}$ angles). I want to eventually get to figuring out the $(x_0,y_0)$ value, but the first step is to calculate (with law of cosines) the lengths from each $\phi$ location to the $(x_0,y_0)$ point (we can call these $L_1$, $L_2$, and $L_3$).
So this gives me an equation set like this:
$D_{12}^2 = L_1^2 + L_2^2 - 2L_1L_2cos(\theta_{12})$
$D_{23}^2 = L_2^2 + L_3^2 - 2L_2L_3cos(\theta_{23})$
$D_{31}^2 = L_3^2 + L_1^2 - 2L_3L_1cos(\theta_{31})$
So just to summarize, I know $D_{12}$, $D_{23}$, $D_{31}$, $\theta_{12}$, $\theta_{23}$, and $\theta_{31}$. I want to determine $L_1$, $L_2$, and $L_3$. Now this is trivial if I just do a binomial expansion and assume $\frac{L_i}{R^2} \approx (1+2\frac{\delta_i}{R})$ where $L_i \approx R + \delta_i$. Then I can solve this linearly.
I realize that if I want better accuracy than a linear-ish approximation this is only solvable iteratively. What I would like is an algorithm that solves this set of equations in single precision math with guaranteed numerical stability (i.e. I know that no matter what I guess initially...or even if I guess the linear solution, the algorithm converges to the real solution and not infinity). Is this possible?
And just so you know where I am going with this, it is a really easy calculation from here to get to the $(x_0,y_0)$ positions $$ \begin{bmatrix} cos(\phi_1)-cos(\phi_2)& sin(\phi_1)-sin(\phi_2)\\ cos(\phi_2)-cos(\phi_3)& sin(\phi_2)-sin(\phi_3) \end{bmatrix} = \begin{bmatrix}x_0\\y_0 \end{bmatrix}\begin{bmatrix}\frac{L_1^2-L_2^2}{-2R}\\\frac{L_2^2-L_3^2}{-2R}\end{bmatrix} $$
You don't need iterative methods, here, you can determine $P_0=(x_0,y_0)$ immediately, recalling a few simple facts from elementary geometry. So if you call your given points $P_1,P_2,P_3$, you're looking for a $P_0$ with $\sphericalangle P_1P_0P_2=\theta_{12}$ and $\sphericalangle P_2P_0P_3=\theta_{23}$. But those conditions say that $P_0$ lies on two circles, one through $P_1,P_2$, the other through $P_2,P_3$, and you can determine their centers $M_1$ and $M_2$ from the inscribed angle theorem, giving you the angles $\sphericalangle P_1M_1P_2$ and $\sphericalangle P_2M_2P_3$. Those two circles intersect in two points, one being $P_2$, of course. So $P_0$ is just the point symmetric to $P_2$ on the other side of $\overline{M_1M_2}$.
The figure below shows the two circles: two circles