\[ \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}\;\cos^{-1} \left(t_0 + t_1 \cdot \cos \left(\lambda_1 - \lambda_2\right)\right) \leq 4 \cdot 10^{-7}:\\
\;\;\;\;\left(\lambda_2 - \lambda_1\right) \cdot R\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + t_1 \cdot \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sin \lambda_1 \cdot \sin \lambda_2\right)\right) + \cos \lambda_1 \cdot \cos \lambda_2\right)\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 (<= (acos (+ t_0 (* t_1 (cos (- lambda1 lambda2))))) 4e-7)
(* (- lambda2 lambda1) R)
(*
R
(acos
(+
t_0
(*
t_1
(+
(expm1 (log1p (* (sin lambda1) (sin lambda2))))
(* (cos lambda1) (cos lambda2))))))))))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 (acos((t_0 + (t_1 * cos((lambda1 - lambda2))))) <= 4e-7) {
tmp = (lambda2 - lambda1) * R;
} else {
tmp = R * acos((t_0 + (t_1 * (expm1(log1p((sin(lambda1) * sin(lambda2)))) + (cos(lambda1) * cos(lambda2))))));
}
return tmp;
}
public static double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
return Math.acos(((Math.sin(phi1) * Math.sin(phi2)) + ((Math.cos(phi1) * Math.cos(phi2)) * Math.cos((lambda1 - lambda2))))) * R;
}
↓
public static double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
double t_0 = Math.sin(phi1) * Math.sin(phi2);
double t_1 = Math.cos(phi1) * Math.cos(phi2);
double tmp;
if (Math.acos((t_0 + (t_1 * Math.cos((lambda1 - lambda2))))) <= 4e-7) {
tmp = (lambda2 - lambda1) * R;
} else {
tmp = R * Math.acos((t_0 + (t_1 * (Math.expm1(Math.log1p((Math.sin(lambda1) * Math.sin(lambda2)))) + (Math.cos(lambda1) * Math.cos(lambda2))))));
}
return tmp;
}
def code(R, lambda1, lambda2, phi1, phi2):
return math.acos(((math.sin(phi1) * math.sin(phi2)) + ((math.cos(phi1) * math.cos(phi2)) * math.cos((lambda1 - lambda2))))) * R
↓
def code(R, lambda1, lambda2, phi1, phi2):
t_0 = math.sin(phi1) * math.sin(phi2)
t_1 = math.cos(phi1) * math.cos(phi2)
tmp = 0
if math.acos((t_0 + (t_1 * math.cos((lambda1 - lambda2))))) <= 4e-7:
tmp = (lambda2 - lambda1) * R
else:
tmp = R * math.acos((t_0 + (t_1 * (math.expm1(math.log1p((math.sin(lambda1) * math.sin(lambda2)))) + (math.cos(lambda1) * math.cos(lambda2))))))
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 (acos(Float64(t_0 + Float64(t_1 * cos(Float64(lambda1 - lambda2))))) <= 4e-7)
tmp = Float64(Float64(lambda2 - lambda1) * R);
else
tmp = Float64(R * acos(Float64(t_0 + Float64(t_1 * Float64(expm1(log1p(Float64(sin(lambda1) * sin(lambda2)))) + Float64(cos(lambda1) * cos(lambda2)))))));
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[ArcCos[N[(t$95$0 + N[(t$95$1 * N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 4e-7], N[(N[(lambda2 - lambda1), $MachinePrecision] * R), $MachinePrecision], N[(R * N[ArcCos[N[(t$95$0 + N[(t$95$1 * N[(N[(Exp[N[Log[1 + N[(N[Sin[lambda1], $MachinePrecision] * N[Sin[lambda2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision] + N[(N[Cos[lambda1], $MachinePrecision] * N[Cos[lambda2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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}\;\cos^{-1} \left(t_0 + t_1 \cdot \cos \left(\lambda_1 - \lambda_2\right)\right) \leq 4 \cdot 10^{-7}:\\
\;\;\;\;\left(\lambda_2 - \lambda_1\right) \cdot R\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + t_1 \cdot \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sin \lambda_1 \cdot \sin \lambda_2\right)\right) + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Accuracy | 96.6% |
|---|
| Cost | 104132 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\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) \leq 4 \cdot 10^{-7}:\\
\;\;\;\;\left(\lambda_2 - \lambda_1\right) \cdot R\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\right)\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 96.6% |
|---|
| Cost | 97860 |
|---|
\[\begin{array}{l}
t_0 := \sin \phi_1 \cdot \sin \phi_2\\
\mathbf{if}\;\cos^{-1} \left(t_0 + \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\right) \leq 4 \cdot 10^{-7}:\\
\;\;\;\;\left(\lambda_2 - \lambda_1\right) \cdot R\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 96.6% |
|---|
| Cost | 97860 |
|---|
\[\begin{array}{l}
t_0 := \sin \phi_1 \cdot \sin \phi_2\\
t_1 := \cos \phi_1 \cdot \cos \phi_2\\
\mathbf{if}\;\cos^{-1} \left(t_0 + t_1 \cdot \cos \left(\lambda_1 - \lambda_2\right)\right) \leq 4 \cdot 10^{-7}:\\
\;\;\;\;\left(\lambda_2 - \lambda_1\right) \cdot R\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + t_1 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 83.4% |
|---|
| Cost | 52552 |
|---|
\[\begin{array}{l}
t_0 := \cos \phi_1 \cdot \cos \phi_2\\
t_1 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -6.3 \cdot 10^{-24}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + t_0 \cdot \log \left(e^{t_1}\right)\right)\\
\mathbf{elif}\;\phi_1 \leq 0.16:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right) + \phi_1 \cdot \sin \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5 - \sin^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, t_0 \cdot t_1\right)\right)\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 83.3% |
|---|
| Cost | 52360 |
|---|
\[\begin{array}{l}
t_0 := \cos \phi_1 \cdot \cos \phi_2\\
t_1 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -6.3 \cdot 10^{-24}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + t_0 \cdot \log \left(e^{t_1}\right)\right)\\
\mathbf{elif}\;\phi_1 \leq 0.115:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \cos \phi_2 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5 - \sin^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, t_0 \cdot t_1\right)\right)\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 83.5% |
|---|
| Cost | 52164 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -4.3 \cdot 10^{-14}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0 + \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \phi_1 \cdot \sin \phi_2\right)\right)\right)\\
\mathbf{elif}\;\phi_1 \leq 0.115:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \cos \phi_2 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_1 \cdot \left(\cos \phi_2 \cdot t_0\right)\right)\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 83.3% |
|---|
| Cost | 52164 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -6.3 \cdot 10^{-24}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \log \left(e^{t_0}\right)\right)\\
\mathbf{elif}\;\phi_1 \leq 0.115:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \cos \phi_2 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_1 \cdot \left(\cos \phi_2 \cdot t_0\right)\right)\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Accuracy | 83.5% |
|---|
| Cost | 46024 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -4.3 \cdot 10^{-14}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right)\\
\mathbf{elif}\;\phi_1 \leq 0.115:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \cos \phi_2 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_1 \cdot \left(\cos \phi_2 \cdot t_0\right)\right)\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Accuracy | 83.4% |
|---|
| Cost | 45768 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -4.3 \cdot 10^{-14}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right)\\
\mathbf{elif}\;\phi_1 \leq 0.115:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_1 \cdot \left(\cos \phi_2 \cdot t_0\right)\right)\right)\\
\end{array}
\]
| Alternative 10 |
|---|
| Accuracy | 73.9% |
|---|
| Cost | 39764 |
|---|
\[\begin{array}{l}
t_0 := R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \cos \lambda_1\right)\\
t_1 := \sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\\
t_2 := R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_1\right)\\
\mathbf{if}\;\phi_1 \leq -1.8 \cdot 10^{+246}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\phi_1 \leq -4.8 \cdot 10^{+198}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq -1.15 \cdot 10^{+102}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\phi_1 \leq -0.00205:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq 0.115:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_1\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 11 |
|---|
| Accuracy | 74.6% |
|---|
| Cost | 39632 |
|---|
\[\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_1 \cdot \cos \lambda_2\\
\mathbf{if}\;\lambda_1 \leq -7.5 \cdot 10^{+201}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\lambda_1 \leq -7.2 \cdot 10^{+106}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_3\right)\\
\mathbf{elif}\;\lambda_1 \leq -2.5 \cdot 10^{-8}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\lambda_1 \leq 1.9 \cdot 10^{+16}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + t_0 \cdot \cos \lambda_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_3\right)\\
\end{array}
\]
| Alternative 12 |
|---|
| Accuracy | 61.0% |
|---|
| Cost | 39500 |
|---|
\[\begin{array}{l}
t_0 := \cos \phi_1 \cdot \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -4.4 \cdot 10^{+156}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5\right) - R \cdot \sin^{-1} t_0\\
\mathbf{elif}\;\phi_1 \leq -3.3 \cdot 10^{+125}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \cos \phi_1 \cdot \cos \phi_2\right)\\
\mathbf{elif}\;\phi_1 \leq -0.0046:\\
\;\;\;\;R \cdot \cos^{-1} t_0\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\\
\end{array}
\]
| Alternative 13 |
|---|
| Accuracy | 83.3% |
|---|
| Cost | 39497 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_1 \leq -1.36 \cdot 10^{-14} \lor \neg \left(\phi_1 \leq 0.115\right):\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\\
\end{array}
\]
| Alternative 14 |
|---|
| Accuracy | 83.4% |
|---|
| Cost | 39496 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_1 := \sin \phi_1 \cdot \sin \phi_2\\
\mathbf{if}\;\phi_1 \leq -4.3 \cdot 10^{-14}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right)\\
\mathbf{elif}\;\phi_1 \leq 0.115:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + \cos \phi_1 \cdot \left(\cos \phi_2 \cdot t_0\right)\right)\\
\end{array}
\]
| Alternative 15 |
|---|
| Accuracy | 56.0% |
|---|
| Cost | 39376 |
|---|
\[\begin{array}{l}
t_0 := \cos \phi_1 \cdot \cos \phi_2\\
t_1 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -4.4 \cdot 10^{+156}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5\right) - R \cdot \sin^{-1} \left(\cos \phi_1 \cdot t_1\right)\\
\mathbf{elif}\;\phi_1 \leq -8 \cdot 10^{+124}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + t_0\right)\\
\mathbf{elif}\;\phi_1 \leq -90000:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \sqrt[3]{{t_1}^{3}}\right)\\
\mathbf{elif}\;\phi_1 \leq 0.42:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 \cdot t_1 + \phi_1 \cdot \sin \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, t_0\right)\right)\\
\end{array}
\]
| Alternative 16 |
|---|
| Accuracy | 68.9% |
|---|
| Cost | 39368 |
|---|
\[\begin{array}{l}
t_0 := \sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\\
\mathbf{if}\;\phi_2 \leq -0.00102:\\
\;\;\;\;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 10^{-6}:\\
\;\;\;\;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 17 |
|---|
| Accuracy | 56.0% |
|---|
| Cost | 33360 |
|---|
\[\begin{array}{l}
t_0 := \cos \phi_1 \cdot \cos \phi_2\\
t_1 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_2 := R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + t_0\right)\\
\mathbf{if}\;\phi_1 \leq -5 \cdot 10^{+156}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5\right) - R \cdot \sin^{-1} \left(\cos \phi_1 \cdot t_1\right)\\
\mathbf{elif}\;\phi_1 \leq -3.25 \cdot 10^{+125}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq -90000:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \sqrt[3]{{t_1}^{3}}\right)\\
\mathbf{elif}\;\phi_1 \leq 900000:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 \cdot t_1 + \phi_1 \cdot \sin \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 18 |
|---|
| Accuracy | 55.8% |
|---|
| Cost | 33104 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_1 := \cos \phi_1 \cdot t_0\\
t_2 := R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \cos \phi_1 \cdot \cos \phi_2\right)\\
\mathbf{if}\;\phi_1 \leq -4.4 \cdot 10^{+156}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5\right) - R \cdot \sin^{-1} t_1\\
\mathbf{elif}\;\phi_1 \leq -5.7 \cdot 10^{+124}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq -0.0047:\\
\;\;\;\;R \cdot \cos^{-1} t_1\\
\mathbf{elif}\;\phi_1 \leq 0.16:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \cos \phi_2 \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 19 |
|---|
| Accuracy | 50.5% |
|---|
| Cost | 26500 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_2 \leq 6 \cdot 10^{-6}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5\right) - R \cdot \sin^{-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 20 |
|---|
| Accuracy | 50.5% |
|---|
| Cost | 26372 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_2 \leq 3.5 \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 \cos^{-1} \left(\cos \phi_2 \cdot t_0\right)\\
\end{array}
\]
| Alternative 21 |
|---|
| Accuracy | 42.7% |
|---|
| Cost | 19784 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_1 \leq -2.5 \cdot 10^{-8}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \lambda_1\right)\\
\mathbf{elif}\;\lambda_1 \leq -1.36 \cdot 10^{-188}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \lambda_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \cos \lambda_2\right)\\
\end{array}
\]
| Alternative 22 |
|---|
| Accuracy | 48.0% |
|---|
| Cost | 19780 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_2 \leq 0.00052:\\
\;\;\;\;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_2\right)\\
\end{array}
\]
| Alternative 23 |
|---|
| Accuracy | 50.5% |
|---|
| Cost | 19780 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_2 \leq 6.2 \cdot 10^{-6}:\\
\;\;\;\;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 24 |
|---|
| Accuracy | 37.7% |
|---|
| Cost | 19652 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_2 \leq 0.0025:\\
\;\;\;\;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 25 |
|---|
| Accuracy | 42.7% |
|---|
| Cost | 19652 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_1 \leq -2.2 \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_1 \cdot \cos \lambda_2\right)\\
\end{array}
\]
| Alternative 26 |
|---|
| Accuracy | 26.3% |
|---|
| Cost | 13384 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_2 \leq 3.6 \cdot 10^{-108}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \lambda_1\\
\mathbf{elif}\;\lambda_2 \leq 5.9:\\
\;\;\;\;\left(\lambda_2 - \lambda_1\right) \cdot R\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \left(\lambda_2 - \lambda_1\right)\\
\end{array}
\]
| Alternative 27 |
|---|
| Accuracy | 26.3% |
|---|
| Cost | 13256 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_2 \leq 3.6 \cdot 10^{-108}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \lambda_1\\
\mathbf{elif}\;\lambda_2 \leq 5.9:\\
\;\;\;\;\left(\lambda_2 - \lambda_1\right) \cdot R\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \lambda_2\\
\end{array}
\]
| Alternative 28 |
|---|
| Accuracy | 19.6% |
|---|
| Cost | 13124 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_1 \leq -1.9 \cdot 10^{-8}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \lambda_1\\
\mathbf{else}:\\
\;\;\;\;\left(\lambda_2 - \lambda_1\right) \cdot R\\
\end{array}
\]
| Alternative 29 |
|---|
| Accuracy | 7.7% |
|---|
| Cost | 388 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_1 \leq -8.2 \cdot 10^{-157}:\\
\;\;\;\;\lambda_1 \cdot \left(-R\right)\\
\mathbf{else}:\\
\;\;\;\;\lambda_2 \cdot R\\
\end{array}
\]
| Alternative 30 |
|---|
| Accuracy | 7.7% |
|---|
| Cost | 320 |
|---|
\[\left(\lambda_2 - \lambda_1\right) \cdot R
\]
| Alternative 31 |
|---|
| Accuracy | 6.0% |
|---|
| Cost | 192 |
|---|
\[\lambda_2 \cdot R
\]