\[ \begin{array}{c}[lambda1, lambda2] = \mathsf{sort}([lambda1, lambda2])\\ \end{array} \]
\[\cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\right) \cdot R
\]
↓
\[\begin{array}{l}
t_0 := \sin \phi_1 \cdot \sin \phi_2\\
t_1 := \cos \phi_1 \cdot \cos \phi_2\\
\mathbf{if}\;t_0 + t_1 \cdot \cos \left(\lambda_1 - \lambda_2\right) \leq 0.9998:\\
\;\;\;\;\cos^{-1} \left(t_0 + t_1 \cdot \mathsf{fma}\left(\cos \lambda_2, \cos \lambda_1, \sqrt[3]{{\left(\sin \lambda_1 \cdot \sin \lambda_2\right)}^{3}}\right)\right) \cdot R\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\lambda_2 - \lambda_1\right)\\
\end{array}
\]
(FPCore (R lambda1 lambda2 phi1 phi2)
:precision binary64
(*
(acos
(+
(* (sin phi1) (sin phi2))
(* (* (cos phi1) (cos phi2)) (cos (- lambda1 lambda2)))))
R))↓
(FPCore (R lambda1 lambda2 phi1 phi2)
:precision binary64
(let* ((t_0 (* (sin phi1) (sin phi2))) (t_1 (* (cos phi1) (cos phi2))))
(if (<= (+ t_0 (* t_1 (cos (- lambda1 lambda2)))) 0.9998)
(*
(acos
(+
t_0
(*
t_1
(fma
(cos lambda2)
(cos lambda1)
(cbrt (pow (* (sin lambda1) (sin lambda2)) 3.0))))))
R)
(* R (- lambda2 lambda1)))))double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
return acos(((sin(phi1) * sin(phi2)) + ((cos(phi1) * cos(phi2)) * cos((lambda1 - lambda2))))) * R;
}
↓
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
double t_0 = sin(phi1) * sin(phi2);
double t_1 = cos(phi1) * cos(phi2);
double tmp;
if ((t_0 + (t_1 * cos((lambda1 - lambda2)))) <= 0.9998) {
tmp = acos((t_0 + (t_1 * fma(cos(lambda2), cos(lambda1), cbrt(pow((sin(lambda1) * sin(lambda2)), 3.0)))))) * R;
} else {
tmp = R * (lambda2 - lambda1);
}
return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
return Float64(acos(Float64(Float64(sin(phi1) * sin(phi2)) + Float64(Float64(cos(phi1) * cos(phi2)) * cos(Float64(lambda1 - lambda2))))) * R)
end
↓
function code(R, lambda1, lambda2, phi1, phi2)
t_0 = Float64(sin(phi1) * sin(phi2))
t_1 = Float64(cos(phi1) * cos(phi2))
tmp = 0.0
if (Float64(t_0 + Float64(t_1 * cos(Float64(lambda1 - lambda2)))) <= 0.9998)
tmp = Float64(acos(Float64(t_0 + Float64(t_1 * fma(cos(lambda2), cos(lambda1), cbrt((Float64(sin(lambda1) * sin(lambda2)) ^ 3.0)))))) * R);
else
tmp = Float64(R * Float64(lambda2 - lambda1));
end
return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := N[(N[ArcCos[N[(N[(N[Sin[phi1], $MachinePrecision] * N[Sin[phi2], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Cos[phi1], $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * R), $MachinePrecision]
↓
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[Sin[phi1], $MachinePrecision] * N[Sin[phi2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[phi1], $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 + N[(t$95$1 * N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.9998], N[(N[ArcCos[N[(t$95$0 + N[(t$95$1 * N[(N[Cos[lambda2], $MachinePrecision] * N[Cos[lambda1], $MachinePrecision] + N[Power[N[Power[N[(N[Sin[lambda1], $MachinePrecision] * N[Sin[lambda2], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * R), $MachinePrecision], N[(R * N[(lambda2 - lambda1), $MachinePrecision]), $MachinePrecision]]]]
\cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\right) \cdot R
↓
\begin{array}{l}
t_0 := \sin \phi_1 \cdot \sin \phi_2\\
t_1 := \cos \phi_1 \cdot \cos \phi_2\\
\mathbf{if}\;t_0 + t_1 \cdot \cos \left(\lambda_1 - \lambda_2\right) \leq 0.9998:\\
\;\;\;\;\cos^{-1} \left(t_0 + t_1 \cdot \mathsf{fma}\left(\cos \lambda_2, \cos \lambda_1, \sqrt[3]{{\left(\sin \lambda_1 \cdot \sin \lambda_2\right)}^{3}}\right)\right) \cdot R\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\lambda_2 - \lambda_1\right)\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 2.2 |
|---|
| Cost | 97732 |
|---|
\[\begin{array}{l}
t_0 := \sin \phi_1 \cdot \sin \phi_2\\
t_1 := \cos \phi_1 \cdot \cos \phi_2\\
\mathbf{if}\;t_0 + t_1 \cdot \cos \left(\lambda_1 - \lambda_2\right) \leq 0.9998:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + t_1 \cdot \mathsf{fma}\left(\cos \lambda_2, \cos \lambda_1, \sin \lambda_1 \cdot \sin \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\lambda_2 - \lambda_1\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 2.2 |
|---|
| Cost | 91460 |
|---|
\[\begin{array}{l}
t_0 := \sin \phi_1 \cdot \sin \phi_2\\
t_1 := \cos \phi_1 \cdot \cos \phi_2\\
\mathbf{if}\;t_0 + t_1 \cdot \cos \left(\lambda_1 - \lambda_2\right) \leq 0.9998:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + t_1 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_2 \cdot \cos \lambda_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\lambda_2 - \lambda_1\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 10.2 |
|---|
| Cost | 58564 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_2 \leq -9 \cdot 10^{-47}:\\
\;\;\;\;R \cdot {\left({\cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_2 \cdot \left(\cos \phi_1 \cdot t_0\right)\right)\right)}^{3}\right)}^{0.3333333333333333}\\
\mathbf{elif}\;\phi_2 \leq 6 \cdot 10^{-10}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \mathsf{fma}\left(\cos \lambda_2, \cos \lambda_1, \sin \lambda_1 \cdot \sin \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0 + \log \left(1 + \mathsf{expm1}\left(\sin \phi_1 \cdot \sin \phi_2\right)\right)\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 10.2 |
|---|
| Cost | 52424 |
|---|
\[\begin{array}{l}
t_0 := \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\\
t_1 := \sin \phi_1 \cdot \sin \phi_2\\
\mathbf{if}\;\phi_2 \leq -9 \cdot 10^{-47}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + t_0\right)\\
\mathbf{elif}\;\phi_2 \leq 1.2 \cdot 10^{-8}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \mathsf{fma}\left(\cos \lambda_2, \cos \lambda_1, \sin \lambda_1 \cdot \sin \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + \log \left(1 + \mathsf{expm1}\left(t_1\right)\right)\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 10.2 |
|---|
| Cost | 52296 |
|---|
\[\begin{array}{l}
t_0 := \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\\
t_1 := \sin \phi_1 \cdot \sin \phi_2\\
\mathbf{if}\;\phi_2 \leq -9 \cdot 10^{-47}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + t_0\right)\\
\mathbf{elif}\;\phi_2 \leq 2.9 \cdot 10^{-10}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \mathsf{fma}\left(\cos \lambda_2, \cos \lambda_1, \sin \lambda_1 \cdot \sin \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + \mathsf{log1p}\left(\mathsf{expm1}\left(t_1\right)\right)\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 10.2 |
|---|
| Cost | 45641 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_2 \leq -9 \cdot 10^{-47} \lor \neg \left(\phi_2 \leq 1.65 \cdot 10^{-8}\right):\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \mathsf{fma}\left(\cos \lambda_2, \cos \lambda_1, \sin \lambda_1 \cdot \sin \lambda_2\right)\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 16.8 |
|---|
| Cost | 39764 |
|---|
\[\begin{array}{l}
t_0 := \sin \phi_1 \cdot \sin \phi_2\\
t_1 := R \cdot \cos^{-1} \left(t_0 + \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \cos \lambda_1\right)\\
t_2 := \sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_2 \cdot \cos \lambda_1\\
t_3 := R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_2\right)\\
\mathbf{if}\;\phi_1 \leq -3 \cdot 10^{+260}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\phi_1 \leq -6.3 \cdot 10^{+211}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;\phi_1 \leq -1.2 \cdot 10^{+86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\phi_1 \leq -1.6 \cdot 10^{-6}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;\phi_1 \leq 2.4 \cdot 10^{-14}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \cos \lambda_2\right)\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 16.7 |
|---|
| Cost | 39764 |
|---|
\[\begin{array}{l}
t_0 := \cos \phi_1 \cdot \cos \phi_2\\
t_1 := \sin \phi_1 \cdot \sin \phi_2\\
t_2 := R \cdot \cos^{-1} \left(t_1 + t_0 \cdot \cos \lambda_1\right)\\
t_3 := \sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_2 \cdot \cos \lambda_1\\
t_4 := R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_3\right)\\
\mathbf{if}\;\phi_1 \leq -2.35 \cdot 10^{+260}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq -4.5 \cdot 10^{+211}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;\phi_1 \leq -5 \cdot 10^{+79}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq -0.00064:\\
\;\;\;\;t_4\\
\mathbf{elif}\;\phi_1 \leq 2.4 \cdot 10^{-14}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_3\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + t_0 \cdot \cos \lambda_2\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 10.2 |
|---|
| Cost | 39497 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_2 \leq -9 \cdot 10^{-47} \lor \neg \left(\phi_2 \leq 1.05 \cdot 10^{-8}\right):\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_2 \cdot \cos \lambda_1\right)\right)\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 16.2 |
|---|
| Cost | 39369 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_2 \leq -3.2 \cdot 10^{-7} \lor \neg \left(\phi_2 \leq 3.7 \cdot 10^{-8}\right):\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \cos \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_2 \cdot \cos \lambda_1\right)\right)\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 21.1 |
|---|
| Cost | 39368 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_2 \leq -6.6 \cdot 10^{-5}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \cos \phi_1 \cdot \cos \phi_2\right)\\
\mathbf{elif}\;\phi_2 \leq 9.5 \cdot 10^{-8}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_2 \cdot \cos \lambda_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot e^{\log \cos^{-1} \left(\cos \phi_2 \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 20.1 |
|---|
| Cost | 39368 |
|---|
\[\begin{array}{l}
t_0 := \sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_2 \cdot \cos \lambda_1\\
\mathbf{if}\;\phi_1 \leq -1.02 \cdot 10^{-5}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_0\right)\\
\mathbf{elif}\;\phi_1 \leq 2.4 \cdot 10^{-14}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \cos \phi_1 \cdot \cos \phi_2\right)\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 29.5 |
|---|
| Cost | 33097 |
|---|
\[\begin{array}{l}
t_0 := \cos \phi_1 \cdot \cos \phi_2\\
\mathbf{if}\;\phi_1 \leq -9.5 \cdot 10^{+74} \lor \neg \left(\phi_1 \leq 2.4 \cdot 10^{-14}\right):\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + t_0\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 \cdot \cos \left(\lambda_1 - \lambda_2\right) + \phi_1 \cdot \sin \phi_2\right)\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 28.9 |
|---|
| Cost | 32972 |
|---|
\[\begin{array}{l}
t_0 := R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \cos \phi_1 \cdot \cos \phi_2\right)\\
t_1 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -1.05 \cdot 10^{+81}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\phi_1 \leq -0.000105:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5 - \sin^{-1} \left(\cos \phi_1 \cdot t_1\right)\right)\\
\mathbf{elif}\;\phi_1 \leq 2.4 \cdot 10^{-14}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_1 + \phi_1 \cdot \sin \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 31.9 |
|---|
| Cost | 32844 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_1 := \cos \phi_1 \cdot t_0\\
\mathbf{if}\;\phi_2 \leq 1.8 \cdot 10^{-81}:\\
\;\;\;\;R \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\cos^{-1} t_1\right)\right)\\
\mathbf{elif}\;\phi_2 \leq 8 \cdot 10^{-38}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_2 \cdot \cos \lambda_1\right)\\
\mathbf{elif}\;\phi_2 \leq 9.5 \cdot 10^{-8}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + \sin \phi_1 \cdot \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot e^{\log \cos^{-1} \left(\cos \phi_2 \cdot t_0\right)}\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 31.2 |
|---|
| Cost | 32580 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -6.8 \cdot 10^{-6}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5 - \sin^{-1} \left(\cos \phi_1 \cdot t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\cos^{-1} \left(\cos \phi_2 \cdot t_0\right)\right)\right)\\
\end{array}
\]
| Alternative 17 |
|---|
| Error | 31.2 |
|---|
| Cost | 26372 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -0.0029:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5 - \sin^{-1} \left(\cos \phi_1 \cdot t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_0\right)\\
\end{array}
\]
| Alternative 18 |
|---|
| Error | 40.4 |
|---|
| Cost | 19784 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_2 \leq 2.9 \cdot 10^{-251}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \lambda_2\right)\\
\mathbf{elif}\;\phi_2 \leq 9.5 \cdot 10^{-8}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \lambda_1\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \cos \lambda_1\right)\\
\end{array}
\]
| Alternative 19 |
|---|
| Error | 33.1 |
|---|
| Cost | 19780 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_2 \leq 9.5 \cdot 10^{-8}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \cos \lambda_1\right)\\
\end{array}
\]
| Alternative 20 |
|---|
| Error | 31.2 |
|---|
| Cost | 19780 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -1.34 \cdot 10^{-5}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_0\right)\\
\end{array}
\]
| Alternative 21 |
|---|
| Error | 39.5 |
|---|
| Cost | 19652 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_2 \leq 2.9:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \lambda_1\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \left(\lambda_2 - \lambda_1\right)\\
\end{array}
\]
| Alternative 22 |
|---|
| Error | 36.6 |
|---|
| Cost | 19652 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_2 \leq 7 \cdot 10^{-27}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \lambda_1\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \lambda_2\right)\\
\end{array}
\]
| Alternative 23 |
|---|
| Error | 47.4 |
|---|
| Cost | 13388 |
|---|
\[\begin{array}{l}
t_0 := R \cdot \cos^{-1} \cos \lambda_1\\
\mathbf{if}\;\lambda_2 \leq 2.05 \cdot 10^{-116}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\lambda_2 \leq 2.4 \cdot 10^{-5}:\\
\;\;\;\;R \cdot \left(\lambda_2 - \lambda_1\right)\\
\mathbf{elif}\;\lambda_2 \leq 2.9:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \lambda_2\\
\end{array}
\]
| Alternative 24 |
|---|
| Error | 47.3 |
|---|
| Cost | 13385 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_2 \leq 1.05 \cdot 10^{-116} \lor \neg \left(\lambda_2 \leq 2.3 \cdot 10^{-8}\right):\\
\;\;\;\;R \cdot \cos^{-1} \cos \left(\lambda_2 - \lambda_1\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\lambda_2 - \lambda_1\right)\\
\end{array}
\]
| Alternative 25 |
|---|
| Error | 51.6 |
|---|
| Cost | 13124 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_1 \leq -7 \cdot 10^{-7}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \lambda_1\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\lambda_2 - \lambda_1\right)\\
\end{array}
\]
| Alternative 26 |
|---|
| Error | 59.2 |
|---|
| Cost | 388 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_1 \leq -8.2 \cdot 10^{-207}:\\
\;\;\;\;\lambda_1 \cdot \left(-R\right)\\
\mathbf{else}:\\
\;\;\;\;\lambda_2 \cdot R\\
\end{array}
\]
| Alternative 27 |
|---|
| Error | 59.1 |
|---|
| Cost | 320 |
|---|
\[R \cdot \left(\lambda_2 - \lambda_1\right)
\]
| Alternative 28 |
|---|
| Error | 60.0 |
|---|
| Cost | 192 |
|---|
\[\lambda_2 \cdot R
\]