\[\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
\]
↓
\[\log \left(e^{\cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \mathsf{fma}\left(\sin \lambda_2, \sin \lambda_1, \cos \lambda_1 \cdot \cos \lambda_2\right)\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
(*
(log
(exp
(acos
(fma
(sin phi1)
(sin phi2)
(*
(cos phi2)
(*
(cos phi1)
(fma (sin lambda2) (sin lambda1) (* (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 log(exp(acos(fma(sin(phi1), sin(phi2), (cos(phi2) * (cos(phi1) * fma(sin(lambda2), sin(lambda1), (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(log(exp(acos(fma(sin(phi1), sin(phi2), Float64(cos(phi2) * Float64(cos(phi1) * fma(sin(lambda2), sin(lambda1), 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[Log[N[Exp[N[ArcCos[N[(N[Sin[phi1], $MachinePrecision] * N[Sin[phi2], $MachinePrecision] + N[(N[Cos[phi2], $MachinePrecision] * N[(N[Cos[phi1], $MachinePrecision] * N[(N[Sin[lambda2], $MachinePrecision] * N[Sin[lambda1], $MachinePrecision] + N[(N[Cos[lambda1], $MachinePrecision] * N[Cos[lambda2], $MachinePrecision]), $MachinePrecision]), $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
↓
\log \left(e^{\cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \mathsf{fma}\left(\sin \lambda_2, \sin \lambda_1, \cos \lambda_1 \cdot \cos \lambda_2\right)\right)\right)\right)}\right) \cdot R
Alternatives
| Alternative 1 |
|---|
| Error | 3.8 |
|---|
| Cost | 71232 |
|---|
\[R \cdot \cos^{-1} \left(\mathsf{fma}\left(\cos \phi_2 \cdot \cos \phi_1, \mathsf{fma}\left(\sin \lambda_2, \sin \lambda_1, \cos \lambda_1 \cdot \cos \lambda_2\right), \sin \phi_1 \cdot \sin \phi_2\right)\right)
\]
| Alternative 2 |
|---|
| Error | 3.8 |
|---|
| 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(\cos \lambda_1 \cdot \cos \lambda_2 + \sin \lambda_2 \cdot \sin \lambda_1\right)\right)\right)\right)
\]
| Alternative 3 |
|---|
| Error | 3.8 |
|---|
| Cost | 64960 |
|---|
\[R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \mathsf{fma}\left(\sin \lambda_2, \sin \lambda_1, \cos \lambda_1 \cdot \cos \lambda_2\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)\right)
\]
| Alternative 4 |
|---|
| Error | 10.7 |
|---|
| Cost | 58696 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_1 := \cos \phi_2 \cdot \cos \phi_1\\
\mathbf{if}\;\phi_1 \leq -1161800693789283:\\
\;\;\;\;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)\\
\mathbf{elif}\;\phi_1 \leq 0.00037065977832448897:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 \cdot \left(\cos \lambda_1 \cdot \cos \lambda_2 + \sin \lambda_2 \cdot \sin \lambda_1\right) + \phi_1 \cdot \sin \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot {\left({\cos^{-1} \left(\mathsf{fma}\left(t_1, t_0, \sin \phi_1 \cdot \sin \phi_2\right)\right)}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 3.8 |
|---|
| Cost | 58688 |
|---|
\[R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \left(\cos \lambda_1 \cdot \cos \lambda_2 + \sin \lambda_2 \cdot \sin \lambda_1\right)\right)
\]
| Alternative 6 |
|---|
| Error | 11.7 |
|---|
| Cost | 52688 |
|---|
\[\begin{array}{l}
t_0 := \cos \lambda_1 \cdot \cos \lambda_2 + \sin \lambda_2 \cdot \sin \lambda_1\\
t_1 := \cos \phi_2 \cdot \cos \phi_1\\
t_2 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_3 := \sin \phi_1 \cdot \sin \phi_2\\
\mathbf{if}\;\phi_1 \leq -1.2082743525283767 \cdot 10^{+116}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_1 \cdot \left(\cos \phi_2 \cdot t_2\right)\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -13364422.449539104:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_3 + \cos \phi_1 \cdot t_0\right)\\
\mathbf{elif}\;\phi_1 \leq -1.2891045211223944 \cdot 10^{-6}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5 - \sin^{-1} \left(\mathsf{fma}\left(t_1, t_2, t_3\right)\right)\right)\\
\mathbf{elif}\;\phi_1 \leq 0.00037065977832448897:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_3 + \cos \phi_2 \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(3 \cdot \left(0.3333333333333333 \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, t_1 \cdot t_2\right)\right)\right)\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 10.7 |
|---|
| Cost | 52552 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_1 := \cos \phi_2 \cdot \cos \phi_1\\
\mathbf{if}\;\phi_1 \leq -1161800693789283:\\
\;\;\;\;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)\\
\mathbf{elif}\;\phi_1 \leq 0.00037065977832448897:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 \cdot \left(\cos \lambda_1 \cdot \cos \lambda_2 + \sin \lambda_2 \cdot \sin \lambda_1\right) + \phi_1 \cdot \sin \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(3 \cdot \left(0.3333333333333333 \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, t_1 \cdot t_0\right)\right)\right)\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 11.7 |
|---|
| Cost | 52492 |
|---|
\[\begin{array}{l}
t_0 := \cos \lambda_1 \cdot \cos \lambda_2\\
t_1 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_2 := \cos \phi_2 \cdot \cos \phi_1\\
\mathbf{if}\;\phi_1 \leq -1.2082743525283767 \cdot 10^{+116}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_1 \cdot \left(\cos \phi_2 \cdot t_1\right)\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -13364422.449539104:\\
\;\;\;\;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.2891045211223944 \cdot 10^{-6}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5 - \sin^{-1} \left(\mathsf{fma}\left(t_2, t_1, \sin \phi_1 \cdot \sin \phi_2\right)\right)\right)\\
\mathbf{elif}\;\phi_1 \leq 0.00037065977832448897:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \cos \phi_2 \cdot \left(t_0 + \sin \lambda_2 \cdot \sin \lambda_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(3 \cdot \left(0.3333333333333333 \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, t_2 \cdot t_1\right)\right)\right)\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 11.7 |
|---|
| Cost | 52492 |
|---|
\[\begin{array}{l}
t_0 := \cos \lambda_1 \cdot \cos \lambda_2 + \sin \lambda_2 \cdot \sin \lambda_1\\
t_1 := \cos \phi_2 \cdot \cos \phi_1\\
t_2 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_3 := \sin \phi_1 \cdot \sin \phi_2\\
\mathbf{if}\;\phi_1 \leq -1.2082743525283767 \cdot 10^{+116}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_1 \cdot \left(\cos \phi_2 \cdot t_2\right)\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -13364422.449539104:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_3 + \cos \phi_1 \cdot t_0\right)\\
\mathbf{elif}\;\phi_1 \leq -1.2891045211223944 \cdot 10^{-6}:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5 - \sin^{-1} \left(\mathsf{fma}\left(t_1, t_2, t_3\right)\right)\right)\\
\mathbf{elif}\;\phi_1 \leq 0.00037065977832448897:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \cos \phi_2 \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(3 \cdot \left(0.3333333333333333 \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, t_1 \cdot t_2\right)\right)\right)\right)\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 11.8 |
|---|
| Cost | 46288 |
|---|
\[\begin{array}{l}
t_0 := \cos \lambda_1 \cdot \cos \lambda_2\\
t_1 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_2 := \sin \phi_1 \cdot \sin \phi_2\\
\mathbf{if}\;\phi_1 \leq -1.2082743525283767 \cdot 10^{+116}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_1 \cdot \left(\cos \phi_2 \cdot t_1\right)\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -13364422.449539104:\\
\;\;\;\;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.2891045211223944 \cdot 10^{-6}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_2 + \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \cos \lambda_1\right)\right)\\
\mathbf{elif}\;\phi_1 \leq 0.00037065977832448897:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \cos \phi_2 \cdot \left(t_0 + \sin \lambda_2 \cdot \sin \lambda_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_2 + \left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot t_1\right)\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 11.8 |
|---|
| Cost | 46288 |
|---|
\[\begin{array}{l}
t_0 := \cos \lambda_1 \cdot \cos \lambda_2\\
t_1 := \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -1.2082743525283767 \cdot 10^{+116}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_1 \cdot \left(\cos \phi_2 \cdot t_1\right)\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -13364422.449539104:\\
\;\;\;\;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.2891045211223944 \cdot 10^{-6}:\\
\;\;\;\;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_1 \leq 0.00037065977832448897:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \cos \phi_2 \cdot \left(t_0 + \sin \lambda_2 \cdot \sin \lambda_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(3 \cdot \left(0.3333333333333333 \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot t_1\right)\right)\right)\right)\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 12.0 |
|---|
| Cost | 45640 |
|---|
\[\begin{array}{l}
t_0 := \cos \lambda_1 \cdot \cos \lambda_2\\
t_1 := \sin \phi_1 \cdot \sin \phi_2\\
t_2 := R \cdot \cos^{-1} \left(t_1 + \left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\\
\mathbf{if}\;\phi_1 \leq -1.2082743525283767 \cdot 10^{+116}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq -13364422.449539104:\\
\;\;\;\;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.6490259201387514 \cdot 10^{-12}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \cos \lambda_1\right)\right)\\
\mathbf{elif}\;\phi_1 \leq 2.352903685598969 \cdot 10^{-19}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \left(t_0 + \sin \lambda_2 \cdot \sin \lambda_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 12.0 |
|---|
| Cost | 45640 |
|---|
\[\begin{array}{l}
t_0 := \cos \lambda_1 \cdot \cos \lambda_2\\
t_1 := \cos \left(\lambda_1 - \lambda_2\right)\\
t_2 := \sin \phi_1 \cdot \sin \phi_2\\
\mathbf{if}\;\phi_1 \leq -1.2082743525283767 \cdot 10^{+116}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_1 \cdot \left(\cos \phi_2 \cdot t_1\right)\right)\right)\\
\mathbf{elif}\;\phi_1 \leq -13364422.449539104:\\
\;\;\;\;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.6490259201387514 \cdot 10^{-12}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_2 + \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \cos \lambda_1\right)\right)\\
\mathbf{elif}\;\phi_1 \leq 2.352903685598969 \cdot 10^{-19}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot \left(t_0 + \sin \lambda_2 \cdot \sin \lambda_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_2 + \left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot t_1\right)\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 12.0 |
|---|
| Cost | 39760 |
|---|
\[\begin{array}{l}
t_0 := \sin \phi_1 \cdot \sin \phi_2\\
t_1 := R \cdot \cos^{-1} \left(t_0 + \left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\\
t_2 := \cos \lambda_1 \cdot \cos \lambda_2 + \sin \lambda_2 \cdot \sin \lambda_1\\
\mathbf{if}\;\phi_1 \leq -1.2082743525283767 \cdot 10^{+116}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\phi_1 \leq -13364422.449539104:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_2\right)\\
\mathbf{elif}\;\phi_1 \leq -1.6490259201387514 \cdot 10^{-12}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \cos \lambda_1\right)\right)\\
\mathbf{elif}\;\phi_1 \leq 2.352903685598969 \cdot 10^{-19}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 17.2 |
|---|
| Cost | 39632 |
|---|
\[\begin{array}{l}
t_0 := \sin \phi_1 \cdot \sin \phi_2\\
t_1 := \cos \lambda_1 \cdot \cos \lambda_2 + \sin \lambda_2 \cdot \sin \lambda_1\\
t_2 := R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_1\right)\\
\mathbf{if}\;\phi_2 \leq -2.5795563652859377 \cdot 10^{-9}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + \cos \phi_2 \cdot \left(\cos \phi_1 \cdot \cos \lambda_1\right)\right)\\
\mathbf{elif}\;\phi_2 \leq 5.5158265213743536 \cdot 10^{-17}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_1\right)\\
\mathbf{elif}\;\phi_2 \leq 4.059721371960454 \cdot 10^{+254}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_2 \leq 3.133557406109485 \cdot 10^{+302}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + \cos \lambda_2 \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 16.9 |
|---|
| Cost | 39500 |
|---|
\[\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 := \cos \lambda_1 \cdot \cos \lambda_2 + \sin \lambda_2 \cdot \sin \lambda_1\\
\mathbf{if}\;\phi_1 \leq -1.1322134743168485 \cdot 10^{+202}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\phi_1 \leq -0.0003088993329805857:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_1\right)\\
\mathbf{elif}\;\phi_1 \leq 7.388132624794298 \cdot 10^{-17}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_2 \cdot t_1\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 17 |
|---|
| Error | 25.4 |
|---|
| Cost | 39236 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_2 \leq 1.8462986057918003 \cdot 10^{-9}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \left(\cos \lambda_1 \cdot \cos \lambda_2 + \sin \lambda_2 \cdot \sin \lambda_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_2 \cdot \cos \left(\lambda_2 - \lambda_1\right)\right)\right)\\
\end{array}
\]
| Alternative 18 |
|---|
| Error | 23.9 |
|---|
| Cost | 39236 |
|---|
\[\begin{array}{l}
t_0 := \cos \lambda_1 \cdot \cos \lambda_2 + \sin \lambda_2 \cdot \sin \lambda_1\\
\mathbf{if}\;\phi_2 \leq 5.5158265213743536 \cdot 10^{-17}:\\
\;\;\;\;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 19 |
|---|
| Error | 31.5 |
|---|
| Cost | 39108 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_1 \leq -1161800693789283:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), \cos \phi_1, \sin \phi_1 \cdot \sin \phi_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\\
\end{array}
\]
| Alternative 20 |
|---|
| Error | 31.7 |
|---|
| Cost | 39108 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_2 - \lambda_1\right)\\
\mathbf{if}\;\phi_1 \leq -0.0003088993329805857:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(t_0, \cos \phi_1, \sin \phi_1 \cdot \sin \phi_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\mathsf{fma}\left(\sin \phi_1, \sin \phi_2, \cos \phi_2 \cdot t_0\right)\right)\\
\end{array}
\]
| Alternative 21 |
|---|
| Error | 36.2 |
|---|
| Cost | 33164 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_2 - \lambda_1\right)\\
t_1 := \sin \phi_1 \cdot \sin \phi_2\\
\mathbf{if}\;\phi_1 \leq -1.158507859769614 \cdot 10^{+195}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + \cos \phi_1 \cdot \cos \lambda_1\right)\\
\mathbf{elif}\;\phi_1 \leq -1.9166791020619406 \cdot 10^{+94}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + \cos \phi_1 \cdot \cos \lambda_2\right)\\
\mathbf{elif}\;\phi_1 \leq -0.013378565766802002:\\
\;\;\;\;R \cdot \left(\pi \cdot 0.5 - \sin^{-1} \left(\mathsf{fma}\left(\phi_1, \phi_2, \cos \phi_1 \cdot t_0\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \left(\cos \phi_2 \cdot t_0\right) \cdot \left(-0.5 \cdot \left(\phi_1 \cdot \phi_1\right) + 1\right)\right)\\
\end{array}
\]
| Alternative 22 |
|---|
| Error | 35.9 |
|---|
| Cost | 32964 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_1 \leq -0.013378565766802002:\\
\;\;\;\;R \cdot \cos^{-1} \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \cos \left(\lambda_1 - \lambda_2\right) + \sin \phi_1 \cdot \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \left(\cos \phi_2 \cdot \cos \left(\lambda_2 - \lambda_1\right)\right) \cdot \left(-0.5 \cdot \left(\phi_1 \cdot \phi_1\right) + 1\right)\right)\\
\end{array}
\]
| Alternative 23 |
|---|
| Error | 32.9 |
|---|
| Cost | 32964 |
|---|
\[\begin{array}{l}
t_0 := \left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\\
\mathbf{if}\;\phi_1 \leq -1161800693789283:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + \sin \phi_1 \cdot \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + t_0\right)\\
\end{array}
\]
| Alternative 24 |
|---|
| Error | 36.2 |
|---|
| Cost | 32840 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_2 - \lambda_1\right)\\
t_1 := \sin \phi_1 \cdot \sin \phi_2\\
\mathbf{if}\;\phi_1 \leq -1.158507859769614 \cdot 10^{+195}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + \cos \phi_1 \cdot \cos \lambda_1\right)\\
\mathbf{elif}\;\phi_1 \leq -1.9166791020619406 \cdot 10^{+94}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_1 + \cos \phi_1 \cdot \cos \lambda_2\right)\\
\mathbf{elif}\;\phi_1 \leq -0.013378565766802002:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_0 + \phi_1 \cdot \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \left(\cos \phi_2 \cdot t_0\right) \cdot \left(-0.5 \cdot \left(\phi_1 \cdot \phi_1\right) + 1\right)\right)\\
\end{array}
\]
| Alternative 25 |
|---|
| Error | 35.9 |
|---|
| Cost | 32708 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\phi_1 \leq -0.013378565766802002:\\
\;\;\;\;R \cdot \cos^{-1} \left(\sin \phi_1 \cdot \sin \phi_2 + \cos \phi_1 \cdot \cos \lambda_1\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \left(\cos \phi_2 \cdot \cos \left(\lambda_2 - \lambda_1\right)\right) \cdot \left(-0.5 \cdot \left(\phi_1 \cdot \phi_1\right) + 1\right)\right)\\
\end{array}
\]
| Alternative 26 |
|---|
| Error | 42.0 |
|---|
| Cost | 26948 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_2 - \lambda_1\right)\\
\mathbf{if}\;\phi_2 \leq 1.68903798352085 \cdot 10^{-52}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_0 + \phi_1 \cdot \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \left(\cos \phi_2 \cdot t_0\right) \cdot \left(-0.5 \cdot \left(\phi_1 \cdot \phi_1\right) + 1\right)\right)\\
\end{array}
\]
| Alternative 27 |
|---|
| Error | 42.0 |
|---|
| Cost | 26436 |
|---|
\[\begin{array}{l}
t_0 := \cos \left(\lambda_2 - \lambda_1\right)\\
\mathbf{if}\;\phi_2 \leq 1.68903798352085 \cdot 10^{-52}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot t_0 + \phi_1 \cdot \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \cos \phi_2 \cdot t_0\right)\\
\end{array}
\]
| Alternative 28 |
|---|
| Error | 49.2 |
|---|
| Cost | 26308 |
|---|
\[\begin{array}{l}
t_0 := \phi_1 \cdot \sin \phi_2\\
\mathbf{if}\;\lambda_2 \leq 2.9705120672662974 \cdot 10^{-5}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + \cos \phi_1 \cdot \cos \lambda_1\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(t_0 + \cos \phi_1 \cdot \cos \lambda_2\right)\\
\end{array}
\]
| Alternative 29 |
|---|
| Error | 46.2 |
|---|
| Cost | 26304 |
|---|
\[R \cdot \cos^{-1} \left(\phi_1 \cdot \sin \phi_2 + \cos \phi_1 \cdot \cos \left(\lambda_2 - \lambda_1\right)\right)
\]
| Alternative 30 |
|---|
| Error | 51.1 |
|---|
| Cost | 19908 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_1 \leq -2729.8956173312417:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \left(\lambda_2 - \lambda_1\right) + \phi_1 \cdot \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \lambda_2 + \phi_1 \cdot \phi_2\right)\\
\end{array}
\]
| Alternative 31 |
|---|
| Error | 50.5 |
|---|
| Cost | 19908 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_2 \leq 8.292261328241503 \cdot 10^{-19}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \lambda_1 + \phi_1 \cdot \phi_2\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \lambda_2 + \phi_1 \cdot \phi_2\right)\\
\end{array}
\]
| Alternative 32 |
|---|
| Error | 47.5 |
|---|
| Cost | 19904 |
|---|
\[R \cdot \cos^{-1} \left(\cos \phi_1 \cdot \cos \left(\lambda_2 - \lambda_1\right) + \phi_1 \cdot \phi_2\right)
\]
| Alternative 33 |
|---|
| Error | 52.2 |
|---|
| Cost | 13376 |
|---|
\[R \cdot \cos^{-1} \left(\cos \left(\lambda_2 - \lambda_1\right) + \phi_1 \cdot \phi_2\right)
\]