\[ \begin{array}{c}[lambda1, lambda2] = \mathsf{sort}([lambda1, lambda2])\\ [phi1, phi2] = \mathsf{sort}([phi1, phi2])\\ \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\\
\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 0.0005:\\
\;\;\;\;\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_2 \cdot \sin \lambda_1 + \cos \lambda_2 \cdot \cos \lambda_1\right)\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))))
(if (<=
(acos (+ t_0 (* (* (cos phi1) (cos phi2)) (cos (- lambda1 lambda2)))))
0.0005)
(* (- lambda2 lambda1) R)
(*
R
(acos
(+
t_0
(*
(cos phi2)
(*
(cos phi1)
(+
(* (sin lambda2) (sin lambda1))
(* (cos lambda2) (cos 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 tmp;
if (acos((t_0 + ((cos(phi1) * cos(phi2)) * cos((lambda1 - lambda2))))) <= 0.0005) {
tmp = (lambda2 - lambda1) * R;
} else {
tmp = R * acos((t_0 + (cos(phi2) * (cos(phi1) * ((sin(lambda2) * sin(lambda1)) + (cos(lambda2) * cos(lambda1)))))));
}
return tmp;
}
real(8) function code(r, lambda1, lambda2, phi1, phi2)
real(8), intent (in) :: r
real(8), intent (in) :: lambda1
real(8), intent (in) :: lambda2
real(8), intent (in) :: phi1
real(8), intent (in) :: phi2
code = acos(((sin(phi1) * sin(phi2)) + ((cos(phi1) * cos(phi2)) * cos((lambda1 - lambda2))))) * r
end function
↓
real(8) function code(r, lambda1, lambda2, phi1, phi2)
real(8), intent (in) :: r
real(8), intent (in) :: lambda1
real(8), intent (in) :: lambda2
real(8), intent (in) :: phi1
real(8), intent (in) :: phi2
real(8) :: t_0
real(8) :: tmp
t_0 = sin(phi1) * sin(phi2)
if (acos((t_0 + ((cos(phi1) * cos(phi2)) * cos((lambda1 - lambda2))))) <= 0.0005d0) then
tmp = (lambda2 - lambda1) * r
else
tmp = r * acos((t_0 + (cos(phi2) * (cos(phi1) * ((sin(lambda2) * sin(lambda1)) + (cos(lambda2) * cos(lambda1)))))))
end if
code = tmp
end function
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 tmp;
if (Math.acos((t_0 + ((Math.cos(phi1) * Math.cos(phi2)) * Math.cos((lambda1 - lambda2))))) <= 0.0005) {
tmp = (lambda2 - lambda1) * R;
} else {
tmp = R * Math.acos((t_0 + (Math.cos(phi2) * (Math.cos(phi1) * ((Math.sin(lambda2) * Math.sin(lambda1)) + (Math.cos(lambda2) * Math.cos(lambda1)))))));
}
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)
tmp = 0
if math.acos((t_0 + ((math.cos(phi1) * math.cos(phi2)) * math.cos((lambda1 - lambda2))))) <= 0.0005:
tmp = (lambda2 - lambda1) * R
else:
tmp = R * math.acos((t_0 + (math.cos(phi2) * (math.cos(phi1) * ((math.sin(lambda2) * math.sin(lambda1)) + (math.cos(lambda2) * math.cos(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))
tmp = 0.0
if (acos(Float64(t_0 + Float64(Float64(cos(phi1) * cos(phi2)) * cos(Float64(lambda1 - lambda2))))) <= 0.0005)
tmp = Float64(Float64(lambda2 - lambda1) * R);
else
tmp = Float64(R * acos(Float64(t_0 + Float64(cos(phi2) * Float64(cos(phi1) * Float64(Float64(sin(lambda2) * sin(lambda1)) + Float64(cos(lambda2) * cos(lambda1))))))));
end
return tmp
end
function tmp = code(R, lambda1, lambda2, phi1, phi2)
tmp = acos(((sin(phi1) * sin(phi2)) + ((cos(phi1) * cos(phi2)) * cos((lambda1 - lambda2))))) * R;
end
↓
function tmp_2 = code(R, lambda1, lambda2, phi1, phi2)
t_0 = sin(phi1) * sin(phi2);
tmp = 0.0;
if (acos((t_0 + ((cos(phi1) * cos(phi2)) * cos((lambda1 - lambda2))))) <= 0.0005)
tmp = (lambda2 - lambda1) * R;
else
tmp = R * acos((t_0 + (cos(phi2) * (cos(phi1) * ((sin(lambda2) * sin(lambda1)) + (cos(lambda2) * cos(lambda1)))))));
end
tmp_2 = 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]}, If[LessEqual[N[ArcCos[N[(t$95$0 + N[(N[(N[Cos[phi1], $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 0.0005], N[(N[(lambda2 - lambda1), $MachinePrecision] * R), $MachinePrecision], N[(R * N[ArcCos[N[(t$95$0 + N[(N[Cos[phi2], $MachinePrecision] * N[(N[Cos[phi1], $MachinePrecision] * N[(N[(N[Sin[lambda2], $MachinePrecision] * N[Sin[lambda1], $MachinePrecision]), $MachinePrecision] + N[(N[Cos[lambda2], $MachinePrecision] * N[Cos[lambda1], $MachinePrecision]), $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\\
\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 0.0005:\\
\;\;\;\;\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_2 \cdot \sin \lambda_1 + \cos \lambda_2 \cdot \cos \lambda_1\right)\right)\right)\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 11.5 |
|---|
| Cost | 58436 |
|---|
\[\begin{array}{l}
t_0 := \sin \phi_1 \cdot \sin \phi_2\\
t_1 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_2 := \sin \lambda_2 \cdot \sin \lambda_1 + \cos \lambda_2 \cdot \cos \lambda_1\\
t_3 := \cos \phi_1 \cdot \cos \phi_2\\
\mathbf{if}\;\phi_2 \leq -0.015:\\
\;\;\;\;R \cdot \cos^{-1} \log \left(e^{\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_2 \cdot \left(\cos \phi_1 \cdot t_1\right)\right)}\right)\\
\mathbf{elif}\;\phi_2 \leq 1.05 \cdot 10^{-29}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \left(\cos \phi_1 \cdot t_2\right) + \sin \phi_1 \cdot \phi_2\right)\\
\mathbf{elif}\;\phi_2 \leq 1.5 \cdot 10^{+144}:\\
\;\;\;\;\cos^{-1} \left(t_0 + t_3 \cdot t_1\right) \cdot R\\
\mathbf{elif}\;\phi_2 \leq 4.5 \cdot 10^{+183}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + t_3 \cdot \log \left(1 + \mathsf{expm1}\left(t_1\right)\right)\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 11.6 |
|---|
| Cost | 52688 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_1 := \sin \phi_1 \cdot \sin \phi_2\\
t_2 := \cos \phi_1 \cdot \cos \phi_2\\
t_3 := \sin \lambda_2 \cdot \sin \lambda_1 + \cos \lambda_2 \cdot \cos \lambda_1\\
\mathbf{if}\;\phi_2 \leq -1.65 \cdot 10^{-7}:\\
\;\;\;\;R \cdot \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)\\
\mathbf{elif}\;\phi_2 \leq 1.05 \cdot 10^{-29}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_3\right)\\
\mathbf{elif}\;\phi_2 \leq 6.9 \cdot 10^{+142}:\\
\;\;\;\;\cos^{-1} \left(t_1 + t_2 \cdot t_0\right) \cdot R\\
\mathbf{elif}\;\phi_2 \leq 4.5 \cdot 10^{+183}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_3\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + t_2 \cdot \log \left(1 + \mathsf{expm1}\left(t_0\right)\right)\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 11.5 |
|---|
| Cost | 52688 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_1 := \sin \phi_1 \cdot \sin \phi_2\\
t_2 := \sin \lambda_2 \cdot \sin \lambda_1 + \cos \lambda_2 \cdot \cos \lambda_1\\
t_3 := \cos \phi_1 \cdot \cos \phi_2\\
\mathbf{if}\;\phi_2 \leq -0.03:\\
\;\;\;\;R \cdot \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)\\
\mathbf{elif}\;\phi_2 \leq 1.05 \cdot 10^{-29}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \left(\cos \phi_1 \cdot t_2\right) + \sin \phi_1 \cdot \phi_2\right)\\
\mathbf{elif}\;\phi_2 \leq 1.5 \cdot 10^{+144}:\\
\;\;\;\;\cos^{-1} \left(t_1 + t_3 \cdot t_0\right) \cdot R\\
\mathbf{elif}\;\phi_2 \leq 4.5 \cdot 10^{+183}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + t_3 \cdot \log \left(1 + \mathsf{expm1}\left(t_0\right)\right)\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 11.6 |
|---|
| Cost | 46032 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_1 := R \cdot \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)\\
t_2 := \sin \lambda_2 \cdot \sin \lambda_1 + \cos \lambda_2 \cdot \cos \lambda_1\\
\mathbf{if}\;\phi_2 \leq -4.6 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\phi_2 \leq 1.05 \cdot 10^{-29}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_2\right)\\
\mathbf{elif}\;\phi_2 \leq 1.5 \cdot 10^{+144}:\\
\;\;\;\;\cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0\right) \cdot R\\
\mathbf{elif}\;\phi_2 \leq 4.5 \cdot 10^{+183}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 11.6 |
|---|
| Cost | 39761 |
|---|
\[\begin{array}{l}
t_0 := \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\\
t_1 := \sin \lambda_2 \cdot \sin \lambda_1 + \cos \lambda_2 \cdot \cos \lambda_1\\
\mathbf{if}\;\phi_2 \leq -2.2 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\phi_2 \leq 1.05 \cdot 10^{-29}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_1\right)\\
\mathbf{elif}\;\phi_2 \leq 1.45 \cdot 10^{+144} \lor \neg \left(\phi_2 \leq 5.6 \cdot 10^{+183}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_1\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 17.4 |
|---|
| Cost | 39632 |
|---|
\[\begin{array}{l}
t_0 := \sin \phi_1 \cdot \sin \phi_2\\
t_1 := \sin \lambda_2 \cdot \sin \lambda_1 + \cos \lambda_2 \cdot \cos \lambda_1\\
t_2 := R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_1\right)\\
\mathbf{if}\;\lambda_2 \leq -28000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\lambda_2 \leq 1.05 \cdot 10^{-6}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \cos \lambda_1\right)\right)\\
\mathbf{elif}\;\lambda_2 \leq 4.5 \cdot 10^{+134}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\lambda_2 \leq 2.9 \cdot 10^{+263}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_1\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + \left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \cos \lambda_2\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 20.0 |
|---|
| Cost | 39368 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_2 \leq -0.00175:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_2, \sin \phi_1, \cos \phi_1 \cdot \cos \phi_2\right)\right)\\
\mathbf{elif}\;\phi_2 \leq 100000:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \left(\sin \lambda_2 \cdot \sin \lambda_1 + \cos \lambda_2 \cdot \cos \lambda_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5\right) - R \cdot \sin^{-1} \left(\cos \phi_2 \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 16.7 |
|---|
| Cost | 39368 |
|---|
\[\begin{array}{l}
t_0 := \sin \lambda_2 \cdot \sin \lambda_1 + \cos \lambda_2 \cdot \cos \lambda_1\\
\mathbf{if}\;\phi_2 \leq -0.015:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_2, \sin \phi_1, \cos \phi_1 \cdot \cos \phi_2\right)\right)\\
\mathbf{elif}\;\phi_2 \leq 100000:\\
\;\;\;\;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 9 |
|---|
| Error | 15.9 |
|---|
| Cost | 39368 |
|---|
\[\begin{array}{l}
t_0 := \sin \lambda_2 \cdot \sin \lambda_1 + \cos \lambda_2 \cdot \cos \lambda_1\\
\mathbf{if}\;\phi_2 \leq -1.6 \cdot 10^{-8}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \cos \lambda_1\right)\right)\\
\mathbf{elif}\;\phi_2 \leq 100000:\\
\;\;\;\;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 10 |
|---|
| Error | 25.9 |
|---|
| Cost | 38980 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_2 \leq -1.55:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_1 \cdot \sin \phi_2\right)\right)\\
\mathbf{elif}\;\phi_2 \leq 0.18:\\
\;\;\;\;R \cdot \cos^{-1} \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t_0 + \sin \phi_1 \cdot \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5\right) - R \cdot \sin^{-1} \left(\cos \phi_2 \cdot t_0\right)\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 25.9 |
|---|
| Cost | 38980 |
|---|
\[\begin{array}{l}
t_0 := \cos \phi_1 \cdot \cos \phi_2\\
t_1 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_2 \leq -1.2:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_2, \sin \phi_1, t_0\right)\right)\\
\mathbf{elif}\;\phi_2 \leq 0.18:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 \cdot t_1 + \sin \phi_1 \cdot \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5\right) - R \cdot \sin^{-1} \left(\cos \phi_2 \cdot t_1\right)\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 25.9 |
|---|
| Cost | 33096 |
|---|
\[\begin{array}{l}
t_0 := \cos \phi_1 \cdot \cos \phi_2\\
t_1 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_2 \leq -2.6:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + t_0\right)\\
\mathbf{elif}\;\phi_2 \leq 0.18:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 \cdot t_1 + \sin \phi_1 \cdot \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5\right) - R \cdot \sin^{-1} \left(\cos \phi_2 \cdot t_1\right)\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 26.0 |
|---|
| Cost | 32708 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_2 \leq -0.0082:\\
\;\;\;\;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 0.033:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \phi_2 + \cos \phi_1 \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5\right) - R \cdot \sin^{-1} \left(\cos \phi_2 \cdot t_0\right)\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 27.2 |
|---|
| Cost | 26500 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_2 \leq 100000:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5\right) - R \cdot \sin^{-1} \left(\cos \phi_2 \cdot t_0\right)\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 27.2 |
|---|
| Cost | 26372 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_2 \leq 100000:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5 - \sin^{-1} \left(\cos \phi_2 \cdot t_0\right)\right)\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 37.2 |
|---|
| Cost | 20048 |
|---|
\[\begin{array}{l}
t_0 := R \cdot \cos^{-1} \cos \left(\lambda_2 - \lambda_1\right)\\
\mathbf{if}\;\phi_1 \leq -5.1 \cdot 10^{-10}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \lambda_1\right)\\
\mathbf{elif}\;\phi_1 \leq -3 \cdot 10^{-197}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\phi_1 \leq -1.6 \cdot 10^{-217}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \cos \lambda_2\right)\\
\mathbf{elif}\;\phi_1 \leq -3.8 \cdot 10^{-294}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \cos \lambda_1\right)\\
\end{array}
\]
| Alternative 17 |
|---|
| Error | 37.3 |
|---|
| Cost | 19784 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_1 \leq -5.1 \cdot 10^{-10}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \lambda_1\right)\\
\mathbf{elif}\;\phi_1 \leq -1.9 \cdot 10^{-292}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \left(\lambda_2 - \lambda_1\right) \cdot \left(1 + -0.5 \cdot \left(\phi_1 \cdot \phi_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \cos \lambda_1\right)\\
\end{array}
\]
| Alternative 18 |
|---|
| Error | 30.1 |
|---|
| Cost | 19780 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_2 \leq 40000000:\\
\;\;\;\;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 19 |
|---|
| Error | 27.1 |
|---|
| Cost | 19780 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_2 \leq 100000:\\
\;\;\;\;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 20 |
|---|
| Error | 39.8 |
|---|
| Cost | 19652 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_1 \leq -5.1 \cdot 10^{-10}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \lambda_1\right)\\
\mathbf{elif}\;\phi_1 \leq 5.7 \cdot 10^{-303}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \left(\lambda_2 - \lambda_1\right) \cdot \left(1 + -0.5 \cdot \left(\phi_1 \cdot \phi_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \phi_2\\
\end{array}
\]
| Alternative 21 |
|---|
| Error | 36.5 |
|---|
| Cost | 19652 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_1 \leq -8.6 \cdot 10^{-6}:\\
\;\;\;\;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 22 |
|---|
| Error | 42.8 |
|---|
| Cost | 13896 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_1 \leq -0.43:\\
\;\;\;\;R \cdot \cos^{-1} \cos \left(\phi_2 - \phi_1\right)\\
\mathbf{elif}\;\phi_1 \leq 4.1 \cdot 10^{-303}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \left(\lambda_2 - \lambda_1\right) \cdot \left(1 + -0.5 \cdot \left(\phi_1 \cdot \phi_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \phi_2\\
\end{array}
\]
| Alternative 23 |
|---|
| Error | 43.0 |
|---|
| Cost | 13384 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_1 \leq -0.0265:\\
\;\;\;\;R \cdot \cos^{-1} \cos \phi_1\\
\mathbf{elif}\;\phi_1 \leq 7.8 \cdot 10^{-303}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \left(\lambda_2 - \lambda_1\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \phi_2\\
\end{array}
\]
| Alternative 24 |
|---|
| Error | 42.9 |
|---|
| Cost | 13384 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_1 \leq -0.008:\\
\;\;\;\;R \cdot \cos^{-1} \cos \left(\phi_2 - \phi_1\right)\\
\mathbf{elif}\;\phi_1 \leq 5.7 \cdot 10^{-303}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \left(\lambda_2 - \lambda_1\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \phi_2\\
\end{array}
\]
| Alternative 25 |
|---|
| Error | 46.1 |
|---|
| Cost | 13256 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_1 \leq -0.00092:\\
\;\;\;\;R \cdot \cos^{-1} \cos \lambda_1\\
\mathbf{elif}\;\lambda_1 \leq 5.2 \cdot 10^{-231}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \phi_1\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \lambda_2\\
\end{array}
\]
| Alternative 26 |
|---|
| Error | 46.1 |
|---|
| Cost | 13256 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_1 \leq -1.52 \cdot 10^{-6}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \phi_1\\
\mathbf{elif}\;\phi_1 \leq 4.8 \cdot 10^{-299}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \lambda_1\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \phi_2\\
\end{array}
\]
| Alternative 27 |
|---|
| Error | 51.4 |
|---|
| Cost | 13124 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_1 \leq -0.055:\\
\;\;\;\;R \cdot \cos^{-1} \cos \lambda_1\\
\mathbf{else}:\\
\;\;\;\;\left(\lambda_2 - \lambda_1\right) \cdot R\\
\end{array}
\]
| Alternative 28 |
|---|
| Error | 47.1 |
|---|
| Cost | 13124 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_1 \leq -9 \cdot 10^{-6}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \lambda_1\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \cos \lambda_2\\
\end{array}
\]
| Alternative 29 |
|---|
| Error | 59.2 |
|---|
| Cost | 388 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_1 \leq -4.4 \cdot 10^{-64}:\\
\;\;\;\;\lambda_1 \cdot \left(-R\right)\\
\mathbf{else}:\\
\;\;\;\;\lambda_2 \cdot R\\
\end{array}
\]
| Alternative 30 |
|---|
| Error | 58.9 |
|---|
| Cost | 320 |
|---|
\[\left(\lambda_2 - \lambda_1\right) \cdot R
\]
| Alternative 31 |
|---|
| Error | 59.8 |
|---|
| Cost | 192 |
|---|
\[\lambda_2 \cdot R
\]