\[\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
\]
↓
\[\cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \lambda_1 \cdot \sin \lambda_2\right)\right) + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\right)\right) \cdot R
\]
(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
(*
(acos
(fma
(sin phi1)
(sin phi2)
(*
(cos phi2)
(*
(cos phi1)
(+
(log1p (expm1 (* (sin lambda1) (sin lambda2))))
(* (cos lambda1) (cos lambda2)))))))
R))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) {
return acos(fma(sin(phi1), sin(phi2), (cos(phi2) * (cos(phi1) * (log1p(expm1((sin(lambda1) * sin(lambda2)))) + (cos(lambda1) * cos(lambda2))))))) * R;
}
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)
return Float64(acos(fma(sin(phi1), sin(phi2), Float64(cos(phi2) * Float64(cos(phi1) * Float64(log1p(expm1(Float64(sin(lambda1) * sin(lambda2)))) + Float64(cos(lambda1) * cos(lambda2))))))) * R)
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_] := N[(N[ArcCos[N[(N[Sin[phi1], $MachinePrecision] * N[Sin[phi2], $MachinePrecision] + N[(N[Cos[phi2], $MachinePrecision] * N[(N[Cos[phi1], $MachinePrecision] * N[(N[Log[1 + N[(Exp[N[(N[Sin[lambda1], $MachinePrecision] * N[Sin[lambda2], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision] + N[(N[Cos[lambda1], $MachinePrecision] * N[Cos[lambda2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * R), $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
↓
\cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \lambda_1 \cdot \sin \lambda_2\right)\right) + \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\right)\right) \cdot R
Alternatives
| Alternative 1 |
|---|
| Error | 3.7 |
|---|
| Cost | 64960 |
|---|
\[R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \mathsf{fma}\left(\sin \lambda_2, \sin \lambda_1, \cos \lambda_1 \cdot \cos \lambda_2\right)\right)
\]
| Alternative 2 |
|---|
| Error | 3.7 |
|---|
| Cost | 64960 |
|---|
\[R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \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)\right)
\]
| Alternative 3 |
|---|
| Error | 12.4 |
|---|
| Cost | 59352 |
|---|
\[\begin{array}{l}
t_0 := \mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)\\
t_1 := \cos \lambda_1 \cdot \cos \lambda_2\\
t_2 := \mathsf{fma}\left(\sin \lambda_2, \sin \lambda_1, t_1\right)\\
t_3 := \cos^{-1} t_0\\
t_4 := R \cdot \log \left(e^{t_3}\right)\\
\mathbf{if}\;\phi_1 \leq -8.5 \cdot 10^{+244}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5 - \sin^{-1} t_0\right)\\
\mathbf{elif}\;\phi_1 \leq -1.02 \cdot 10^{+93}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \left(\sin \lambda_1 \cdot \sin \lambda_2 + t_1\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -2 \cdot 10^{+64}:\\
\;\;\;\;R \cdot t_3\\
\mathbf{elif}\;\phi_1 \leq -9.6 \cdot 10^{+32}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_2\right)\\
\mathbf{elif}\;\phi_1 \leq -6.4 \cdot 10^{-9}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;\phi_1 \leq 6.8 \cdot 10^{-28}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot t_2 + \phi_1 \cdot \sin \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 12.4 |
|---|
| Cost | 59096 |
|---|
\[\begin{array}{l}
t_0 := \mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)\\
t_1 := \cos \lambda_1 \cdot \cos \lambda_2\\
t_2 := \sin \lambda_1 \cdot \sin \lambda_2 + t_1\\
t_3 := \cos^{-1} t_0\\
t_4 := R \cdot \log \left(e^{t_3}\right)\\
\mathbf{if}\;\phi_1 \leq -9 \cdot 10^{+244}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5 - \sin^{-1} t_0\right)\\
\mathbf{elif}\;\phi_1 \leq -3.7 \cdot 10^{+90}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_2\right)\\
\mathbf{elif}\;\phi_1 \leq -1.75 \cdot 10^{+64}:\\
\;\;\;\;R \cdot t_3\\
\mathbf{elif}\;\phi_1 \leq -2.9 \cdot 10^{+29}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \mathsf{fma}\left(\sin \lambda_2, \sin \lambda_1, t_1\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -1.1 \cdot 10^{-10}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;\phi_1 \leq 6.8 \cdot 10^{-28}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 3.8 |
|---|
| Cost | 58688 |
|---|
\[R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \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)
\]
| Alternative 6 |
|---|
| Error | 12.4 |
|---|
| Cost | 52228 |
|---|
\[\begin{array}{l}
t_0 := \mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)\\
t_1 := \cos \lambda_1 \cdot \cos \lambda_2\\
t_2 := \sin \lambda_1 \cdot \sin \lambda_2 + t_1\\
t_3 := R \cdot \cos^{-1} t_0\\
\mathbf{if}\;\phi_1 \leq -9.8 \cdot 10^{+244}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5 - \sin^{-1} t_0\right)\\
\mathbf{elif}\;\phi_1 \leq -4.6 \cdot 10^{+91}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_2\right)\\
\mathbf{elif}\;\phi_1 \leq -1.75 \cdot 10^{+64}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;\phi_1 \leq -9 \cdot 10^{+30}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \mathsf{fma}\left(\sin \lambda_2, \sin \lambda_1, t_1\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -2.4 \cdot 10^{-11}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;\phi_1 \leq 6.8 \cdot 10^{-28}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 12.4 |
|---|
| Cost | 46296 |
|---|
\[\begin{array}{l}
t_0 := \cos \lambda_1 \cdot \cos \lambda_2\\
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 \cos \left(\lambda_1 - \lambda_2\right)\right)\right)\right)\\
t_2 := \sin \lambda_1 \cdot \sin \lambda_2 + t_0\\
\mathbf{if}\;\phi_1 \leq -1.56 \cdot 10^{+246}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\phi_1 \leq -6.1 \cdot 10^{+91}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_2\right)\\
\mathbf{elif}\;\phi_1 \leq -1.8 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\phi_1 \leq -2.1 \cdot 10^{+30}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \mathsf{fma}\left(\sin \lambda_2, \sin \lambda_1, t_0\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -5.4 \cdot 10^{-11}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\phi_1 \leq 6.8 \cdot 10^{-28}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 12.4 |
|---|
| Cost | 46296 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_1 := \cos \lambda_1 \cdot \cos \lambda_2\\
t_2 := 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_3 := \sin \lambda_1 \cdot \sin \lambda_2 + t_1\\
\mathbf{if}\;\phi_1 \leq -8.3 \cdot 10^{+244}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\cos \phi_2 \cdot t_0, \cos \phi_1, \sin \phi_1 \cdot \sin \phi_2\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -1.12 \cdot 10^{+93}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_3\right)\\
\mathbf{elif}\;\phi_1 \leq -3.2 \cdot 10^{+64}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq -9.6 \cdot 10^{+32}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \mathsf{fma}\left(\sin \lambda_2, \sin \lambda_1, t_1\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -2.2 \cdot 10^{-10}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq 6.8 \cdot 10^{-28}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_3\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 12.4 |
|---|
| Cost | 45904 |
|---|
\[\begin{array}{l}
t_0 := \cos \lambda_1 \cdot \cos \lambda_2\\
t_1 := R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\\
t_2 := \sin \lambda_1 \cdot \sin \lambda_2 + t_0\\
\mathbf{if}\;\phi_1 \leq -8.3 \cdot 10^{+244}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\phi_1 \leq -1.12 \cdot 10^{+93}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_2\right)\\
\mathbf{elif}\;\phi_1 \leq -6 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\phi_1 \leq -9.6 \cdot 10^{+32}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \mathsf{fma}\left(\sin \lambda_2, \sin \lambda_1, t_0\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -1.5 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\phi_1 \leq 6.8 \cdot 10^{-28}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 12.7 |
|---|
| Cost | 45904 |
|---|
\[\begin{array}{l}
t_0 := \cos \lambda_1 \cdot \cos \lambda_2\\
t_1 := R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\\
t_2 := \sin \lambda_1 \cdot \sin \lambda_2 + t_0\\
\mathbf{if}\;\phi_1 \leq -8.3 \cdot 10^{+244}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\phi_1 \leq -4.1 \cdot 10^{+92}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_2\right)\\
\mathbf{elif}\;\phi_1 \leq -2.6 \cdot 10^{+65}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \cos \lambda_1\right)\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -4.8 \cdot 10^{+30}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \mathsf{fma}\left(\sin \lambda_2, \sin \lambda_1, t_0\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -2.4 \cdot 10^{-11}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\phi_1 \leq 6.8 \cdot 10^{-28}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 12.5 |
|---|
| Cost | 40024 |
|---|
\[\begin{array}{l}
t_0 := R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\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.56 \cdot 10^{+246}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\phi_1 \leq -1.05 \cdot 10^{+93}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq -4.6 \cdot 10^{+66}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\phi_1 \leq -9.5 \cdot 10^{+31}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq -1.95 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\phi_1 \leq 6.8 \cdot 10^{-28}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_1\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 16.6 |
|---|
| Cost | 39764 |
|---|
\[\begin{array}{l}
t_0 := 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)\\
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 -3.25 \cdot 10^{+246}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\phi_1 \leq -3 \cdot 10^{+92}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq -1.05 \cdot 10^{+67}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\phi_1 \leq -1.1 \cdot 10^{-6}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq 0.00023:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_1\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 26.0 |
|---|
| Cost | 39236 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_2 \leq 3200000000:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \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(\cos \phi_2 \cdot \cos \left(\lambda_2 - \lambda_1\right)\right)\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 24.4 |
|---|
| Cost | 39236 |
|---|
\[\begin{array}{l}
t_0 := \sin \lambda_1 \cdot \sin \lambda_2 + \cos \lambda_1 \cdot \cos \lambda_2\\
\mathbf{if}\;\phi_2 \leq 8 \cdot 10^{-19}:\\
\;\;\;\;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 15 |
|---|
| Error | 31.8 |
|---|
| Cost | 32580 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_2 - \lambda_1\right)\\
\mathbf{if}\;\phi_2 \leq 8 \cdot 10^{-19}:\\
\;\;\;\;R \cdot \log \left(e^{\cos^{-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 16 |
|---|
| Error | 31.8 |
|---|
| Cost | 19780 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_2 - \lambda_1\right)\\
\mathbf{if}\;\phi_2 \leq 8 \cdot 10^{-19}:\\
\;\;\;\;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 |
|---|
| Error | 42.1 |
|---|
| Cost | 19652 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_2 \leq 2.7 \cdot 10^{-5}:\\
\;\;\;\;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 18 |
|---|
| Error | 40.6 |
|---|
| Cost | 19652 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_2 \leq 8 \cdot 10^{-14}:\\
\;\;\;\;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 19 |
|---|
| Error | 36.7 |
|---|
| Cost | 19648 |
|---|
\[R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \left(\lambda_2 - \lambda_1\right)\right)
\]
| Alternative 20 |
|---|
| Error | 47.4 |
|---|
| Cost | 13120 |
|---|
\[R \cdot \cos^{-1} \cos \left(\lambda_2 - \lambda_1\right)
\]