\[R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)}}{\sqrt{1 - \left({\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right)}}\right)
\]
↓
\[\begin{array}{l}
t_0 := {\sin \left(-0.5 \cdot \phi_2\right)}^{2}\\
t_1 := \sin \left(0.5 \cdot \phi_1\right)\\
t_2 := {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}\\
t_3 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_4 := \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \left(t_3 \cdot t_3\right)\right)\\
t_5 := \sqrt{1 - \left(t_0 + \cos \phi_2 \cdot t_2\right)}\\
\mathbf{if}\;\phi_2 \leq -0.00015:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + t_4}}{t_5} \cdot \left(R \cdot 2\right)\\
\mathbf{elif}\;\phi_2 \leq 740:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{{\left(t_1 + \cos \left(0.5 \cdot \phi_1\right) \cdot \left(-0.5 \cdot \phi_2\right)\right)}^{2} + t_4}}{\sqrt{1 - \left({t_1}^{2} + \cos \phi_1 \cdot t_2\right)}} \cdot \left(R \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{t_0 + t_4}}{t_5} \cdot \left(R \cdot 2\right)\\
\end{array}
\]
(FPCore (R lambda1 lambda2 phi1 phi2)
:precision binary64
(*
R
(*
2.0
(atan2
(sqrt
(+
(pow (sin (/ (- phi1 phi2) 2.0)) 2.0)
(*
(* (* (cos phi1) (cos phi2)) (sin (/ (- lambda1 lambda2) 2.0)))
(sin (/ (- lambda1 lambda2) 2.0)))))
(sqrt
(-
1.0
(+
(pow (sin (/ (- phi1 phi2) 2.0)) 2.0)
(*
(* (* (cos phi1) (cos phi2)) (sin (/ (- lambda1 lambda2) 2.0)))
(sin (/ (- lambda1 lambda2) 2.0))))))))))↓
(FPCore (R lambda1 lambda2 phi1 phi2)
:precision binary64
(let* ((t_0 (pow (sin (* -0.5 phi2)) 2.0))
(t_1 (sin (* 0.5 phi1)))
(t_2 (pow (sin (* 0.5 (- lambda1 lambda2))) 2.0))
(t_3 (sin (/ (- lambda1 lambda2) 2.0)))
(t_4 (* (cos phi1) (* (cos phi2) (* t_3 t_3))))
(t_5 (sqrt (- 1.0 (+ t_0 (* (cos phi2) t_2))))))
(if (<= phi2 -0.00015)
(*
(atan2 (sqrt (+ (pow (sin (/ (- phi1 phi2) 2.0)) 2.0) t_4)) t_5)
(* R 2.0))
(if (<= phi2 740.0)
(*
(atan2
(sqrt (+ (pow (+ t_1 (* (cos (* 0.5 phi1)) (* -0.5 phi2))) 2.0) t_4))
(sqrt (- 1.0 (+ (pow t_1 2.0) (* (cos phi1) t_2)))))
(* R 2.0))
(* (atan2 (sqrt (+ t_0 t_4)) t_5) (* R 2.0))))))double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
return R * (2.0 * atan2(sqrt((pow(sin(((phi1 - phi2) / 2.0)), 2.0) + (((cos(phi1) * cos(phi2)) * sin(((lambda1 - lambda2) / 2.0))) * sin(((lambda1 - lambda2) / 2.0))))), sqrt((1.0 - (pow(sin(((phi1 - phi2) / 2.0)), 2.0) + (((cos(phi1) * cos(phi2)) * sin(((lambda1 - lambda2) / 2.0))) * sin(((lambda1 - lambda2) / 2.0))))))));
}
↓
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
double t_0 = pow(sin((-0.5 * phi2)), 2.0);
double t_1 = sin((0.5 * phi1));
double t_2 = pow(sin((0.5 * (lambda1 - lambda2))), 2.0);
double t_3 = sin(((lambda1 - lambda2) / 2.0));
double t_4 = cos(phi1) * (cos(phi2) * (t_3 * t_3));
double t_5 = sqrt((1.0 - (t_0 + (cos(phi2) * t_2))));
double tmp;
if (phi2 <= -0.00015) {
tmp = atan2(sqrt((pow(sin(((phi1 - phi2) / 2.0)), 2.0) + t_4)), t_5) * (R * 2.0);
} else if (phi2 <= 740.0) {
tmp = atan2(sqrt((pow((t_1 + (cos((0.5 * phi1)) * (-0.5 * phi2))), 2.0) + t_4)), sqrt((1.0 - (pow(t_1, 2.0) + (cos(phi1) * t_2))))) * (R * 2.0);
} else {
tmp = atan2(sqrt((t_0 + t_4)), t_5) * (R * 2.0);
}
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 = r * (2.0d0 * atan2(sqrt(((sin(((phi1 - phi2) / 2.0d0)) ** 2.0d0) + (((cos(phi1) * cos(phi2)) * sin(((lambda1 - lambda2) / 2.0d0))) * sin(((lambda1 - lambda2) / 2.0d0))))), sqrt((1.0d0 - ((sin(((phi1 - phi2) / 2.0d0)) ** 2.0d0) + (((cos(phi1) * cos(phi2)) * sin(((lambda1 - lambda2) / 2.0d0))) * sin(((lambda1 - lambda2) / 2.0d0))))))))
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = sin(((-0.5d0) * phi2)) ** 2.0d0
t_1 = sin((0.5d0 * phi1))
t_2 = sin((0.5d0 * (lambda1 - lambda2))) ** 2.0d0
t_3 = sin(((lambda1 - lambda2) / 2.0d0))
t_4 = cos(phi1) * (cos(phi2) * (t_3 * t_3))
t_5 = sqrt((1.0d0 - (t_0 + (cos(phi2) * t_2))))
if (phi2 <= (-0.00015d0)) then
tmp = atan2(sqrt(((sin(((phi1 - phi2) / 2.0d0)) ** 2.0d0) + t_4)), t_5) * (r * 2.0d0)
else if (phi2 <= 740.0d0) then
tmp = atan2(sqrt((((t_1 + (cos((0.5d0 * phi1)) * ((-0.5d0) * phi2))) ** 2.0d0) + t_4)), sqrt((1.0d0 - ((t_1 ** 2.0d0) + (cos(phi1) * t_2))))) * (r * 2.0d0)
else
tmp = atan2(sqrt((t_0 + t_4)), t_5) * (r * 2.0d0)
end if
code = tmp
end function
public static double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
return R * (2.0 * Math.atan2(Math.sqrt((Math.pow(Math.sin(((phi1 - phi2) / 2.0)), 2.0) + (((Math.cos(phi1) * Math.cos(phi2)) * Math.sin(((lambda1 - lambda2) / 2.0))) * Math.sin(((lambda1 - lambda2) / 2.0))))), Math.sqrt((1.0 - (Math.pow(Math.sin(((phi1 - phi2) / 2.0)), 2.0) + (((Math.cos(phi1) * Math.cos(phi2)) * Math.sin(((lambda1 - lambda2) / 2.0))) * Math.sin(((lambda1 - lambda2) / 2.0))))))));
}
↓
public static double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
double t_0 = Math.pow(Math.sin((-0.5 * phi2)), 2.0);
double t_1 = Math.sin((0.5 * phi1));
double t_2 = Math.pow(Math.sin((0.5 * (lambda1 - lambda2))), 2.0);
double t_3 = Math.sin(((lambda1 - lambda2) / 2.0));
double t_4 = Math.cos(phi1) * (Math.cos(phi2) * (t_3 * t_3));
double t_5 = Math.sqrt((1.0 - (t_0 + (Math.cos(phi2) * t_2))));
double tmp;
if (phi2 <= -0.00015) {
tmp = Math.atan2(Math.sqrt((Math.pow(Math.sin(((phi1 - phi2) / 2.0)), 2.0) + t_4)), t_5) * (R * 2.0);
} else if (phi2 <= 740.0) {
tmp = Math.atan2(Math.sqrt((Math.pow((t_1 + (Math.cos((0.5 * phi1)) * (-0.5 * phi2))), 2.0) + t_4)), Math.sqrt((1.0 - (Math.pow(t_1, 2.0) + (Math.cos(phi1) * t_2))))) * (R * 2.0);
} else {
tmp = Math.atan2(Math.sqrt((t_0 + t_4)), t_5) * (R * 2.0);
}
return tmp;
}
def code(R, lambda1, lambda2, phi1, phi2):
return R * (2.0 * math.atan2(math.sqrt((math.pow(math.sin(((phi1 - phi2) / 2.0)), 2.0) + (((math.cos(phi1) * math.cos(phi2)) * math.sin(((lambda1 - lambda2) / 2.0))) * math.sin(((lambda1 - lambda2) / 2.0))))), math.sqrt((1.0 - (math.pow(math.sin(((phi1 - phi2) / 2.0)), 2.0) + (((math.cos(phi1) * math.cos(phi2)) * math.sin(((lambda1 - lambda2) / 2.0))) * math.sin(((lambda1 - lambda2) / 2.0))))))))
↓
def code(R, lambda1, lambda2, phi1, phi2):
t_0 = math.pow(math.sin((-0.5 * phi2)), 2.0)
t_1 = math.sin((0.5 * phi1))
t_2 = math.pow(math.sin((0.5 * (lambda1 - lambda2))), 2.0)
t_3 = math.sin(((lambda1 - lambda2) / 2.0))
t_4 = math.cos(phi1) * (math.cos(phi2) * (t_3 * t_3))
t_5 = math.sqrt((1.0 - (t_0 + (math.cos(phi2) * t_2))))
tmp = 0
if phi2 <= -0.00015:
tmp = math.atan2(math.sqrt((math.pow(math.sin(((phi1 - phi2) / 2.0)), 2.0) + t_4)), t_5) * (R * 2.0)
elif phi2 <= 740.0:
tmp = math.atan2(math.sqrt((math.pow((t_1 + (math.cos((0.5 * phi1)) * (-0.5 * phi2))), 2.0) + t_4)), math.sqrt((1.0 - (math.pow(t_1, 2.0) + (math.cos(phi1) * t_2))))) * (R * 2.0)
else:
tmp = math.atan2(math.sqrt((t_0 + t_4)), t_5) * (R * 2.0)
return tmp
function code(R, lambda1, lambda2, phi1, phi2)
return Float64(R * Float64(2.0 * atan(sqrt(Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + Float64(Float64(Float64(cos(phi1) * cos(phi2)) * sin(Float64(Float64(lambda1 - lambda2) / 2.0))) * sin(Float64(Float64(lambda1 - lambda2) / 2.0))))), sqrt(Float64(1.0 - Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + Float64(Float64(Float64(cos(phi1) * cos(phi2)) * sin(Float64(Float64(lambda1 - lambda2) / 2.0))) * sin(Float64(Float64(lambda1 - lambda2) / 2.0)))))))))
end
↓
function code(R, lambda1, lambda2, phi1, phi2)
t_0 = sin(Float64(-0.5 * phi2)) ^ 2.0
t_1 = sin(Float64(0.5 * phi1))
t_2 = sin(Float64(0.5 * Float64(lambda1 - lambda2))) ^ 2.0
t_3 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
t_4 = Float64(cos(phi1) * Float64(cos(phi2) * Float64(t_3 * t_3)))
t_5 = sqrt(Float64(1.0 - Float64(t_0 + Float64(cos(phi2) * t_2))))
tmp = 0.0
if (phi2 <= -0.00015)
tmp = Float64(atan(sqrt(Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + t_4)), t_5) * Float64(R * 2.0));
elseif (phi2 <= 740.0)
tmp = Float64(atan(sqrt(Float64((Float64(t_1 + Float64(cos(Float64(0.5 * phi1)) * Float64(-0.5 * phi2))) ^ 2.0) + t_4)), sqrt(Float64(1.0 - Float64((t_1 ^ 2.0) + Float64(cos(phi1) * t_2))))) * Float64(R * 2.0));
else
tmp = Float64(atan(sqrt(Float64(t_0 + t_4)), t_5) * Float64(R * 2.0));
end
return tmp
end
function tmp = code(R, lambda1, lambda2, phi1, phi2)
tmp = R * (2.0 * atan2(sqrt(((sin(((phi1 - phi2) / 2.0)) ^ 2.0) + (((cos(phi1) * cos(phi2)) * sin(((lambda1 - lambda2) / 2.0))) * sin(((lambda1 - lambda2) / 2.0))))), sqrt((1.0 - ((sin(((phi1 - phi2) / 2.0)) ^ 2.0) + (((cos(phi1) * cos(phi2)) * sin(((lambda1 - lambda2) / 2.0))) * sin(((lambda1 - lambda2) / 2.0))))))));
end
↓
function tmp_2 = code(R, lambda1, lambda2, phi1, phi2)
t_0 = sin((-0.5 * phi2)) ^ 2.0;
t_1 = sin((0.5 * phi1));
t_2 = sin((0.5 * (lambda1 - lambda2))) ^ 2.0;
t_3 = sin(((lambda1 - lambda2) / 2.0));
t_4 = cos(phi1) * (cos(phi2) * (t_3 * t_3));
t_5 = sqrt((1.0 - (t_0 + (cos(phi2) * t_2))));
tmp = 0.0;
if (phi2 <= -0.00015)
tmp = atan2(sqrt(((sin(((phi1 - phi2) / 2.0)) ^ 2.0) + t_4)), t_5) * (R * 2.0);
elseif (phi2 <= 740.0)
tmp = atan2(sqrt((((t_1 + (cos((0.5 * phi1)) * (-0.5 * phi2))) ^ 2.0) + t_4)), sqrt((1.0 - ((t_1 ^ 2.0) + (cos(phi1) * t_2))))) * (R * 2.0);
else
tmp = atan2(sqrt((t_0 + t_4)), t_5) * (R * 2.0);
end
tmp_2 = tmp;
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := N[(R * N[(2.0 * N[ArcTan[N[Sqrt[N[(N[Power[N[Sin[N[(N[(phi1 - phi2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(N[(N[Cos[phi1], $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(1.0 - N[(N[Power[N[Sin[N[(N[(phi1 - phi2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(N[(N[Cos[phi1], $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[Power[N[Sin[N[(-0.5 * phi2), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(0.5 * phi1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sin[N[(0.5 * N[(lambda1 - lambda2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Cos[phi1], $MachinePrecision] * N[(N[Cos[phi2], $MachinePrecision] * N[(t$95$3 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[(1.0 - N[(t$95$0 + N[(N[Cos[phi2], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[phi2, -0.00015], N[(N[ArcTan[N[Sqrt[N[(N[Power[N[Sin[N[(N[(phi1 - phi2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] + t$95$4), $MachinePrecision]], $MachinePrecision] / t$95$5], $MachinePrecision] * N[(R * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[phi2, 740.0], N[(N[ArcTan[N[Sqrt[N[(N[Power[N[(t$95$1 + N[(N[Cos[N[(0.5 * phi1), $MachinePrecision]], $MachinePrecision] * N[(-0.5 * phi2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + t$95$4), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(1.0 - N[(N[Power[t$95$1, 2.0], $MachinePrecision] + N[(N[Cos[phi1], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(R * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[Sqrt[N[(t$95$0 + t$95$4), $MachinePrecision]], $MachinePrecision] / t$95$5], $MachinePrecision] * N[(R * 2.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)}}{\sqrt{1 - \left({\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right)}}\right)
↓
\begin{array}{l}
t_0 := {\sin \left(-0.5 \cdot \phi_2\right)}^{2}\\
t_1 := \sin \left(0.5 \cdot \phi_1\right)\\
t_2 := {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}\\
t_3 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_4 := \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \left(t_3 \cdot t_3\right)\right)\\
t_5 := \sqrt{1 - \left(t_0 + \cos \phi_2 \cdot t_2\right)}\\
\mathbf{if}\;\phi_2 \leq -0.00015:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + t_4}}{t_5} \cdot \left(R \cdot 2\right)\\
\mathbf{elif}\;\phi_2 \leq 740:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{{\left(t_1 + \cos \left(0.5 \cdot \phi_1\right) \cdot \left(-0.5 \cdot \phi_2\right)\right)}^{2} + t_4}}{\sqrt{1 - \left({t_1}^{2} + \cos \phi_1 \cdot t_2\right)}} \cdot \left(R \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{t_0 + t_4}}{t_5} \cdot \left(R \cdot 2\right)\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 24.2 |
|---|
| Cost | 99200 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \left(t_0 \cdot t_0\right)\right)\\
\tan^{-1}_* \frac{\sqrt{t_1}}{\sqrt{1 - t_1}} \cdot \left(R \cdot 2\right)
\end{array}
\]
| Alternative 2 |
|---|
| Error | 24.2 |
|---|
| Cost | 99200 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\cos \phi_2 \cdot t_0\right) \cdot \left(\cos \phi_1 \cdot t_0\right)\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1}}{\sqrt{1 - t_1}}\right)
\end{array}
\]
| Alternative 3 |
|---|
| Error | 24.1 |
|---|
| Cost | 92552 |
|---|
\[\begin{array}{l}
t_0 := {\sin \left(-0.5 \cdot \phi_2\right)}^{2}\\
t_1 := {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}\\
t_2 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_3 := \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \left(t_2 \cdot t_2\right)\right)\\
t_4 := \sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + t_3}\\
t_5 := \sqrt{1 - \left(t_0 + \cos \phi_2 \cdot t_1\right)}\\
\mathbf{if}\;\phi_2 \leq -3.2 \cdot 10^{-5}:\\
\;\;\;\;\tan^{-1}_* \frac{t_4}{t_5} \cdot \left(R \cdot 2\right)\\
\mathbf{elif}\;\phi_2 \leq 740:\\
\;\;\;\;\tan^{-1}_* \frac{t_4}{\sqrt{-\left(\cos \phi_1 \cdot t_1 + \left({\sin \left(0.5 \cdot \phi_1\right)}^{2} + -1\right)\right)}} \cdot \left(R \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{t_0 + t_3}}{t_5} \cdot \left(R \cdot 2\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 24.0 |
|---|
| Cost | 92488 |
|---|
\[\begin{array}{l}
t_0 := {\sin \left(0.5 \cdot \phi_1\right)}^{2}\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_2 := {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}\\
t_3 := R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_0 + \cos \phi_1 \cdot t_2}}{\sqrt{1 - \left(t_0 + \left(\cos \phi_2 \cdot t_1\right) \cdot \left(\cos \phi_1 \cdot t_1\right)\right)}}\right)\\
\mathbf{if}\;\phi_1 \leq -3.2 \cdot 10^{-7}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;\phi_1 \leq 7.5 \cdot 10^{-5}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \left(t_1 \cdot t_1\right)\right)}}{\sqrt{1 - \left({\sin \left(-0.5 \cdot \phi_2\right)}^{2} + \cos \phi_2 \cdot t_2\right)}} \cdot \left(R \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 24.1 |
|---|
| Cost | 92488 |
|---|
\[\begin{array}{l}
t_0 := {\sin \left(-0.5 \cdot \phi_2\right)}^{2}\\
t_1 := {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}\\
t_2 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_3 := \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \left(t_2 \cdot t_2\right)\right)\\
t_4 := \sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + t_3}\\
t_5 := \sqrt{1 - \left(t_0 + \cos \phi_2 \cdot t_1\right)}\\
\mathbf{if}\;\phi_2 \leq -3.2 \cdot 10^{-6}:\\
\;\;\;\;\tan^{-1}_* \frac{t_4}{t_5} \cdot \left(R \cdot 2\right)\\
\mathbf{elif}\;\phi_2 \leq 740:\\
\;\;\;\;\tan^{-1}_* \frac{t_4}{\sqrt{1 - \left({\sin \left(0.5 \cdot \phi_1\right)}^{2} + \cos \phi_1 \cdot t_1\right)}} \cdot \left(R \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{t_0 + t_3}}{t_5} \cdot \left(R \cdot 2\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 36.0 |
|---|
| Cost | 92360 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}\\
t_2 := R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(0.5 \cdot \phi_1\right)}^{2} + \cos \phi_1 \cdot {\sin \left(-0.5 \cdot \lambda_2\right)}^{2}}}{\sqrt{1 - \left(t_1 + \left(\cos \phi_2 \cdot t_0\right) \cdot \left(\cos \phi_1 \cdot t_0\right)\right)}}\right)\\
\mathbf{if}\;\phi_1 \leq -1.55 \cdot 10^{-5}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\phi_1 \leq 6.2 \cdot 10^{-5}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{t_1 + \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \left(t_0 \cdot t_0\right)\right)}}{\sqrt{1 - {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}}} \cdot \left(R \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 34.4 |
|---|
| Cost | 92360 |
|---|
\[\begin{array}{l}
t_0 := {\sin \left(0.5 \cdot \phi_1\right)}^{2}\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_2 := R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_0 + \cos \phi_1 \cdot {\sin \left(0.5 \cdot \lambda_1\right)}^{2}}}{\sqrt{1 - \left({\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\cos \phi_2 \cdot t_1\right) \cdot \left(\cos \phi_1 \cdot t_1\right)\right)}}\right)\\
\mathbf{if}\;\lambda_1 \leq -0.00098:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\lambda_1 \leq 8000000:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_0 + \cos \phi_1 \cdot {\left(0.5 \cdot \left(\cos \left(-0.5 \cdot \lambda_2\right) \cdot \lambda_1\right) + \sin \left(-0.5 \cdot \lambda_2\right)\right)}^{2}}}{\sqrt{1 - \left(t_0 + \cos \phi_1 \cdot {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 32.9 |
|---|
| Cost | 92360 |
|---|
\[\begin{array}{l}
t_0 := {\sin \left(0.5 \cdot \phi_1\right)}^{2}\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_2 := {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}\\
t_3 := R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_0 + \cos \phi_1 \cdot t_2}}{\sqrt{1 - \left(t_0 + \left(\cos \phi_2 \cdot t_1\right) \cdot \left(\cos \phi_1 \cdot t_1\right)\right)}}\right)\\
\mathbf{if}\;\phi_1 \leq -7.2 \cdot 10^{-40}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;\phi_1 \leq 6.2 \cdot 10^{-7}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \left(t_1 \cdot t_1\right)\right)}}{\sqrt{1 - t_2}} \cdot \left(R \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 24.9 |
|---|
| Cost | 92360 |
|---|
\[\begin{array}{l}
t_0 := {\sin \left(0.5 \cdot \phi_1\right)}^{2}\\
t_1 := {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}\\
t_2 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_3 := {\sin \left(-0.5 \cdot \phi_2\right)}^{2}\\
t_4 := \tan^{-1}_* \frac{\sqrt{t_3 + \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \left(t_2 \cdot t_2\right)\right)}}{\sqrt{1 - \left(t_3 + \cos \phi_2 \cdot t_1\right)}} \cdot \left(R \cdot 2\right)\\
\mathbf{if}\;\phi_2 \leq -8.2 \cdot 10^{-13}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;\phi_2 \leq 3 \cdot 10^{-17}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_0 + \cos \phi_1 \cdot t_1}}{\sqrt{1 - \left(t_0 + \left(\cos \phi_2 \cdot t_2\right) \cdot \left(\cos \phi_1 \cdot t_2\right)\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 37.3 |
|---|
| Cost | 92296 |
|---|
\[\begin{array}{l}
t_0 := {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}\\
t_1 := {\sin \left(0.5 \cdot \phi_1\right)}^{2}\\
t_2 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_3 := \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \left(t_2 \cdot t_2\right)\right)}}{\sqrt{1 - t_0}} \cdot \left(R \cdot 2\right)\\
\mathbf{if}\;\lambda_1 \leq -3.6 \cdot 10^{-9}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;\lambda_1 \leq 1.35 \cdot 10^{-5}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t_1 + \cos \phi_1 \cdot {\left(0.5 \cdot \left(\cos \left(-0.5 \cdot \lambda_2\right) \cdot \lambda_1\right) + \sin \left(-0.5 \cdot \lambda_2\right)\right)}^{2}}}{\sqrt{1 - \left(t_1 + \cos \phi_1 \cdot t_0\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 40.8 |
|---|
| Cost | 86216 |
|---|
\[\begin{array}{l}
t_0 := {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_2 := \tan^{-1}_* \frac{\sqrt{t_0 + \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \left(t_1 \cdot t_1\right)\right)}}{\sqrt{1 - {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}}} \cdot \left(R \cdot 2\right)\\
\mathbf{if}\;\lambda_1 - \lambda_2 \leq -1 \cdot 10^{-10}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\lambda_1 - \lambda_2 \leq 10^{-17}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(0.5 \cdot \phi_1\right)}^{2} + {\lambda_1}^{2} \cdot \left(0.25 \cdot \cos \phi_1\right)}}{\sqrt{1 - \left(t_0 + \left(\cos \phi_2 \cdot t_1\right) \cdot \left(\cos \phi_1 \cdot t_1\right)\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 48.9 |
|---|
| Cost | 79236 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\\
t_1 := {t_0}^{2}\\
\mathbf{if}\;\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \leq -2 \cdot 10^{-174}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\cos \phi_1} \cdot \left(\sin \left(\lambda_2 \cdot 0.5\right) + \cos \left(\lambda_2 \cdot 0.5\right) \cdot \left(\lambda_1 \cdot -0.5\right)\right)}{\sqrt{1 - \left({\sin \left(-0.5 \cdot \phi_2\right)}^{2} + \cos \phi_2 \cdot t_1\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_0}{\sqrt{1 - \left({\sin \left(0.5 \cdot \phi_1\right)}^{2} + \cos \phi_1 \cdot t_1\right)}}\right)\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 41.6 |
|---|
| Cost | 72576 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
\tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \cos \phi_1 \cdot \left(\cos \phi_2 \cdot \left(t_0 \cdot t_0\right)\right)}}{\sqrt{1 - {\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}}} \cdot \left(R \cdot 2\right)
\end{array}
\]
| Alternative 14 |
|---|
| Error | 53.4 |
|---|
| Cost | 52736 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_0}{\sqrt{1 - \left({\sin \left(-0.5 \cdot \phi_2\right)}^{2} + \cos \phi_2 \cdot {t_0}^{2}\right)}}\right)
\end{array}
\]
| Alternative 15 |
|---|
| Error | 53.4 |
|---|
| Cost | 52736 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_0}{\sqrt{1 - \left({\sin \left(0.5 \cdot \phi_1\right)}^{2} + \cos \phi_1 \cdot {t_0}^{2}\right)}}\right)
\end{array}
\]
| Alternative 16 |
|---|
| Error | 53.5 |
|---|
| Cost | 33088 |
|---|
\[\begin{array}{l}
t_0 := \sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{t_0}{\sqrt{1 - {t_0}^{2}}}\right)
\end{array}
\]