\[ \begin{array}{c}[lambda1, lambda2] = \mathsf{sort}([lambda1, lambda2])\\ \end{array} \]
\[R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)}}{\sqrt{1 - \left({\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right)}}\right)
\]
↓
\[\begin{array}{l}
t_0 := {\left(\cos \left(0.5 \cdot \phi_2\right) \cdot \sin \left(\phi_1 \cdot 0.5\right) - \sin \left(0.5 \cdot \phi_2\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)}^{2}\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_2 := \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_1\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 \cdot t_2 + t_0}}{\sqrt{1 - \left(t_2 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) + t_0\right)}}\right)
\end{array}
\]
(FPCore (R lambda1 lambda2 phi1 phi2)
:precision binary64
(*
R
(*
2.0
(atan2
(sqrt
(+
(pow (sin (/ (- phi1 phi2) 2.0)) 2.0)
(*
(* (* (cos phi1) (cos phi2)) (sin (/ (- lambda1 lambda2) 2.0)))
(sin (/ (- lambda1 lambda2) 2.0)))))
(sqrt
(-
1.0
(+
(pow (sin (/ (- phi1 phi2) 2.0)) 2.0)
(*
(* (* (cos phi1) (cos phi2)) (sin (/ (- lambda1 lambda2) 2.0)))
(sin (/ (- lambda1 lambda2) 2.0))))))))))↓
(FPCore (R lambda1 lambda2 phi1 phi2)
:precision binary64
(let* ((t_0
(pow
(-
(* (cos (* 0.5 phi2)) (sin (* phi1 0.5)))
(* (sin (* 0.5 phi2)) (cos (* phi1 0.5))))
2.0))
(t_1 (sin (/ (- lambda1 lambda2) 2.0)))
(t_2 (* (* (cos phi1) (cos phi2)) t_1)))
(*
R
(*
2.0
(atan2
(sqrt (+ (* t_1 t_2) t_0))
(sqrt
(-
1.0
(+
(* t_2 (log1p (expm1 (sin (* 0.5 (- lambda1 lambda2))))))
t_0))))))))double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
return R * (2.0 * atan2(sqrt((pow(sin(((phi1 - phi2) / 2.0)), 2.0) + (((cos(phi1) * cos(phi2)) * sin(((lambda1 - lambda2) / 2.0))) * sin(((lambda1 - lambda2) / 2.0))))), sqrt((1.0 - (pow(sin(((phi1 - phi2) / 2.0)), 2.0) + (((cos(phi1) * cos(phi2)) * sin(((lambda1 - lambda2) / 2.0))) * sin(((lambda1 - lambda2) / 2.0))))))));
}
↓
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
double t_0 = pow(((cos((0.5 * phi2)) * sin((phi1 * 0.5))) - (sin((0.5 * phi2)) * cos((phi1 * 0.5)))), 2.0);
double t_1 = sin(((lambda1 - lambda2) / 2.0));
double t_2 = (cos(phi1) * cos(phi2)) * t_1;
return R * (2.0 * atan2(sqrt(((t_1 * t_2) + t_0)), sqrt((1.0 - ((t_2 * log1p(expm1(sin((0.5 * (lambda1 - lambda2)))))) + t_0)))));
}
public static double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
return R * (2.0 * Math.atan2(Math.sqrt((Math.pow(Math.sin(((phi1 - phi2) / 2.0)), 2.0) + (((Math.cos(phi1) * Math.cos(phi2)) * Math.sin(((lambda1 - lambda2) / 2.0))) * Math.sin(((lambda1 - lambda2) / 2.0))))), Math.sqrt((1.0 - (Math.pow(Math.sin(((phi1 - phi2) / 2.0)), 2.0) + (((Math.cos(phi1) * Math.cos(phi2)) * Math.sin(((lambda1 - lambda2) / 2.0))) * Math.sin(((lambda1 - lambda2) / 2.0))))))));
}
↓
public static double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
double t_0 = Math.pow(((Math.cos((0.5 * phi2)) * Math.sin((phi1 * 0.5))) - (Math.sin((0.5 * phi2)) * Math.cos((phi1 * 0.5)))), 2.0);
double t_1 = Math.sin(((lambda1 - lambda2) / 2.0));
double t_2 = (Math.cos(phi1) * Math.cos(phi2)) * t_1;
return R * (2.0 * Math.atan2(Math.sqrt(((t_1 * t_2) + t_0)), Math.sqrt((1.0 - ((t_2 * Math.log1p(Math.expm1(Math.sin((0.5 * (lambda1 - lambda2)))))) + t_0)))));
}
def code(R, lambda1, lambda2, phi1, phi2):
return R * (2.0 * math.atan2(math.sqrt((math.pow(math.sin(((phi1 - phi2) / 2.0)), 2.0) + (((math.cos(phi1) * math.cos(phi2)) * math.sin(((lambda1 - lambda2) / 2.0))) * math.sin(((lambda1 - lambda2) / 2.0))))), math.sqrt((1.0 - (math.pow(math.sin(((phi1 - phi2) / 2.0)), 2.0) + (((math.cos(phi1) * math.cos(phi2)) * math.sin(((lambda1 - lambda2) / 2.0))) * math.sin(((lambda1 - lambda2) / 2.0))))))))
↓
def code(R, lambda1, lambda2, phi1, phi2):
t_0 = math.pow(((math.cos((0.5 * phi2)) * math.sin((phi1 * 0.5))) - (math.sin((0.5 * phi2)) * math.cos((phi1 * 0.5)))), 2.0)
t_1 = math.sin(((lambda1 - lambda2) / 2.0))
t_2 = (math.cos(phi1) * math.cos(phi2)) * t_1
return R * (2.0 * math.atan2(math.sqrt(((t_1 * t_2) + t_0)), math.sqrt((1.0 - ((t_2 * math.log1p(math.expm1(math.sin((0.5 * (lambda1 - lambda2)))))) + t_0)))))
function code(R, lambda1, lambda2, phi1, phi2)
return Float64(R * Float64(2.0 * atan(sqrt(Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + Float64(Float64(Float64(cos(phi1) * cos(phi2)) * sin(Float64(Float64(lambda1 - lambda2) / 2.0))) * sin(Float64(Float64(lambda1 - lambda2) / 2.0))))), sqrt(Float64(1.0 - Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + Float64(Float64(Float64(cos(phi1) * cos(phi2)) * sin(Float64(Float64(lambda1 - lambda2) / 2.0))) * sin(Float64(Float64(lambda1 - lambda2) / 2.0)))))))))
end
↓
function code(R, lambda1, lambda2, phi1, phi2)
t_0 = Float64(Float64(cos(Float64(0.5 * phi2)) * sin(Float64(phi1 * 0.5))) - Float64(sin(Float64(0.5 * phi2)) * cos(Float64(phi1 * 0.5)))) ^ 2.0
t_1 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
t_2 = Float64(Float64(cos(phi1) * cos(phi2)) * t_1)
return Float64(R * Float64(2.0 * atan(sqrt(Float64(Float64(t_1 * t_2) + t_0)), sqrt(Float64(1.0 - Float64(Float64(t_2 * log1p(expm1(sin(Float64(0.5 * Float64(lambda1 - lambda2)))))) + t_0))))))
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := N[(R * N[(2.0 * N[ArcTan[N[Sqrt[N[(N[Power[N[Sin[N[(N[(phi1 - phi2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(N[(N[Cos[phi1], $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(1.0 - N[(N[Power[N[Sin[N[(N[(phi1 - phi2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(N[(N[Cos[phi1], $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[Power[N[(N[(N[Cos[N[(0.5 * phi2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(phi1 * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sin[N[(0.5 * phi2), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(phi1 * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Cos[phi1], $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, N[(R * N[(2.0 * N[ArcTan[N[Sqrt[N[(N[(t$95$1 * t$95$2), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(1.0 - N[(N[(t$95$2 * N[Log[1 + N[(Exp[N[Sin[N[(0.5 * N[(lambda1 - lambda2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)}}{\sqrt{1 - \left({\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right)}}\right)
↓
\begin{array}{l}
t_0 := {\left(\cos \left(0.5 \cdot \phi_2\right) \cdot \sin \left(\phi_1 \cdot 0.5\right) - \sin \left(0.5 \cdot \phi_2\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)}^{2}\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_2 := \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_1\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 \cdot t_2 + t_0}}{\sqrt{1 - \left(t_2 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) + t_0\right)}}\right)
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 17.1 |
|---|
| Cost | 138564 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := \cos \phi_1 \cdot \cos \phi_2\\
t_2 := t_0 \cdot \left(t_1 \cdot t_0\right)\\
t_3 := {\left(\cos \left(0.5 \cdot \phi_2\right) \cdot \sin \left(\phi_1 \cdot 0.5\right) - \sin \left(0.5 \cdot \phi_2\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)}^{2}\\
\mathbf{if}\;\lambda_2 \leq 0.00377874148797755:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_2 + t_3}}{\sqrt{1 - \left(t_3 + \cos \phi_2 \cdot \left(\cos \phi_1 \cdot {\sin \left(0.5 \cdot \lambda_1\right)}^{2}\right)\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_2 + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}}{\sqrt{1 - \left(t_3 + t_1 \cdot {\sin \left(\lambda_2 \cdot -0.5\right)}^{2}\right)}}\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 13.9 |
|---|
| Cost | 138564 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := \cos \phi_1 \cdot \cos \phi_2\\
t_2 := {\left(\cos \left(0.5 \cdot \phi_2\right) \cdot \sin \left(\phi_1 \cdot 0.5\right) - \sin \left(0.5 \cdot \phi_2\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)}^{2}\\
t_3 := t_0 \cdot \left(t_1 \cdot t_0\right) + t_2\\
\mathbf{if}\;\lambda_2 \leq 0.00377874148797755:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_3}}{\sqrt{1 - \left(t_2 + \cos \phi_2 \cdot \left(\cos \phi_1 \cdot {\sin \left(0.5 \cdot \lambda_1\right)}^{2}\right)\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_2 + t_1 \cdot {\sin \left(\lambda_2 \cdot -0.5\right)}^{2}}}{\sqrt{1 - t_3}}\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 13.8 |
|---|
| Cost | 138560 |
|---|
\[\begin{array}{l}
t_0 := {\left(\cos \left(0.5 \cdot \phi_2\right) \cdot \sin \left(\phi_1 \cdot 0.5\right) - \sin \left(0.5 \cdot \phi_2\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)}^{2}\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_1\right) + t_0}}{\sqrt{1 - \left(\cos \phi_2 \cdot \left(\cos \phi_1 \cdot {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}\right) + t_0\right)}}\right)
\end{array}
\]
| Alternative 4 |
|---|
| Error | 23.7 |
|---|
| Cost | 119040 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := t_0 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right)\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}}{\sqrt{1 - \left(t_1 + {\left(\cos \left(0.5 \cdot \phi_2\right) \cdot \sin \left(\phi_1 \cdot 0.5\right) - \sin \left(0.5 \cdot \phi_2\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)}^{2}\right)}}\right)
\end{array}
\]
| Alternative 5 |
|---|
| Error | 24.0 |
|---|
| Cost | 118016 |
|---|
\[\begin{array}{l}
t_0 := \cos \phi_1 \cdot \cos \phi_2\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 \cdot \left(t_0 \cdot t_1\right) + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}}{\sqrt{\sqrt{{\left(1 - \mathsf{fma}\left(t_0, {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}, {\sin \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)}^{2}\right)\right)}^{2}}}}\right)
\end{array}
\]
| Alternative 6 |
|---|
| Error | 24.2 |
|---|
| Cost | 93120 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := t_0 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right)\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}}{\sqrt{1 - \left(t_1 + \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)\right)}}\right)
\end{array}
\]
| Alternative 7 |
|---|
| Error | 37.5 |
|---|
| Cost | 92496 |
|---|
\[\begin{array}{l}
t_0 := {\cos \left(\phi_1 \cdot 0.5\right)}^{2}\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_2 := \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_1\\
t_3 := {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}\\
t_4 := \sqrt{t_1 \cdot t_2 + t_3}\\
t_5 := R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_3 + t_2 \cdot \sin \left(\lambda_2 \cdot -0.5\right)}}{\sqrt{t_0 - \cos \phi_1 \cdot {\sin \left(-0.5 \cdot \left(\lambda_2 - \lambda_1\right)\right)}^{2}}}\right)\\
t_6 := {\sin \left(0.5 \cdot \lambda_1\right)}^{2}\\
t_7 := R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_4}{\sqrt{t_0 - \cos \phi_1 \cdot t_6}}\right)\\
\mathbf{if}\;\phi_2 \leq 2.7743224838953767 \cdot 10^{-161}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;\phi_2 \leq 1.2829385222289377 \cdot 10^{-114}:\\
\;\;\;\;t_7\\
\mathbf{elif}\;\phi_2 \leq 6.257655104463324 \cdot 10^{-48}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;\phi_2 \leq 1.0548154016001647 \cdot 10^{-12}:\\
\;\;\;\;t_7\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_4}{\sqrt{{\cos \left(0.5 \cdot \phi_2\right)}^{2} - \cos \phi_2 \cdot t_6}}\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 37.0 |
|---|
| Cost | 92364 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := {\sin \left(0.5 \cdot \lambda_1\right)}^{2}\\
t_2 := \sqrt{t_0 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right) + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}\\
t_3 := R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_2}{\sqrt{{\cos \left(\phi_1 \cdot 0.5\right)}^{2} - \cos \phi_1 \cdot t_1}}\right)\\
\mathbf{if}\;\phi_2 \leq 2.934484314200281 \cdot 10^{-224}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;\phi_2 \leq 8.462066572820002 \cdot 10^{-51}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_2}{\sqrt{0.5 + 0.5 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right)}}\right)\\
\mathbf{elif}\;\phi_2 \leq 1.0548154016001647 \cdot 10^{-12}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_2}{\sqrt{{\cos \left(0.5 \cdot \phi_2\right)}^{2} - \cos \phi_2 \cdot t_1}}\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 32.7 |
|---|
| Cost | 92364 |
|---|
\[\begin{array}{l}
t_0 := {\sin \left(0.5 \cdot \lambda_1\right)}^{2}\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_2 := \sqrt{t_1 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_1\right) + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}\\
t_3 := {\cos \left(\phi_1 \cdot 0.5\right)}^{2}\\
t_4 := R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_2}{\sqrt{t_3 - \cos \phi_1 \cdot t_0}}\right)\\
\mathbf{if}\;\lambda_1 \leq -8.364591118894565 \cdot 10^{+225}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;\lambda_1 \leq -8.066116773151305 \cdot 10^{+131}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_2}{\sqrt{{\cos \left(0.5 \cdot \phi_2\right)}^{2} - \cos \phi_2 \cdot t_0}}\right)\\
\mathbf{elif}\;\lambda_1 \leq -1256670.5135159718:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_2}{\sqrt{t_3 - \cos \phi_1 \cdot {\sin \left(\lambda_2 \cdot -0.5\right)}^{2}}}\right)\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 29.8 |
|---|
| Cost | 92228 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := \sqrt{t_0 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right) + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}\\
\mathbf{if}\;\phi_2 \leq 4.1234870791901225 \cdot 10^{-5}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_1}{\sqrt{{\cos \left(\phi_1 \cdot 0.5\right)}^{2} - \cos \phi_1 \cdot {\sin \left(-0.5 \cdot \left(\lambda_2 - \lambda_1\right)\right)}^{2}}}\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_1}{\sqrt{{\cos \left(0.5 \cdot \phi_2\right)}^{2} - \cos \phi_2 \cdot {\sin \left(0.5 \cdot \lambda_1\right)}^{2}}}\right)\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 28.6 |
|---|
| Cost | 92228 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := {\sin \left(-0.5 \cdot \left(\lambda_2 - \lambda_1\right)\right)}^{2}\\
t_2 := \sqrt{t_0 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right) + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}\\
\mathbf{if}\;\phi_1 \leq -0.5661044950098657:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_2}{\sqrt{{\cos \left(\phi_1 \cdot 0.5\right)}^{2} - \cos \phi_1 \cdot t_1}}\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_2}{\sqrt{{\cos \left(0.5 \cdot \phi_2\right)}^{2} - \cos \phi_2 \cdot t_1}}\right)\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 36.1 |
|---|
| Cost | 92100 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := t_0 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right)\\
t_2 := \cos \left(0.5 \cdot \phi_2\right)\\
\mathbf{if}\;\lambda_2 \leq 177966067951.7507:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}}{\sqrt{{t_2}^{2} - \cos \phi_2 \cdot {\sin \left(0.5 \cdot \lambda_1\right)}^{2}}}\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 + {\left(t_2 \cdot \sin \left(\phi_1 \cdot 0.5\right) - \sin \left(0.5 \cdot \phi_2\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)}^{2}}}{\sqrt{0.5 + 0.5 \cdot \cos \left(\lambda_1 - \lambda_2\right)}}\right)\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 31.7 |
|---|
| Cost | 92100 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := t_0 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right)\\
\mathbf{if}\;\phi_2 \leq 4.1234870791901225 \cdot 10^{-5}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 + {\sin \left(\phi_1 \cdot 0.5\right)}^{2}}}{\sqrt{{\cos \left(\phi_1 \cdot 0.5\right)}^{2} - \cos \phi_1 \cdot {\sin \left(-0.5 \cdot \left(\lambda_2 - \lambda_1\right)\right)}^{2}}}\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}}{\sqrt{{\cos \left(0.5 \cdot \phi_2\right)}^{2} - \cos \phi_2 \cdot {\sin \left(0.5 \cdot \lambda_1\right)}^{2}}}\right)\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 41.3 |
|---|
| Cost | 85952 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_0 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right) + {\left(\cos \left(0.5 \cdot \phi_2\right) \cdot \sin \left(\phi_1 \cdot 0.5\right) - \sin \left(0.5 \cdot \phi_2\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)}^{2}}}{\sqrt{0.5 + 0.5 \cdot \cos \left(\lambda_1 - \lambda_2\right)}}\right)
\end{array}
\]
| Alternative 15 |
|---|
| Error | 41.8 |
|---|
| Cost | 85568 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_0 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right) + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}}{\sqrt{0.5 + 0.5 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right)}}\right)
\end{array}
\]
| Alternative 16 |
|---|
| Error | 43.9 |
|---|
| Cost | 66116 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := t_0 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right)\\
\mathbf{if}\;\phi_2 \leq 1.659110507069364 \cdot 10^{-15}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 + {\sin \left(\phi_1 \cdot 0.5\right)}^{2}}}{\sqrt{0.5 + 0.5 \cdot \cos \left(\lambda_1 - \lambda_2\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}}{\sqrt{0.5 + 0.5 \cdot \cos \lambda_2}}\right)\\
\end{array}
\]
| Alternative 17 |
|---|
| Error | 42.4 |
|---|
| Cost | 66116 |
|---|
\[\begin{array}{l}
t_0 := {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_2 := \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_1\\
\mathbf{if}\;\lambda_1 \leq -4.32858353243579 \cdot 10^{+40}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_0 + t_2 \cdot \sin \left(0.5 \cdot \lambda_1\right)}}{\sqrt{0.5 + 0.5 \cdot \cos \left(\lambda_1 - \lambda_2\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 \cdot t_2 + t_0}}{\sqrt{0.5 + 0.5 \cdot \cos \lambda_2}}\right)\\
\end{array}
\]
| Alternative 18 |
|---|
| Error | 42.1 |
|---|
| Cost | 66116 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := \sqrt{t_0 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right) + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}\\
\mathbf{if}\;\lambda_1 \leq -254867723169934560:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_1}{\sqrt{0.5 + 0.5 \cdot \cos \lambda_1}}\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_1}{\sqrt{0.5 + 0.5 \cdot \cos \lambda_2}}\right)\\
\end{array}
\]
| Alternative 19 |
|---|
| Error | 41.9 |
|---|
| Cost | 66112 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_0 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right) + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}}{\sqrt{0.5 + 0.5 \cdot \cos \left(\lambda_1 - \lambda_2\right)}}\right)
\end{array}
\]
| Alternative 20 |
|---|
| Error | 46.7 |
|---|
| Cost | 65984 |
|---|
\[R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\lambda_2 \cdot -0.5\right)}}{\sqrt{0.5 + 0.5 \cdot \cos \left(\lambda_1 - \lambda_2\right)}}\right)
\]
| Alternative 21 |
|---|
| Error | 44.8 |
|---|
| Cost | 65984 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_0 \cdot \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right) + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}}{\sqrt{0.5 + 0.5 \cdot \cos \lambda_2}}\right)
\end{array}
\]