Distance on a great circle

Percentage Accurate: 62.2% → 78.5%
Time: 51.1s
Alternatives: 25
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \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(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t\_0\right) \cdot t\_0\\ R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t\_1}}{\sqrt{1 - t\_1}}\right) \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (sin (/ (- lambda1 lambda2) 2.0)))
        (t_1
         (+
          (pow (sin (/ (- phi1 phi2) 2.0)) 2.0)
          (* (* (* (cos phi1) (cos phi2)) t_0) t_0))))
   (* R (* 2.0 (atan2 (sqrt t_1) (sqrt (- 1.0 t_1)))))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = sin(((lambda1 - lambda2) / 2.0));
	double t_1 = pow(sin(((phi1 - phi2) / 2.0)), 2.0) + (((cos(phi1) * cos(phi2)) * t_0) * t_0);
	return R * (2.0 * atan2(sqrt(t_1), sqrt((1.0 - t_1))));
}
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
    t_0 = sin(((lambda1 - lambda2) / 2.0d0))
    t_1 = (sin(((phi1 - phi2) / 2.0d0)) ** 2.0d0) + (((cos(phi1) * cos(phi2)) * t_0) * t_0)
    code = r * (2.0d0 * atan2(sqrt(t_1), sqrt((1.0d0 - t_1))))
end function
public static double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = Math.sin(((lambda1 - lambda2) / 2.0));
	double t_1 = Math.pow(Math.sin(((phi1 - phi2) / 2.0)), 2.0) + (((Math.cos(phi1) * Math.cos(phi2)) * t_0) * t_0);
	return R * (2.0 * Math.atan2(Math.sqrt(t_1), Math.sqrt((1.0 - t_1))));
}
def code(R, lambda1, lambda2, phi1, phi2):
	t_0 = math.sin(((lambda1 - lambda2) / 2.0))
	t_1 = math.pow(math.sin(((phi1 - phi2) / 2.0)), 2.0) + (((math.cos(phi1) * math.cos(phi2)) * t_0) * t_0)
	return R * (2.0 * math.atan2(math.sqrt(t_1), math.sqrt((1.0 - t_1))))
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	t_1 = Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + Float64(Float64(Float64(cos(phi1) * cos(phi2)) * t_0) * t_0))
	return Float64(R * Float64(2.0 * atan(sqrt(t_1), sqrt(Float64(1.0 - t_1)))))
end
function tmp = code(R, lambda1, lambda2, phi1, phi2)
	t_0 = sin(((lambda1 - lambda2) / 2.0));
	t_1 = (sin(((phi1 - phi2) / 2.0)) ^ 2.0) + (((cos(phi1) * cos(phi2)) * t_0) * t_0);
	tmp = R * (2.0 * atan2(sqrt(t_1), sqrt((1.0 - t_1))));
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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] * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]}, N[(R * N[(2.0 * N[ArcTan[N[Sqrt[t$95$1], $MachinePrecision] / N[Sqrt[N[(1.0 - t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\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(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t\_0\right) \cdot t\_0\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t\_1}}{\sqrt{1 - t\_1}}\right)
\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 25 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 62.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t\_0\right) \cdot t\_0\\ R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t\_1}}{\sqrt{1 - t\_1}}\right) \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (sin (/ (- lambda1 lambda2) 2.0)))
        (t_1
         (+
          (pow (sin (/ (- phi1 phi2) 2.0)) 2.0)
          (* (* (* (cos phi1) (cos phi2)) t_0) t_0))))
   (* R (* 2.0 (atan2 (sqrt t_1) (sqrt (- 1.0 t_1)))))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = sin(((lambda1 - lambda2) / 2.0));
	double t_1 = pow(sin(((phi1 - phi2) / 2.0)), 2.0) + (((cos(phi1) * cos(phi2)) * t_0) * t_0);
	return R * (2.0 * atan2(sqrt(t_1), sqrt((1.0 - t_1))));
}
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
    t_0 = sin(((lambda1 - lambda2) / 2.0d0))
    t_1 = (sin(((phi1 - phi2) / 2.0d0)) ** 2.0d0) + (((cos(phi1) * cos(phi2)) * t_0) * t_0)
    code = r * (2.0d0 * atan2(sqrt(t_1), sqrt((1.0d0 - t_1))))
end function
public static double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = Math.sin(((lambda1 - lambda2) / 2.0));
	double t_1 = Math.pow(Math.sin(((phi1 - phi2) / 2.0)), 2.0) + (((Math.cos(phi1) * Math.cos(phi2)) * t_0) * t_0);
	return R * (2.0 * Math.atan2(Math.sqrt(t_1), Math.sqrt((1.0 - t_1))));
}
def code(R, lambda1, lambda2, phi1, phi2):
	t_0 = math.sin(((lambda1 - lambda2) / 2.0))
	t_1 = math.pow(math.sin(((phi1 - phi2) / 2.0)), 2.0) + (((math.cos(phi1) * math.cos(phi2)) * t_0) * t_0)
	return R * (2.0 * math.atan2(math.sqrt(t_1), math.sqrt((1.0 - t_1))))
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	t_1 = Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + Float64(Float64(Float64(cos(phi1) * cos(phi2)) * t_0) * t_0))
	return Float64(R * Float64(2.0 * atan(sqrt(t_1), sqrt(Float64(1.0 - t_1)))))
end
function tmp = code(R, lambda1, lambda2, phi1, phi2)
	t_0 = sin(((lambda1 - lambda2) / 2.0));
	t_1 = (sin(((phi1 - phi2) / 2.0)) ^ 2.0) + (((cos(phi1) * cos(phi2)) * t_0) * t_0);
	tmp = R * (2.0 * atan2(sqrt(t_1), sqrt((1.0 - t_1))));
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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] * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]}, N[(R * N[(2.0 * N[ArcTan[N[Sqrt[t$95$1], $MachinePrecision] / N[Sqrt[N[(1.0 - t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\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(\left(\cos \phi_1 \cdot \cos \phi_2\right) \cdot t\_0\right) \cdot t\_0\\
R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{t\_1}}{\sqrt{1 - t\_1}}\right)
\end{array}
\end{array}

Alternative 1: 78.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(\phi_1 \cdot 0.5\right)\\ t_1 := \cos \phi_2 \cdot \cos \phi_1\\ t_2 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\ t_3 := \cos \left(\phi_1 \cdot 0.5\right)\\ \left(\tan^{-1}_* \frac{\sqrt{\left(t\_1 \cdot t\_2\right) \cdot t\_2 + {\left(\mathsf{fma}\left(t\_0, \cos \left(\phi_2 \cdot -0.5\right), \sin \left(\phi_2 \cdot -0.5\right) \cdot t\_3\right)\right)}^{2}}}{\sqrt{1 - \left({\left(\cos \left(\phi_2 \cdot 0.5\right) \cdot t\_0 - \sin \left(\phi_2 \cdot 0.5\right) \cdot t\_3\right)}^{2} + t\_1 \cdot \mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right)\right)}} \cdot 2\right) \cdot R \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (sin (* phi1 0.5)))
        (t_1 (* (cos phi2) (cos phi1)))
        (t_2 (sin (/ (- lambda1 lambda2) 2.0)))
        (t_3 (cos (* phi1 0.5))))
   (*
    (*
     (atan2
      (sqrt
       (+
        (* (* t_1 t_2) t_2)
        (pow (fma t_0 (cos (* phi2 -0.5)) (* (sin (* phi2 -0.5)) t_3)) 2.0)))
      (sqrt
       (-
        1.0
        (+
         (pow (- (* (cos (* phi2 0.5)) t_0) (* (sin (* phi2 0.5)) t_3)) 2.0)
         (* t_1 (fma (cos (- lambda2 lambda1)) -0.5 0.5))))))
     2.0)
    R)))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = sin((phi1 * 0.5));
	double t_1 = cos(phi2) * cos(phi1);
	double t_2 = sin(((lambda1 - lambda2) / 2.0));
	double t_3 = cos((phi1 * 0.5));
	return (atan2(sqrt((((t_1 * t_2) * t_2) + pow(fma(t_0, cos((phi2 * -0.5)), (sin((phi2 * -0.5)) * t_3)), 2.0))), sqrt((1.0 - (pow(((cos((phi2 * 0.5)) * t_0) - (sin((phi2 * 0.5)) * t_3)), 2.0) + (t_1 * fma(cos((lambda2 - lambda1)), -0.5, 0.5)))))) * 2.0) * R;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = sin(Float64(phi1 * 0.5))
	t_1 = Float64(cos(phi2) * cos(phi1))
	t_2 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	t_3 = cos(Float64(phi1 * 0.5))
	return Float64(Float64(atan(sqrt(Float64(Float64(Float64(t_1 * t_2) * t_2) + (fma(t_0, cos(Float64(phi2 * -0.5)), Float64(sin(Float64(phi2 * -0.5)) * t_3)) ^ 2.0))), sqrt(Float64(1.0 - Float64((Float64(Float64(cos(Float64(phi2 * 0.5)) * t_0) - Float64(sin(Float64(phi2 * 0.5)) * t_3)) ^ 2.0) + Float64(t_1 * fma(cos(Float64(lambda2 - lambda1)), -0.5, 0.5)))))) * 2.0) * R)
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[Sin[N[(phi1 * 0.5), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Cos[N[(phi1 * 0.5), $MachinePrecision]], $MachinePrecision]}, N[(N[(N[ArcTan[N[Sqrt[N[(N[(N[(t$95$1 * t$95$2), $MachinePrecision] * t$95$2), $MachinePrecision] + N[Power[N[(t$95$0 * N[Cos[N[(phi2 * -0.5), $MachinePrecision]], $MachinePrecision] + N[(N[Sin[N[(phi2 * -0.5), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(N[Cos[N[(phi2 * 0.5), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision] - N[(N[Sin[N[(phi2 * 0.5), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(t$95$1 * N[(N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * R), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(\phi_1 \cdot 0.5\right)\\
t_1 := \cos \phi_2 \cdot \cos \phi_1\\
t_2 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_3 := \cos \left(\phi_1 \cdot 0.5\right)\\
\left(\tan^{-1}_* \frac{\sqrt{\left(t\_1 \cdot t\_2\right) \cdot t\_2 + {\left(\mathsf{fma}\left(t\_0, \cos \left(\phi_2 \cdot -0.5\right), \sin \left(\phi_2 \cdot -0.5\right) \cdot t\_3\right)\right)}^{2}}}{\sqrt{1 - \left({\left(\cos \left(\phi_2 \cdot 0.5\right) \cdot t\_0 - \sin \left(\phi_2 \cdot 0.5\right) \cdot t\_3\right)}^{2} + t\_1 \cdot \mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right)\right)}} \cdot 2\right) \cdot R
\end{array}
\end{array}
Derivation
  1. Initial program 58.4%

    \[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) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-sin.f64N/A

      \[\leadsto 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({\color{blue}{\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) \]
    2. lift-/.f64N/A

      \[\leadsto 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 \color{blue}{\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) \]
    3. lift--.f64N/A

      \[\leadsto 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{\color{blue}{\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) \]
    4. div-subN/A

      \[\leadsto 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 \color{blue}{\left(\frac{\phi_1}{2} - \frac{\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) \]
    5. sin-diffN/A

      \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    6. lower--.f64N/A

      \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    7. lower-*.f64N/A

      \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    8. lower-sin.f64N/A

      \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    9. div-invN/A

      \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    10. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    11. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    12. lower-cos.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    13. div-invN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    14. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    15. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    16. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)}\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) \]
    17. lower-cos.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    18. div-invN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    19. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    20. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    21. lower-sin.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin \left(\frac{\phi_2}{2}\right)}\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) \]
    22. div-invN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)}\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) \]
    23. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right)\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) \]
    24. lower-*.f6460.1

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot 0.5\right)}\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) \]
  4. Applied rewrites60.1%

    \[\leadsto 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({\color{blue}{\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
  5. Step-by-step derivation
    1. lift-sin.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    2. lift-/.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    3. div-invN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\left(\phi_1 - \phi_2\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    4. metadata-evalN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\left(\phi_1 - \phi_2\right) \cdot \color{blue}{\frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    5. *-commutativeN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    6. lift--.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 - \phi_2\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    7. sub-negN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 + \left(\mathsf{neg}\left(\phi_2\right)\right)\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    8. distribute-rgt-inN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} + \left(\mathsf{neg}\left(\phi_2\right)\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    9. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\color{blue}{\phi_1 \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\phi_2\right)\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    10. cancel-sign-sub-invN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} - \phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    11. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    12. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    13. *-commutativeN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \phi_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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    14. cancel-sign-sub-invN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \phi_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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    15. metadata-evalN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \phi_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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    16. *-commutativeN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} + \color{blue}{\phi_2 \cdot \frac{-1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    17. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} + \color{blue}{\phi_2 \cdot \frac{-1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    18. sin-sumN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{-1}{2}\right) + \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{-1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    19. lift-sin.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\color{blue}{\sin \left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\phi_2 \cdot \frac{-1}{2}\right) + \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{-1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    20. lower-fma.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\mathsf{fma}\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right), \cos \left(\phi_2 \cdot \frac{-1}{2}\right), \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{-1}{2}\right)\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
  6. Applied rewrites77.3%

    \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\mathsf{fma}\left(\sin \left(0.5 \cdot \phi_1\right), \cos \left(-0.5 \cdot \phi_2\right), \cos \left(0.5 \cdot \phi_1\right) \cdot \sin \left(-0.5 \cdot \phi_2\right)\right)\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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
  7. Applied rewrites77.4%

    \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(0.5 \cdot \phi_1\right), \cos \left(-0.5 \cdot \phi_2\right), \cos \left(0.5 \cdot \phi_1\right) \cdot \sin \left(-0.5 \cdot \phi_2\right)\right)\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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\right)}^{2} + \color{blue}{\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}\right)}}\right) \]
  8. Final simplification77.4%

    \[\leadsto \left(\tan^{-1}_* \frac{\sqrt{\left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) + {\left(\mathsf{fma}\left(\sin \left(\phi_1 \cdot 0.5\right), \cos \left(\phi_2 \cdot -0.5\right), \sin \left(\phi_2 \cdot -0.5\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)\right)}^{2}}}{\sqrt{1 - \left({\left(\cos \left(\phi_2 \cdot 0.5\right) \cdot \sin \left(\phi_1 \cdot 0.5\right) - \sin \left(\phi_2 \cdot 0.5\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)}^{2} + \left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right)\right)}} \cdot 2\right) \cdot R \]
  9. Add Preprocessing

Alternative 2: 63.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \phi_2 \cdot \cos \phi_1\\ t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\ t_2 := {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(t\_0 \cdot t\_1\right) \cdot t\_1\\ t_3 := \sqrt{t\_2}\\ \mathbf{if}\;\left(\tan^{-1}_* \frac{t\_3}{\sqrt{1 - t\_2}} \cdot 2\right) \cdot R \leq 4 \cdot 10^{+282}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{t\_3}{\sqrt{\left(1 - \mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right) \cdot t\_0\right) - \mathsf{fma}\left(-0.5, \cos \left(\phi_1 - \phi_2\right), 0.5\right)}} \cdot 2\right) \cdot R\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, t\_0, 0.5 - \mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_2 \cdot \sin \phi_1\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (* (cos phi2) (cos phi1)))
        (t_1 (sin (/ (- lambda1 lambda2) 2.0)))
        (t_2 (+ (pow (sin (/ (- phi1 phi2) 2.0)) 2.0) (* (* t_0 t_1) t_1)))
        (t_3 (sqrt t_2)))
   (if (<= (* (* (atan2 t_3 (sqrt (- 1.0 t_2))) 2.0) R) 4e+282)
     (*
      (*
       (atan2
        t_3
        (sqrt
         (-
          (- 1.0 (* (fma -0.5 (cos (- lambda1 lambda2)) 0.5) t_0))
          (fma -0.5 (cos (- phi1 phi2)) 0.5))))
       2.0)
      R)
     (*
      (atan2
       (sqrt
        (fma
         (- 0.5 (* (cos (* (* (- lambda1 lambda2) 0.5) 2.0)) 0.5))
         t_0
         (-
          0.5
          (* (fma (cos phi2) (cos phi1) (* (sin phi2) (sin phi1))) 0.5))))
       (sqrt
        (-
         0.5
         (* (- (- 0.5 (* (cos (- lambda2 lambda1)) 0.5)) 0.5) (cos phi1)))))
      (* 2.0 R)))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = cos(phi2) * cos(phi1);
	double t_1 = sin(((lambda1 - lambda2) / 2.0));
	double t_2 = pow(sin(((phi1 - phi2) / 2.0)), 2.0) + ((t_0 * t_1) * t_1);
	double t_3 = sqrt(t_2);
	double tmp;
	if (((atan2(t_3, sqrt((1.0 - t_2))) * 2.0) * R) <= 4e+282) {
		tmp = (atan2(t_3, sqrt(((1.0 - (fma(-0.5, cos((lambda1 - lambda2)), 0.5) * t_0)) - fma(-0.5, cos((phi1 - phi2)), 0.5)))) * 2.0) * R;
	} else {
		tmp = atan2(sqrt(fma((0.5 - (cos((((lambda1 - lambda2) * 0.5) * 2.0)) * 0.5)), t_0, (0.5 - (fma(cos(phi2), cos(phi1), (sin(phi2) * sin(phi1))) * 0.5)))), sqrt((0.5 - (((0.5 - (cos((lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * (2.0 * R);
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = Float64(cos(phi2) * cos(phi1))
	t_1 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	t_2 = Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + Float64(Float64(t_0 * t_1) * t_1))
	t_3 = sqrt(t_2)
	tmp = 0.0
	if (Float64(Float64(atan(t_3, sqrt(Float64(1.0 - t_2))) * 2.0) * R) <= 4e+282)
		tmp = Float64(Float64(atan(t_3, sqrt(Float64(Float64(1.0 - Float64(fma(-0.5, cos(Float64(lambda1 - lambda2)), 0.5) * t_0)) - fma(-0.5, cos(Float64(phi1 - phi2)), 0.5)))) * 2.0) * R);
	else
		tmp = Float64(atan(sqrt(fma(Float64(0.5 - Float64(cos(Float64(Float64(Float64(lambda1 - lambda2) * 0.5) * 2.0)) * 0.5)), t_0, Float64(0.5 - Float64(fma(cos(phi2), cos(phi1), Float64(sin(phi2) * sin(phi1))) * 0.5)))), sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(cos(Float64(lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * Float64(2.0 * R));
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[Sin[N[(N[(phi1 - phi2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(t$95$0 * t$95$1), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[t$95$2], $MachinePrecision]}, If[LessEqual[N[(N[(N[ArcTan[t$95$3 / N[Sqrt[N[(1.0 - t$95$2), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * R), $MachinePrecision], 4e+282], N[(N[(N[ArcTan[t$95$3 / N[Sqrt[N[(N[(1.0 - N[(N[(-0.5 * N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(-0.5 * N[Cos[N[(phi1 - phi2), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * R), $MachinePrecision], N[(N[ArcTan[N[Sqrt[N[(N[(0.5 - N[(N[Cos[N[(N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] * t$95$0 + N[(0.5 - N[(N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision] + N[(N[Sin[phi2], $MachinePrecision] * N[Sin[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \phi_2 \cdot \cos \phi_1\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_2 := {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(t\_0 \cdot t\_1\right) \cdot t\_1\\
t_3 := \sqrt{t\_2}\\
\mathbf{if}\;\left(\tan^{-1}_* \frac{t\_3}{\sqrt{1 - t\_2}} \cdot 2\right) \cdot R \leq 4 \cdot 10^{+282}:\\
\;\;\;\;\left(\tan^{-1}_* \frac{t\_3}{\sqrt{\left(1 - \mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right) \cdot t\_0\right) - \mathsf{fma}\left(-0.5, \cos \left(\phi_1 - \phi_2\right), 0.5\right)}} \cdot 2\right) \cdot R\\

\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, t\_0, 0.5 - \mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_2 \cdot \sin \phi_1\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 R (*.f64 #s(literal 2 binary64) (atan2.f64 (sqrt.f64 (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))))) (sqrt.f64 (-.f64 #s(literal 1 binary64) (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))))))))) < 4.00000000000000013e282

    1. Initial program 61.3%

      \[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) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto 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({\color{blue}{\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) \]
      2. lift-/.f64N/A

        \[\leadsto 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 \color{blue}{\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) \]
      3. lift--.f64N/A

        \[\leadsto 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{\color{blue}{\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) \]
      4. div-subN/A

        \[\leadsto 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 \color{blue}{\left(\frac{\phi_1}{2} - \frac{\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) \]
      5. sin-diffN/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      6. lower--.f64N/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      7. lower-*.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      8. lower-sin.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      9. div-invN/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      10. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      11. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      12. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      13. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      14. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      15. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      16. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)}\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) \]
      17. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      18. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      19. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      20. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      21. lower-sin.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin \left(\frac{\phi_2}{2}\right)}\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) \]
      22. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)}\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) \]
      23. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right)\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) \]
      24. lower-*.f6462.1

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot 0.5\right)}\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) \]
    4. Applied rewrites62.1%

      \[\leadsto 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({\color{blue}{\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
    5. Applied rewrites61.4%

      \[\leadsto 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{\color{blue}{\left(1 - \mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)\right) - \mathsf{fma}\left(-0.5, \cos \left(\phi_1 - \phi_2\right), 0.5\right)}}}\right) \]

    if 4.00000000000000013e282 < (*.f64 R (*.f64 #s(literal 2 binary64) (atan2.f64 (sqrt.f64 (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))))) (sqrt.f64 (-.f64 #s(literal 1 binary64) (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64))))))))))

    1. Initial program 19.7%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites19.8%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6434.3

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites34.3%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Step-by-step derivation
      1. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)}\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 - \phi_2\right)}\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 - \phi_2\right)}\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. associate-*r*N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(\left(2 \cdot \frac{1}{2}\right) \cdot \left(\phi_1 - \phi_2\right)\right)}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(\color{blue}{1} \cdot \left(\phi_1 - \phi_2\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      8. *-lft-identityN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(\phi_1 - \phi_2\right)}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      9. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(\phi_1 - \phi_2\right)}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. cos-diffN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\left(\cos \phi_1 \cdot \cos \phi_2 + \sin \phi_1 \cdot \sin \phi_2\right)}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \left(\color{blue}{\cos \phi_1} \cdot \cos \phi_2 + \sin \phi_1 \cdot \sin \phi_2\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \left(\cos \phi_1 \cdot \color{blue}{\cos \phi_2} + \sin \phi_1 \cdot \sin \phi_2\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \left(\color{blue}{\cos \phi_2 \cdot \cos \phi_1} + \sin \phi_1 \cdot \sin \phi_2\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \left(\cos \phi_2 \cdot \cos \phi_1 + \color{blue}{\sin \phi_2 \cdot \sin \phi_1}\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. lower-fma.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_2 \cdot \sin \phi_1\right)}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \color{blue}{\sin \phi_1 \cdot \sin \phi_2}\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \color{blue}{\sin \phi_1 \cdot \sin \phi_2}\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \color{blue}{\sin \phi_1} \cdot \sin \phi_2\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-sin.f6438.9

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_1 \cdot \color{blue}{\sin \phi_2}\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Applied rewrites38.9%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_1 \cdot \sin \phi_2\right)}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\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_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right)}} \cdot 2\right) \cdot R \leq 4 \cdot 10^{+282}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)}}{\sqrt{\left(1 - \mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)\right) - \mathsf{fma}\left(-0.5, \cos \left(\phi_1 - \phi_2\right), 0.5\right)}} \cdot 2\right) \cdot R\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_2 \cdot \sin \phi_1\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 59.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(\phi_2 + \phi_1\right)\\ t_1 := \cos \left(\lambda_2 - \lambda_1\right)\\ t_2 := \cos \phi_2 \cdot \cos \phi_1\\ t_3 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\ t_4 := \cos \left(\phi_2 - \phi_1\right)\\ t_5 := {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(t\_2 \cdot t\_3\right) \cdot t\_3\\ t_6 := \cos \left(\phi_1 - \phi_2\right)\\ \mathbf{if}\;\tan^{-1}_* \frac{\sqrt{t\_5}}{\sqrt{1 - t\_5}} \leq 10^{-29}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, t\_2, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - t\_1 \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(-0.25, t\_1, 0.25\right), t\_6 + t\_0, \mathsf{fma}\left(t\_6, -0.5, 0.5\right)\right)}}{\sqrt{1 - \mathsf{fma}\left(t\_4 + t\_0, -0.25 \cdot t\_1 + 0.25, 0.5 - t\_4 \cdot 0.5\right)}} \cdot 2\right) \cdot R\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (cos (+ phi2 phi1)))
        (t_1 (cos (- lambda2 lambda1)))
        (t_2 (* (cos phi2) (cos phi1)))
        (t_3 (sin (/ (- lambda1 lambda2) 2.0)))
        (t_4 (cos (- phi2 phi1)))
        (t_5 (+ (pow (sin (/ (- phi1 phi2) 2.0)) 2.0) (* (* t_2 t_3) t_3)))
        (t_6 (cos (- phi1 phi2))))
   (if (<= (atan2 (sqrt t_5) (sqrt (- 1.0 t_5))) 1e-29)
     (*
      (atan2
       (sqrt
        (fma
         (pow (sin (* (- lambda1 lambda2) 0.5)) 2.0)
         t_2
         (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5))))
       (sqrt (- 0.5 (* (- (- 0.5 (* t_1 0.5)) 0.5) (cos phi1)))))
      (* 2.0 R))
     (*
      (*
       (atan2
        (sqrt (fma (fma -0.25 t_1 0.25) (+ t_6 t_0) (fma t_6 -0.5 0.5)))
        (sqrt
         (- 1.0 (fma (+ t_4 t_0) (+ (* -0.25 t_1) 0.25) (- 0.5 (* t_4 0.5))))))
       2.0)
      R))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = cos((phi2 + phi1));
	double t_1 = cos((lambda2 - lambda1));
	double t_2 = cos(phi2) * cos(phi1);
	double t_3 = sin(((lambda1 - lambda2) / 2.0));
	double t_4 = cos((phi2 - phi1));
	double t_5 = pow(sin(((phi1 - phi2) / 2.0)), 2.0) + ((t_2 * t_3) * t_3);
	double t_6 = cos((phi1 - phi2));
	double tmp;
	if (atan2(sqrt(t_5), sqrt((1.0 - t_5))) <= 1e-29) {
		tmp = atan2(sqrt(fma(pow(sin(((lambda1 - lambda2) * 0.5)), 2.0), t_2, (0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt((0.5 - (((0.5 - (t_1 * 0.5)) - 0.5) * cos(phi1))))) * (2.0 * R);
	} else {
		tmp = (atan2(sqrt(fma(fma(-0.25, t_1, 0.25), (t_6 + t_0), fma(t_6, -0.5, 0.5))), sqrt((1.0 - fma((t_4 + t_0), ((-0.25 * t_1) + 0.25), (0.5 - (t_4 * 0.5)))))) * 2.0) * R;
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = cos(Float64(phi2 + phi1))
	t_1 = cos(Float64(lambda2 - lambda1))
	t_2 = Float64(cos(phi2) * cos(phi1))
	t_3 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	t_4 = cos(Float64(phi2 - phi1))
	t_5 = Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + Float64(Float64(t_2 * t_3) * t_3))
	t_6 = cos(Float64(phi1 - phi2))
	tmp = 0.0
	if (atan(sqrt(t_5), sqrt(Float64(1.0 - t_5))) <= 1e-29)
		tmp = Float64(atan(sqrt(fma((sin(Float64(Float64(lambda1 - lambda2) * 0.5)) ^ 2.0), t_2, Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(t_1 * 0.5)) - 0.5) * cos(phi1))))) * Float64(2.0 * R));
	else
		tmp = Float64(Float64(atan(sqrt(fma(fma(-0.25, t_1, 0.25), Float64(t_6 + t_0), fma(t_6, -0.5, 0.5))), sqrt(Float64(1.0 - fma(Float64(t_4 + t_0), Float64(Float64(-0.25 * t_1) + 0.25), Float64(0.5 - Float64(t_4 * 0.5)))))) * 2.0) * R);
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[Cos[N[(phi2 + phi1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Cos[N[(phi2 - phi1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[Power[N[Sin[N[(N[(phi1 - phi2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(t$95$2 * t$95$3), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[Cos[N[(phi1 - phi2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[ArcTan[N[Sqrt[t$95$5], $MachinePrecision] / N[Sqrt[N[(1.0 - t$95$5), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], 1e-29], N[(N[ArcTan[N[Sqrt[N[(N[Power[N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] * t$95$2 + N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(t$95$1 * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[Sqrt[N[(N[(-0.25 * t$95$1 + 0.25), $MachinePrecision] * N[(t$95$6 + t$95$0), $MachinePrecision] + N[(t$95$6 * -0.5 + 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(1.0 - N[(N[(t$95$4 + t$95$0), $MachinePrecision] * N[(N[(-0.25 * t$95$1), $MachinePrecision] + 0.25), $MachinePrecision] + N[(0.5 - N[(t$95$4 * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * R), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \left(\phi_2 + \phi_1\right)\\
t_1 := \cos \left(\lambda_2 - \lambda_1\right)\\
t_2 := \cos \phi_2 \cdot \cos \phi_1\\
t_3 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_4 := \cos \left(\phi_2 - \phi_1\right)\\
t_5 := {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(t\_2 \cdot t\_3\right) \cdot t\_3\\
t_6 := \cos \left(\phi_1 - \phi_2\right)\\
\mathbf{if}\;\tan^{-1}_* \frac{\sqrt{t\_5}}{\sqrt{1 - t\_5}} \leq 10^{-29}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, t\_2, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - t\_1 \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(-0.25, t\_1, 0.25\right), t\_6 + t\_0, \mathsf{fma}\left(t\_6, -0.5, 0.5\right)\right)}}{\sqrt{1 - \mathsf{fma}\left(t\_4 + t\_0, -0.25 \cdot t\_1 + 0.25, 0.5 - t\_4 \cdot 0.5\right)}} \cdot 2\right) \cdot R\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (atan2.f64 (sqrt.f64 (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))))) (sqrt.f64 (-.f64 #s(literal 1 binary64) (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))))))) < 9.99999999999999943e-30

    1. Initial program 100.0%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites28.8%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6428.8

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites28.8%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 - \lambda_2\right)}\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 - \lambda_2\right)}\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      8. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      9. sqr-sin-aN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. div-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. lift-/.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. div-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. lift-/.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Applied rewrites88.1%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{{\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]

    if 9.99999999999999943e-30 < (atan2.f64 (sqrt.f64 (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))))) (sqrt.f64 (-.f64 #s(literal 1 binary64) (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64))))))))

    1. Initial program 57.1%

      \[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) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto 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({\color{blue}{\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) \]
      2. lift-/.f64N/A

        \[\leadsto 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 \color{blue}{\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) \]
      3. lift--.f64N/A

        \[\leadsto 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{\color{blue}{\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) \]
      4. div-subN/A

        \[\leadsto 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 \color{blue}{\left(\frac{\phi_1}{2} - \frac{\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) \]
      5. sin-diffN/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      6. lower--.f64N/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      7. lower-*.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      8. lower-sin.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      9. div-invN/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      10. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      11. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      12. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      13. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      14. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      15. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      16. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)}\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) \]
      17. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      18. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      19. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      20. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      21. lower-sin.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin \left(\frac{\phi_2}{2}\right)}\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) \]
      22. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)}\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) \]
      23. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right)\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) \]
      24. lower-*.f6458.9

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot 0.5\right)}\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) \]
    4. Applied rewrites58.9%

      \[\leadsto 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({\color{blue}{\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
    5. Applied rewrites59.0%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \color{blue}{\frac{\mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right) \cdot \left(\cos \left(\phi_2 + \phi_1\right) + \cos \left(\phi_2 - \phi_1\right)\right)}{2}}}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
    6. Applied rewrites58.0%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \frac{\mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right) \cdot \left(\cos \left(\phi_2 + \phi_1\right) + \cos \left(\phi_2 - \phi_1\right)\right)}{2}}}{\sqrt{1 - \color{blue}{\mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_1 + \phi_2\right), 0.25 + \cos \left(\lambda_2 - \lambda_1\right) \cdot -0.25, 0.5 - \cos \left(\phi_2 - \phi_1\right) \cdot 0.5\right)}}}\right) \]
    7. Applied rewrites57.9%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-0.25, \cos \left(\lambda_2 - \lambda_1\right), 0.25\right), \cos \left(\phi_1 - \phi_2\right) + \cos \left(\phi_2 + \phi_1\right), \mathsf{fma}\left(\cos \left(\phi_1 - \phi_2\right), -0.5, 0.5\right)\right)}}}{\sqrt{1 - \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_1 + \phi_2\right), 0.25 + \cos \left(\lambda_2 - \lambda_1\right) \cdot -0.25, 0.5 - \cos \left(\phi_2 - \phi_1\right) \cdot 0.5\right)}}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\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_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right)}} \leq 10^{-29}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(-0.25, \cos \left(\lambda_2 - \lambda_1\right), 0.25\right), \cos \left(\phi_1 - \phi_2\right) + \cos \left(\phi_2 + \phi_1\right), \mathsf{fma}\left(\cos \left(\phi_1 - \phi_2\right), -0.5, 0.5\right)\right)}}{\sqrt{1 - \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_2 + \phi_1\right), -0.25 \cdot \cos \left(\lambda_2 - \lambda_1\right) + 0.25, 0.5 - \cos \left(\phi_2 - \phi_1\right) \cdot 0.5\right)}} \cdot 2\right) \cdot R\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 67.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(\phi_1 \cdot 0.5\right)\\ t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\ t_2 := \left(\lambda_1 - \lambda_2\right) \cdot 0.5\\ t_3 := 0.5 - \cos \left(t\_2 \cdot 2\right) \cdot 0.5\\ t_4 := \cos \phi_2 \cdot \cos \phi_1\\ t_5 := \sin \left(\phi_1 \cdot 0.5\right)\\ t_6 := \sqrt{1 - \left({\left(\cos \left(\phi_2 \cdot 0.5\right) \cdot t\_5 - \sin \left(\phi_2 \cdot 0.5\right) \cdot t\_0\right)}^{2} + \left(t\_4 \cdot t\_1\right) \cdot t\_1\right)}\\ \mathbf{if}\;t\_1 \leq -0.25:\\ \;\;\;\;\left(2 \cdot R\right) \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_3, t\_4, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\left(\mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_2 \cdot \sin \phi_1\right) \cdot 0.5 + 0.5\right) - t\_3 \cdot t\_4}}\\ \mathbf{elif}\;t\_1 \leq 0.11:\\ \;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{{\sin t\_2}^{2} \cdot \cos \phi_1 + {\left(\mathsf{fma}\left(t\_5, \cos \left(\phi_2 \cdot -0.5\right), \sin \left(\phi_2 \cdot -0.5\right) \cdot t\_0\right)\right)}^{2}}}{t\_6} \cdot 2\right) \cdot R\\ \mathbf{else}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\frac{\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_2 + \phi_1\right)\right) \cdot \mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right)}{2} + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}}{t\_6} \cdot 2\right) \cdot R\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (cos (* phi1 0.5)))
        (t_1 (sin (/ (- lambda1 lambda2) 2.0)))
        (t_2 (* (- lambda1 lambda2) 0.5))
        (t_3 (- 0.5 (* (cos (* t_2 2.0)) 0.5)))
        (t_4 (* (cos phi2) (cos phi1)))
        (t_5 (sin (* phi1 0.5)))
        (t_6
         (sqrt
          (-
           1.0
           (+
            (pow (- (* (cos (* phi2 0.5)) t_5) (* (sin (* phi2 0.5)) t_0)) 2.0)
            (* (* t_4 t_1) t_1))))))
   (if (<= t_1 -0.25)
     (*
      (* 2.0 R)
      (atan2
       (sqrt (fma t_3 t_4 (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5))))
       (sqrt
        (-
         (+ (* (fma (cos phi2) (cos phi1) (* (sin phi2) (sin phi1))) 0.5) 0.5)
         (* t_3 t_4)))))
     (if (<= t_1 0.11)
       (*
        (*
         (atan2
          (sqrt
           (+
            (* (pow (sin t_2) 2.0) (cos phi1))
            (pow
             (fma t_5 (cos (* phi2 -0.5)) (* (sin (* phi2 -0.5)) t_0))
             2.0)))
          t_6)
         2.0)
        R)
       (*
        (*
         (atan2
          (sqrt
           (+
            (/
             (*
              (+ (cos (- phi2 phi1)) (cos (+ phi2 phi1)))
              (fma -0.5 (cos (- lambda1 lambda2)) 0.5))
             2.0)
            (pow (sin (/ (- phi1 phi2) 2.0)) 2.0)))
          t_6)
         2.0)
        R)))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = cos((phi1 * 0.5));
	double t_1 = sin(((lambda1 - lambda2) / 2.0));
	double t_2 = (lambda1 - lambda2) * 0.5;
	double t_3 = 0.5 - (cos((t_2 * 2.0)) * 0.5);
	double t_4 = cos(phi2) * cos(phi1);
	double t_5 = sin((phi1 * 0.5));
	double t_6 = sqrt((1.0 - (pow(((cos((phi2 * 0.5)) * t_5) - (sin((phi2 * 0.5)) * t_0)), 2.0) + ((t_4 * t_1) * t_1))));
	double tmp;
	if (t_1 <= -0.25) {
		tmp = (2.0 * R) * atan2(sqrt(fma(t_3, t_4, (0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt((((fma(cos(phi2), cos(phi1), (sin(phi2) * sin(phi1))) * 0.5) + 0.5) - (t_3 * t_4))));
	} else if (t_1 <= 0.11) {
		tmp = (atan2(sqrt(((pow(sin(t_2), 2.0) * cos(phi1)) + pow(fma(t_5, cos((phi2 * -0.5)), (sin((phi2 * -0.5)) * t_0)), 2.0))), t_6) * 2.0) * R;
	} else {
		tmp = (atan2(sqrt(((((cos((phi2 - phi1)) + cos((phi2 + phi1))) * fma(-0.5, cos((lambda1 - lambda2)), 0.5)) / 2.0) + pow(sin(((phi1 - phi2) / 2.0)), 2.0))), t_6) * 2.0) * R;
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = cos(Float64(phi1 * 0.5))
	t_1 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	t_2 = Float64(Float64(lambda1 - lambda2) * 0.5)
	t_3 = Float64(0.5 - Float64(cos(Float64(t_2 * 2.0)) * 0.5))
	t_4 = Float64(cos(phi2) * cos(phi1))
	t_5 = sin(Float64(phi1 * 0.5))
	t_6 = sqrt(Float64(1.0 - Float64((Float64(Float64(cos(Float64(phi2 * 0.5)) * t_5) - Float64(sin(Float64(phi2 * 0.5)) * t_0)) ^ 2.0) + Float64(Float64(t_4 * t_1) * t_1))))
	tmp = 0.0
	if (t_1 <= -0.25)
		tmp = Float64(Float64(2.0 * R) * atan(sqrt(fma(t_3, t_4, Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(Float64(Float64(Float64(fma(cos(phi2), cos(phi1), Float64(sin(phi2) * sin(phi1))) * 0.5) + 0.5) - Float64(t_3 * t_4)))));
	elseif (t_1 <= 0.11)
		tmp = Float64(Float64(atan(sqrt(Float64(Float64((sin(t_2) ^ 2.0) * cos(phi1)) + (fma(t_5, cos(Float64(phi2 * -0.5)), Float64(sin(Float64(phi2 * -0.5)) * t_0)) ^ 2.0))), t_6) * 2.0) * R);
	else
		tmp = Float64(Float64(atan(sqrt(Float64(Float64(Float64(Float64(cos(Float64(phi2 - phi1)) + cos(Float64(phi2 + phi1))) * fma(-0.5, cos(Float64(lambda1 - lambda2)), 0.5)) / 2.0) + (sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0))), t_6) * 2.0) * R);
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[Cos[N[(phi1 * 0.5), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$3 = N[(0.5 - N[(N[Cos[N[(t$95$2 * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sin[N[(phi1 * 0.5), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(N[Cos[N[(phi2 * 0.5), $MachinePrecision]], $MachinePrecision] * t$95$5), $MachinePrecision] - N[(N[Sin[N[(phi2 * 0.5), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(t$95$4 * t$95$1), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, -0.25], N[(N[(2.0 * R), $MachinePrecision] * N[ArcTan[N[Sqrt[N[(t$95$3 * t$95$4 + N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision] + N[(N[Sin[phi2], $MachinePrecision] * N[Sin[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] + 0.5), $MachinePrecision] - N[(t$95$3 * t$95$4), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.11], N[(N[(N[ArcTan[N[Sqrt[N[(N[(N[Power[N[Sin[t$95$2], $MachinePrecision], 2.0], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision] + N[Power[N[(t$95$5 * N[Cos[N[(phi2 * -0.5), $MachinePrecision]], $MachinePrecision] + N[(N[Sin[N[(phi2 * -0.5), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$6], $MachinePrecision] * 2.0), $MachinePrecision] * R), $MachinePrecision], N[(N[(N[ArcTan[N[Sqrt[N[(N[(N[(N[(N[Cos[N[(phi2 - phi1), $MachinePrecision]], $MachinePrecision] + N[Cos[N[(phi2 + phi1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-0.5 * N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision] + N[Power[N[Sin[N[(N[(phi1 - phi2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$6], $MachinePrecision] * 2.0), $MachinePrecision] * R), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \left(\phi_1 \cdot 0.5\right)\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_2 := \left(\lambda_1 - \lambda_2\right) \cdot 0.5\\
t_3 := 0.5 - \cos \left(t\_2 \cdot 2\right) \cdot 0.5\\
t_4 := \cos \phi_2 \cdot \cos \phi_1\\
t_5 := \sin \left(\phi_1 \cdot 0.5\right)\\
t_6 := \sqrt{1 - \left({\left(\cos \left(\phi_2 \cdot 0.5\right) \cdot t\_5 - \sin \left(\phi_2 \cdot 0.5\right) \cdot t\_0\right)}^{2} + \left(t\_4 \cdot t\_1\right) \cdot t\_1\right)}\\
\mathbf{if}\;t\_1 \leq -0.25:\\
\;\;\;\;\left(2 \cdot R\right) \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_3, t\_4, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\left(\mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_2 \cdot \sin \phi_1\right) \cdot 0.5 + 0.5\right) - t\_3 \cdot t\_4}}\\

\mathbf{elif}\;t\_1 \leq 0.11:\\
\;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{{\sin t\_2}^{2} \cdot \cos \phi_1 + {\left(\mathsf{fma}\left(t\_5, \cos \left(\phi_2 \cdot -0.5\right), \sin \left(\phi_2 \cdot -0.5\right) \cdot t\_0\right)\right)}^{2}}}{t\_6} \cdot 2\right) \cdot R\\

\mathbf{else}:\\
\;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\frac{\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_2 + \phi_1\right)\right) \cdot \mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right)}{2} + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}}{t\_6} \cdot 2\right) \cdot R\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64))) < -0.25

    1. Initial program 55.7%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites55.8%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Step-by-step derivation
      1. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \color{blue}{\cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      2. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \color{blue}{\left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      3. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)}\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      4. associate-*r*N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \color{blue}{\left(\left(2 \cdot \frac{1}{2}\right) \cdot \left(\phi_1 - \phi_2\right)\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      5. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\color{blue}{1} \cdot \left(\phi_1 - \phi_2\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      6. *-lft-identityN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \color{blue}{\left(\phi_1 - \phi_2\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      7. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \color{blue}{\left(\phi_1 - \phi_2\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      8. cos-diffN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \color{blue}{\left(\cos \phi_1 \cdot \cos \phi_2 + \sin \phi_1 \cdot \sin \phi_2\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      9. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \left(\color{blue}{\cos \phi_1} \cdot \cos \phi_2 + \sin \phi_1 \cdot \sin \phi_2\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      10. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \left(\cos \phi_1 \cdot \color{blue}{\cos \phi_2} + \sin \phi_1 \cdot \sin \phi_2\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      11. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \left(\color{blue}{\cos \phi_2 \cdot \cos \phi_1} + \sin \phi_1 \cdot \sin \phi_2\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      12. lower-fma.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \color{blue}{\mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_1 \cdot \sin \phi_2\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      13. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \color{blue}{\sin \phi_1 \cdot \sin \phi_2}\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      14. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \color{blue}{\sin \phi_1} \cdot \sin \phi_2\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      15. lower-sin.f6457.1

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_1 \cdot \color{blue}{\sin \phi_2}\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    5. Applied rewrites57.1%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \color{blue}{\mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_1 \cdot \sin \phi_2\right)}\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]

    if -0.25 < (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64))) < 0.110000000000000001

    1. Initial program 63.0%

      \[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) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto 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({\color{blue}{\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) \]
      2. lift-/.f64N/A

        \[\leadsto 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 \color{blue}{\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) \]
      3. lift--.f64N/A

        \[\leadsto 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{\color{blue}{\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) \]
      4. div-subN/A

        \[\leadsto 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 \color{blue}{\left(\frac{\phi_1}{2} - \frac{\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) \]
      5. sin-diffN/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      6. lower--.f64N/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      7. lower-*.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      8. lower-sin.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      9. div-invN/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      10. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      11. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      12. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      13. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      14. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      15. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      16. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)}\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) \]
      17. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      18. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      19. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      20. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      21. lower-sin.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin \left(\frac{\phi_2}{2}\right)}\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) \]
      22. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)}\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) \]
      23. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right)\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) \]
      24. lower-*.f6464.6

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot 0.5\right)}\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) \]
    4. Applied rewrites64.6%

      \[\leadsto 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({\color{blue}{\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
    5. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      2. lift-/.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      3. div-invN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\left(\phi_1 - \phi_2\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      4. metadata-evalN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\left(\phi_1 - \phi_2\right) \cdot \color{blue}{\frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      5. *-commutativeN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      6. lift--.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 - \phi_2\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      7. sub-negN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 + \left(\mathsf{neg}\left(\phi_2\right)\right)\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      8. distribute-rgt-inN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} + \left(\mathsf{neg}\left(\phi_2\right)\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      9. lift-*.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\color{blue}{\phi_1 \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\phi_2\right)\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      10. cancel-sign-sub-invN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} - \phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      11. lift-*.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      12. lift-*.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      13. *-commutativeN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \phi_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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      14. cancel-sign-sub-invN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \phi_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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      15. metadata-evalN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \phi_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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      16. *-commutativeN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} + \color{blue}{\phi_2 \cdot \frac{-1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      17. lift-*.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} + \color{blue}{\phi_2 \cdot \frac{-1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      18. sin-sumN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{-1}{2}\right) + \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{-1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      19. lift-sin.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\color{blue}{\sin \left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\phi_2 \cdot \frac{-1}{2}\right) + \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{-1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      20. lower-fma.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\mathsf{fma}\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right), \cos \left(\phi_2 \cdot \frac{-1}{2}\right), \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{-1}{2}\right)\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    6. Applied rewrites88.4%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\mathsf{fma}\left(\sin \left(0.5 \cdot \phi_1\right), \cos \left(-0.5 \cdot \phi_2\right), \cos \left(0.5 \cdot \phi_1\right) \cdot \sin \left(-0.5 \cdot \phi_2\right)\right)\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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
    7. Taylor expanded in phi2 around 0

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \phi_1\right), \cos \left(\frac{-1}{2} \cdot \phi_2\right), \cos \left(\frac{1}{2} \cdot \phi_1\right) \cdot \sin \left(\frac{-1}{2} \cdot \phi_2\right)\right)\right)}^{2} + \color{blue}{\cos \phi_1 \cdot {\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}}}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \phi_1\right), \cos \left(\frac{-1}{2} \cdot \phi_2\right), \cos \left(\frac{1}{2} \cdot \phi_1\right) \cdot \sin \left(\frac{-1}{2} \cdot \phi_2\right)\right)\right)}^{2} + \color{blue}{{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2} \cdot \cos \phi_1}}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      2. lower-*.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \phi_1\right), \cos \left(\frac{-1}{2} \cdot \phi_2\right), \cos \left(\frac{1}{2} \cdot \phi_1\right) \cdot \sin \left(\frac{-1}{2} \cdot \phi_2\right)\right)\right)}^{2} + \color{blue}{{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2} \cdot \cos \phi_1}}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      3. sub-negN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \phi_1\right), \cos \left(\frac{-1}{2} \cdot \phi_2\right), \cos \left(\frac{1}{2} \cdot \phi_1\right) \cdot \sin \left(\frac{-1}{2} \cdot \phi_2\right)\right)\right)}^{2} + {\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)}\right)}^{2} \cdot \cos \phi_1}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      4. neg-mul-1N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \phi_1\right), \cos \left(\frac{-1}{2} \cdot \phi_2\right), \cos \left(\frac{1}{2} \cdot \phi_1\right) \cdot \sin \left(\frac{-1}{2} \cdot \phi_2\right)\right)\right)}^{2} + {\sin \left(\frac{1}{2} \cdot \left(\lambda_1 + \color{blue}{-1 \cdot \lambda_2}\right)\right)}^{2} \cdot \cos \phi_1}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      5. lower-pow.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \phi_1\right), \cos \left(\frac{-1}{2} \cdot \phi_2\right), \cos \left(\frac{1}{2} \cdot \phi_1\right) \cdot \sin \left(\frac{-1}{2} \cdot \phi_2\right)\right)\right)}^{2} + \color{blue}{{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 + -1 \cdot \lambda_2\right)\right)}^{2}} \cdot \cos \phi_1}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      6. lower-sin.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \phi_1\right), \cos \left(\frac{-1}{2} \cdot \phi_2\right), \cos \left(\frac{1}{2} \cdot \phi_1\right) \cdot \sin \left(\frac{-1}{2} \cdot \phi_2\right)\right)\right)}^{2} + {\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 + -1 \cdot \lambda_2\right)\right)}}^{2} \cdot \cos \phi_1}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      7. *-commutativeN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \phi_1\right), \cos \left(\frac{-1}{2} \cdot \phi_2\right), \cos \left(\frac{1}{2} \cdot \phi_1\right) \cdot \sin \left(\frac{-1}{2} \cdot \phi_2\right)\right)\right)}^{2} + {\sin \color{blue}{\left(\left(\lambda_1 + -1 \cdot \lambda_2\right) \cdot \frac{1}{2}\right)}}^{2} \cdot \cos \phi_1}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      8. lower-*.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \phi_1\right), \cos \left(\frac{-1}{2} \cdot \phi_2\right), \cos \left(\frac{1}{2} \cdot \phi_1\right) \cdot \sin \left(\frac{-1}{2} \cdot \phi_2\right)\right)\right)}^{2} + {\sin \color{blue}{\left(\left(\lambda_1 + -1 \cdot \lambda_2\right) \cdot \frac{1}{2}\right)}}^{2} \cdot \cos \phi_1}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      9. neg-mul-1N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \phi_1\right), \cos \left(\frac{-1}{2} \cdot \phi_2\right), \cos \left(\frac{1}{2} \cdot \phi_1\right) \cdot \sin \left(\frac{-1}{2} \cdot \phi_2\right)\right)\right)}^{2} + {\sin \left(\left(\lambda_1 + \color{blue}{\left(\mathsf{neg}\left(\lambda_2\right)\right)}\right) \cdot \frac{1}{2}\right)}^{2} \cdot \cos \phi_1}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      10. sub-negN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \phi_1\right), \cos \left(\frac{-1}{2} \cdot \phi_2\right), \cos \left(\frac{1}{2} \cdot \phi_1\right) \cdot \sin \left(\frac{-1}{2} \cdot \phi_2\right)\right)\right)}^{2} + {\sin \left(\color{blue}{\left(\lambda_1 - \lambda_2\right)} \cdot \frac{1}{2}\right)}^{2} \cdot \cos \phi_1}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      11. lower--.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \phi_1\right), \cos \left(\frac{-1}{2} \cdot \phi_2\right), \cos \left(\frac{1}{2} \cdot \phi_1\right) \cdot \sin \left(\frac{-1}{2} \cdot \phi_2\right)\right)\right)}^{2} + {\sin \left(\color{blue}{\left(\lambda_1 - \lambda_2\right)} \cdot \frac{1}{2}\right)}^{2} \cdot \cos \phi_1}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      12. lower-cos.f6483.3

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(0.5 \cdot \phi_1\right), \cos \left(-0.5 \cdot \phi_2\right), \cos \left(0.5 \cdot \phi_1\right) \cdot \sin \left(-0.5 \cdot \phi_2\right)\right)\right)}^{2} + {\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2} \cdot \color{blue}{\cos \phi_1}}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
    9. Applied rewrites83.3%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(0.5 \cdot \phi_1\right), \cos \left(-0.5 \cdot \phi_2\right), \cos \left(0.5 \cdot \phi_1\right) \cdot \sin \left(-0.5 \cdot \phi_2\right)\right)\right)}^{2} + \color{blue}{{\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2} \cdot \cos \phi_1}}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]

    if 0.110000000000000001 < (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))

    1. Initial program 56.9%

      \[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) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto 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({\color{blue}{\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) \]
      2. lift-/.f64N/A

        \[\leadsto 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 \color{blue}{\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) \]
      3. lift--.f64N/A

        \[\leadsto 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{\color{blue}{\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) \]
      4. div-subN/A

        \[\leadsto 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 \color{blue}{\left(\frac{\phi_1}{2} - \frac{\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) \]
      5. sin-diffN/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      6. lower--.f64N/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      7. lower-*.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      8. lower-sin.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      9. div-invN/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      10. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      11. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      12. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      13. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      14. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      15. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      16. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)}\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) \]
      17. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      18. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      19. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      20. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      21. lower-sin.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin \left(\frac{\phi_2}{2}\right)}\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) \]
      22. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)}\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) \]
      23. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right)\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) \]
      24. lower-*.f6459.1

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot 0.5\right)}\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) \]
    4. Applied rewrites59.1%

      \[\leadsto 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({\color{blue}{\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
    5. Applied rewrites60.2%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \color{blue}{\frac{\mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right) \cdot \left(\cos \left(\phi_2 + \phi_1\right) + \cos \left(\phi_2 - \phi_1\right)\right)}{2}}}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification66.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \leq -0.25:\\ \;\;\;\;\left(2 \cdot R\right) \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\left(\mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_2 \cdot \sin \phi_1\right) \cdot 0.5 + 0.5\right) - \left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}}\\ \mathbf{elif}\;\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \leq 0.11:\\ \;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{{\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2} \cdot \cos \phi_1 + {\left(\mathsf{fma}\left(\sin \left(\phi_1 \cdot 0.5\right), \cos \left(\phi_2 \cdot -0.5\right), \sin \left(\phi_2 \cdot -0.5\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)\right)}^{2}}}{\sqrt{1 - \left({\left(\cos \left(\phi_2 \cdot 0.5\right) \cdot \sin \left(\phi_1 \cdot 0.5\right) - \sin \left(\phi_2 \cdot 0.5\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right)}} \cdot 2\right) \cdot R\\ \mathbf{else}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\frac{\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_2 + \phi_1\right)\right) \cdot \mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right)}{2} + {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2}}}{\sqrt{1 - \left({\left(\cos \left(\phi_2 \cdot 0.5\right) \cdot \sin \left(\phi_1 \cdot 0.5\right) - \sin \left(\phi_2 \cdot 0.5\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right)}} \cdot 2\right) \cdot R\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 61.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\ t_1 := \cos \phi_2 \cdot \cos \phi_1\\ t_2 := {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(t\_1 \cdot t\_0\right) \cdot t\_0\\ t_3 := \left(\lambda_1 - \lambda_2\right) \cdot 0.5\\ t_4 := 0.5 - \cos \left(t\_3 \cdot 2\right) \cdot 0.5\\ \mathbf{if}\;t\_2 \leq 10^{-58}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin t\_3}^{2}, \cos \phi_1, {\sin \left(\phi_1 \cdot 0.5\right)}^{2}\right)}}{\sqrt{1 - t\_2}} \cdot 2\right) \cdot R\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot R\right) \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_4, t\_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\left(\mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_2 \cdot \sin \phi_1\right) \cdot 0.5 + 0.5\right) - t\_4 \cdot t\_1}}\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (sin (/ (- lambda1 lambda2) 2.0)))
        (t_1 (* (cos phi2) (cos phi1)))
        (t_2 (+ (pow (sin (/ (- phi1 phi2) 2.0)) 2.0) (* (* t_1 t_0) t_0)))
        (t_3 (* (- lambda1 lambda2) 0.5))
        (t_4 (- 0.5 (* (cos (* t_3 2.0)) 0.5))))
   (if (<= t_2 1e-58)
     (*
      (*
       (atan2
        (sqrt
         (fma (pow (sin t_3) 2.0) (cos phi1) (pow (sin (* phi1 0.5)) 2.0)))
        (sqrt (- 1.0 t_2)))
       2.0)
      R)
     (*
      (* 2.0 R)
      (atan2
       (sqrt (fma t_4 t_1 (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5))))
       (sqrt
        (-
         (+ (* (fma (cos phi2) (cos phi1) (* (sin phi2) (sin phi1))) 0.5) 0.5)
         (* t_4 t_1))))))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = sin(((lambda1 - lambda2) / 2.0));
	double t_1 = cos(phi2) * cos(phi1);
	double t_2 = pow(sin(((phi1 - phi2) / 2.0)), 2.0) + ((t_1 * t_0) * t_0);
	double t_3 = (lambda1 - lambda2) * 0.5;
	double t_4 = 0.5 - (cos((t_3 * 2.0)) * 0.5);
	double tmp;
	if (t_2 <= 1e-58) {
		tmp = (atan2(sqrt(fma(pow(sin(t_3), 2.0), cos(phi1), pow(sin((phi1 * 0.5)), 2.0))), sqrt((1.0 - t_2))) * 2.0) * R;
	} else {
		tmp = (2.0 * R) * atan2(sqrt(fma(t_4, t_1, (0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt((((fma(cos(phi2), cos(phi1), (sin(phi2) * sin(phi1))) * 0.5) + 0.5) - (t_4 * t_1))));
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	t_1 = Float64(cos(phi2) * cos(phi1))
	t_2 = Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + Float64(Float64(t_1 * t_0) * t_0))
	t_3 = Float64(Float64(lambda1 - lambda2) * 0.5)
	t_4 = Float64(0.5 - Float64(cos(Float64(t_3 * 2.0)) * 0.5))
	tmp = 0.0
	if (t_2 <= 1e-58)
		tmp = Float64(Float64(atan(sqrt(fma((sin(t_3) ^ 2.0), cos(phi1), (sin(Float64(phi1 * 0.5)) ^ 2.0))), sqrt(Float64(1.0 - t_2))) * 2.0) * R);
	else
		tmp = Float64(Float64(2.0 * R) * atan(sqrt(fma(t_4, t_1, Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(Float64(Float64(Float64(fma(cos(phi2), cos(phi1), Float64(sin(phi2) * sin(phi1))) * 0.5) + 0.5) - Float64(t_4 * t_1)))));
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[Sin[N[(N[(phi1 - phi2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(t$95$1 * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$4 = N[(0.5 - N[(N[Cos[N[(t$95$3 * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 1e-58], N[(N[(N[ArcTan[N[Sqrt[N[(N[Power[N[Sin[t$95$3], $MachinePrecision], 2.0], $MachinePrecision] * N[Cos[phi1], $MachinePrecision] + N[Power[N[Sin[N[(phi1 * 0.5), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(1.0 - t$95$2), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * R), $MachinePrecision], N[(N[(2.0 * R), $MachinePrecision] * N[ArcTan[N[Sqrt[N[(t$95$4 * t$95$1 + N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision] + N[(N[Sin[phi2], $MachinePrecision] * N[Sin[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] + 0.5), $MachinePrecision] - N[(t$95$4 * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := \cos \phi_2 \cdot \cos \phi_1\\
t_2 := {\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(t\_1 \cdot t\_0\right) \cdot t\_0\\
t_3 := \left(\lambda_1 - \lambda_2\right) \cdot 0.5\\
t_4 := 0.5 - \cos \left(t\_3 \cdot 2\right) \cdot 0.5\\
\mathbf{if}\;t\_2 \leq 10^{-58}:\\
\;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin t\_3}^{2}, \cos \phi_1, {\sin \left(\phi_1 \cdot 0.5\right)}^{2}\right)}}{\sqrt{1 - t\_2}} \cdot 2\right) \cdot R\\

\mathbf{else}:\\
\;\;\;\;\left(2 \cdot R\right) \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_4, t\_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\left(\mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_2 \cdot \sin \phi_1\right) \cdot 0.5 + 0.5\right) - t\_4 \cdot t\_1}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64))))) < 1e-58

    1. Initial program 66.7%

      \[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) \]
    2. Add Preprocessing
    3. Taylor expanded in phi2 around 0

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\color{blue}{\cos \phi_1 \cdot {\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2} + {\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{2}}}}{\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) \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\color{blue}{{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2} \cdot \cos \phi_1} + {\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{2}}}{\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) \]
      2. lower-fma.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\color{blue}{\mathsf{fma}\left({\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}, \cos \phi_1, {\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{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) \]
      3. sub-negN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)}\right)}^{2}, \cos \phi_1, {\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{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) \]
      4. mul-1-negN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\frac{1}{2} \cdot \left(\lambda_1 + \color{blue}{-1 \cdot \lambda_2}\right)\right)}^{2}, \cos \phi_1, {\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{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) \]
      5. lower-pow.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 + -1 \cdot \lambda_2\right)\right)}^{2}}, \cos \phi_1, {\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{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) \]
      6. lower-sin.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 + -1 \cdot \lambda_2\right)\right)}}^{2}, \cos \phi_1, {\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{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) \]
      7. *-commutativeN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \color{blue}{\left(\left(\lambda_1 + -1 \cdot \lambda_2\right) \cdot \frac{1}{2}\right)}}^{2}, \cos \phi_1, {\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{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) \]
      8. lower-*.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \color{blue}{\left(\left(\lambda_1 + -1 \cdot \lambda_2\right) \cdot \frac{1}{2}\right)}}^{2}, \cos \phi_1, {\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{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) \]
      9. mul-1-negN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 + \color{blue}{\left(\mathsf{neg}\left(\lambda_2\right)\right)}\right) \cdot \frac{1}{2}\right)}^{2}, \cos \phi_1, {\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{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) \]
      10. sub-negN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\color{blue}{\left(\lambda_1 - \lambda_2\right)} \cdot \frac{1}{2}\right)}^{2}, \cos \phi_1, {\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{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) \]
      11. lower--.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\color{blue}{\left(\lambda_1 - \lambda_2\right)} \cdot \frac{1}{2}\right)}^{2}, \cos \phi_1, {\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{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) \]
      12. lower-cos.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)}^{2}, \color{blue}{\cos \phi_1}, {\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{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) \]
      13. lower-pow.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)}^{2}, \cos \phi_1, \color{blue}{{\sin \left(\frac{1}{2} \cdot \phi_1\right)}^{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) \]
      14. lower-sin.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)}^{2}, \cos \phi_1, {\color{blue}{\sin \left(\frac{1}{2} \cdot \phi_1\right)}}^{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) \]
      15. *-commutativeN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)}^{2}, \cos \phi_1, {\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)}}^{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) \]
      16. lower-*.f6473.9

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, \cos \phi_1, {\sin \color{blue}{\left(\phi_1 \cdot 0.5\right)}}^{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) \]
    5. Applied rewrites73.9%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\color{blue}{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, \cos \phi_1, {\sin \left(\phi_1 \cdot 0.5\right)}^{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) \]

    if 1e-58 < (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))))

    1. Initial program 58.0%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites58.3%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Step-by-step derivation
      1. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \color{blue}{\cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      2. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \color{blue}{\left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      3. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)}\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      4. associate-*r*N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \color{blue}{\left(\left(2 \cdot \frac{1}{2}\right) \cdot \left(\phi_1 - \phi_2\right)\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      5. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\color{blue}{1} \cdot \left(\phi_1 - \phi_2\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      6. *-lft-identityN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \color{blue}{\left(\phi_1 - \phi_2\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      7. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \color{blue}{\left(\phi_1 - \phi_2\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      8. cos-diffN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \color{blue}{\left(\cos \phi_1 \cdot \cos \phi_2 + \sin \phi_1 \cdot \sin \phi_2\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      9. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \left(\color{blue}{\cos \phi_1} \cdot \cos \phi_2 + \sin \phi_1 \cdot \sin \phi_2\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      10. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \left(\cos \phi_1 \cdot \color{blue}{\cos \phi_2} + \sin \phi_1 \cdot \sin \phi_2\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      11. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \left(\color{blue}{\cos \phi_2 \cdot \cos \phi_1} + \sin \phi_1 \cdot \sin \phi_2\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      12. lower-fma.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \color{blue}{\mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_1 \cdot \sin \phi_2\right)}\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      13. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \color{blue}{\sin \phi_1 \cdot \sin \phi_2}\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      14. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \color{blue}{\sin \phi_1} \cdot \sin \phi_2\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
      15. lower-sin.f6459.8

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_1 \cdot \color{blue}{\sin \phi_2}\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    5. Applied rewrites59.8%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \color{blue}{\mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_1 \cdot \sin \phi_2\right)}\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \leq 10^{-58}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, \cos \phi_1, {\sin \left(\phi_1 \cdot 0.5\right)}^{2}\right)}}{\sqrt{1 - \left({\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right)}} \cdot 2\right) \cdot R\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot R\right) \cdot \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\left(\mathsf{fma}\left(\cos \phi_2, \cos \phi_1, \sin \phi_2 \cdot \sin \phi_1\right) \cdot 0.5 + 0.5\right) - \left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 59.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\lambda_1 - \lambda_2\right) \cdot 0.5\\ t_1 := \cos \phi_2 \cdot \cos \phi_1\\ t_2 := 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\ t_3 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\ \mathbf{if}\;{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(t\_1 \cdot t\_3\right) \cdot t\_3 \leq 10^{-58}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin t\_0}^{2}, t\_1, t\_2\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(t\_0 \cdot 2\right) \cdot 0.5, t\_1, t\_2\right)}}{\sqrt{\frac{\left(\cos \left(\phi_1 - \phi_2\right) + 1\right) - \left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_2 + \phi_1\right)\right) \cdot \mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right)}{2}}} \cdot \left(2 \cdot R\right)\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (* (- lambda1 lambda2) 0.5))
        (t_1 (* (cos phi2) (cos phi1)))
        (t_2 (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5)))
        (t_3 (sin (/ (- lambda1 lambda2) 2.0))))
   (if (<= (+ (pow (sin (/ (- phi1 phi2) 2.0)) 2.0) (* (* t_1 t_3) t_3)) 1e-58)
     (*
      (atan2
       (sqrt (fma (pow (sin t_0) 2.0) t_1 t_2))
       (sqrt
        (-
         0.5
         (* (- (- 0.5 (* (cos (- lambda2 lambda1)) 0.5)) 0.5) (cos phi1)))))
      (* 2.0 R))
     (*
      (atan2
       (sqrt (fma (- 0.5 (* (cos (* t_0 2.0)) 0.5)) t_1 t_2))
       (sqrt
        (/
         (-
          (+ (cos (- phi1 phi2)) 1.0)
          (*
           (+ (cos (- phi2 phi1)) (cos (+ phi2 phi1)))
           (fma -0.5 (cos (- lambda1 lambda2)) 0.5)))
         2.0)))
      (* 2.0 R)))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = (lambda1 - lambda2) * 0.5;
	double t_1 = cos(phi2) * cos(phi1);
	double t_2 = 0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5);
	double t_3 = sin(((lambda1 - lambda2) / 2.0));
	double tmp;
	if ((pow(sin(((phi1 - phi2) / 2.0)), 2.0) + ((t_1 * t_3) * t_3)) <= 1e-58) {
		tmp = atan2(sqrt(fma(pow(sin(t_0), 2.0), t_1, t_2)), sqrt((0.5 - (((0.5 - (cos((lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * (2.0 * R);
	} else {
		tmp = atan2(sqrt(fma((0.5 - (cos((t_0 * 2.0)) * 0.5)), t_1, t_2)), sqrt((((cos((phi1 - phi2)) + 1.0) - ((cos((phi2 - phi1)) + cos((phi2 + phi1))) * fma(-0.5, cos((lambda1 - lambda2)), 0.5))) / 2.0))) * (2.0 * R);
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = Float64(Float64(lambda1 - lambda2) * 0.5)
	t_1 = Float64(cos(phi2) * cos(phi1))
	t_2 = Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5))
	t_3 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	tmp = 0.0
	if (Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + Float64(Float64(t_1 * t_3) * t_3)) <= 1e-58)
		tmp = Float64(atan(sqrt(fma((sin(t_0) ^ 2.0), t_1, t_2)), sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(cos(Float64(lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * Float64(2.0 * R));
	else
		tmp = Float64(atan(sqrt(fma(Float64(0.5 - Float64(cos(Float64(t_0 * 2.0)) * 0.5)), t_1, t_2)), sqrt(Float64(Float64(Float64(cos(Float64(phi1 - phi2)) + 1.0) - Float64(Float64(cos(Float64(phi2 - phi1)) + cos(Float64(phi2 + phi1))) * fma(-0.5, cos(Float64(lambda1 - lambda2)), 0.5))) / 2.0))) * Float64(2.0 * R));
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[Power[N[Sin[N[(N[(phi1 - phi2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(t$95$1 * t$95$3), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], 1e-58], N[(N[ArcTan[N[Sqrt[N[(N[Power[N[Sin[t$95$0], $MachinePrecision], 2.0], $MachinePrecision] * t$95$1 + t$95$2), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[Sqrt[N[(N[(0.5 - N[(N[Cos[N[(t$95$0 * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] * t$95$1 + t$95$2), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(N[(N[(N[Cos[N[(phi1 - phi2), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision] - N[(N[(N[Cos[N[(phi2 - phi1), $MachinePrecision]], $MachinePrecision] + N[Cos[N[(phi2 + phi1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-0.5 * N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(\lambda_1 - \lambda_2\right) \cdot 0.5\\
t_1 := \cos \phi_2 \cdot \cos \phi_1\\
t_2 := 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\
t_3 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
\mathbf{if}\;{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(t\_1 \cdot t\_3\right) \cdot t\_3 \leq 10^{-58}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin t\_0}^{2}, t\_1, t\_2\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\

\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(t\_0 \cdot 2\right) \cdot 0.5, t\_1, t\_2\right)}}{\sqrt{\frac{\left(\cos \left(\phi_1 - \phi_2\right) + 1\right) - \left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_2 + \phi_1\right)\right) \cdot \mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right)}{2}}} \cdot \left(2 \cdot R\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64))))) < 1e-58

    1. Initial program 66.7%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites19.2%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6419.2

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites19.2%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 - \lambda_2\right)}\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 - \lambda_2\right)}\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      8. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      9. sqr-sin-aN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. div-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. lift-/.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. div-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. lift-/.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Applied rewrites58.7%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{{\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]

    if 1e-58 < (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))))

    1. Initial program 58.0%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites58.3%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Applied rewrites59.4%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{\left(\cos \left(\phi_1 - \phi_2\right) + 1\right) - \mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right) \cdot \left(\cos \left(\phi_2 + \phi_1\right) + \cos \left(\phi_2 - \phi_1\right)\right)}{2}}}} \cdot \left(R \cdot 2\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \leq 10^{-58}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\frac{\left(\cos \left(\phi_1 - \phi_2\right) + 1\right) - \left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_2 + \phi_1\right)\right) \cdot \mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right)}{2}}} \cdot \left(2 \cdot R\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 59.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(\phi_2 - \phi_1\right)\\ t_1 := \cos \phi_2 \cdot \cos \phi_1\\ t_2 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\ t_3 := \cos \left(\lambda_2 - \lambda_1\right)\\ \mathbf{if}\;{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(t\_1 \cdot t\_2\right) \cdot t\_2 \leq 10^{-58}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, t\_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - t\_3 \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_1, \mathsf{fma}\left(t\_3, -0.5, 0.5\right), 0.5\right) - \cos \left(\phi_1 - \phi_2\right) \cdot 0.5}}{\sqrt{1 - \mathsf{fma}\left(t\_0 + \cos \left(\phi_2 + \phi_1\right), -0.25 \cdot t\_3 + 0.25, 0.5 - t\_0 \cdot 0.5\right)}} \cdot 2\right) \cdot R\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (cos (- phi2 phi1)))
        (t_1 (* (cos phi2) (cos phi1)))
        (t_2 (sin (/ (- lambda1 lambda2) 2.0)))
        (t_3 (cos (- lambda2 lambda1))))
   (if (<= (+ (pow (sin (/ (- phi1 phi2) 2.0)) 2.0) (* (* t_1 t_2) t_2)) 1e-58)
     (*
      (atan2
       (sqrt
        (fma
         (pow (sin (* (- lambda1 lambda2) 0.5)) 2.0)
         t_1
         (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5))))
       (sqrt (- 0.5 (* (- (- 0.5 (* t_3 0.5)) 0.5) (cos phi1)))))
      (* 2.0 R))
     (*
      (*
       (atan2
        (sqrt (- (fma t_1 (fma t_3 -0.5 0.5) 0.5) (* (cos (- phi1 phi2)) 0.5)))
        (sqrt
         (-
          1.0
          (fma
           (+ t_0 (cos (+ phi2 phi1)))
           (+ (* -0.25 t_3) 0.25)
           (- 0.5 (* t_0 0.5))))))
       2.0)
      R))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = cos((phi2 - phi1));
	double t_1 = cos(phi2) * cos(phi1);
	double t_2 = sin(((lambda1 - lambda2) / 2.0));
	double t_3 = cos((lambda2 - lambda1));
	double tmp;
	if ((pow(sin(((phi1 - phi2) / 2.0)), 2.0) + ((t_1 * t_2) * t_2)) <= 1e-58) {
		tmp = atan2(sqrt(fma(pow(sin(((lambda1 - lambda2) * 0.5)), 2.0), t_1, (0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt((0.5 - (((0.5 - (t_3 * 0.5)) - 0.5) * cos(phi1))))) * (2.0 * R);
	} else {
		tmp = (atan2(sqrt((fma(t_1, fma(t_3, -0.5, 0.5), 0.5) - (cos((phi1 - phi2)) * 0.5))), sqrt((1.0 - fma((t_0 + cos((phi2 + phi1))), ((-0.25 * t_3) + 0.25), (0.5 - (t_0 * 0.5)))))) * 2.0) * R;
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = cos(Float64(phi2 - phi1))
	t_1 = Float64(cos(phi2) * cos(phi1))
	t_2 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	t_3 = cos(Float64(lambda2 - lambda1))
	tmp = 0.0
	if (Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + Float64(Float64(t_1 * t_2) * t_2)) <= 1e-58)
		tmp = Float64(atan(sqrt(fma((sin(Float64(Float64(lambda1 - lambda2) * 0.5)) ^ 2.0), t_1, Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(t_3 * 0.5)) - 0.5) * cos(phi1))))) * Float64(2.0 * R));
	else
		tmp = Float64(Float64(atan(sqrt(Float64(fma(t_1, fma(t_3, -0.5, 0.5), 0.5) - Float64(cos(Float64(phi1 - phi2)) * 0.5))), sqrt(Float64(1.0 - fma(Float64(t_0 + cos(Float64(phi2 + phi1))), Float64(Float64(-0.25 * t_3) + 0.25), Float64(0.5 - Float64(t_0 * 0.5)))))) * 2.0) * R);
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[Cos[N[(phi2 - phi1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[Power[N[Sin[N[(N[(phi1 - phi2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(t$95$1 * t$95$2), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], 1e-58], N[(N[ArcTan[N[Sqrt[N[(N[Power[N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] * t$95$1 + N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(t$95$3 * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[Sqrt[N[(N[(t$95$1 * N[(t$95$3 * -0.5 + 0.5), $MachinePrecision] + 0.5), $MachinePrecision] - N[(N[Cos[N[(phi1 - phi2), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(1.0 - N[(N[(t$95$0 + N[Cos[N[(phi2 + phi1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(-0.25 * t$95$3), $MachinePrecision] + 0.25), $MachinePrecision] + N[(0.5 - N[(t$95$0 * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * R), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \left(\phi_2 - \phi_1\right)\\
t_1 := \cos \phi_2 \cdot \cos \phi_1\\
t_2 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_3 := \cos \left(\lambda_2 - \lambda_1\right)\\
\mathbf{if}\;{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(t\_1 \cdot t\_2\right) \cdot t\_2 \leq 10^{-58}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, t\_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - t\_3 \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_1, \mathsf{fma}\left(t\_3, -0.5, 0.5\right), 0.5\right) - \cos \left(\phi_1 - \phi_2\right) \cdot 0.5}}{\sqrt{1 - \mathsf{fma}\left(t\_0 + \cos \left(\phi_2 + \phi_1\right), -0.25 \cdot t\_3 + 0.25, 0.5 - t\_0 \cdot 0.5\right)}} \cdot 2\right) \cdot R\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64))))) < 1e-58

    1. Initial program 66.7%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites19.2%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6419.2

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites19.2%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 - \lambda_2\right)}\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 - \lambda_2\right)}\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      8. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      9. sqr-sin-aN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. div-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. lift-/.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. div-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. lift-/.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Applied rewrites58.7%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{{\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]

    if 1e-58 < (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))))

    1. Initial program 58.0%

      \[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) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto 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({\color{blue}{\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) \]
      2. lift-/.f64N/A

        \[\leadsto 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 \color{blue}{\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) \]
      3. lift--.f64N/A

        \[\leadsto 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{\color{blue}{\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) \]
      4. div-subN/A

        \[\leadsto 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 \color{blue}{\left(\frac{\phi_1}{2} - \frac{\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) \]
      5. sin-diffN/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      6. lower--.f64N/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      7. lower-*.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      8. lower-sin.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      9. div-invN/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      10. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      11. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      12. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      13. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      14. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      15. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      16. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)}\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) \]
      17. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      18. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      19. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      20. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      21. lower-sin.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin \left(\frac{\phi_2}{2}\right)}\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) \]
      22. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)}\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) \]
      23. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right)\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) \]
      24. lower-*.f6459.8

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot 0.5\right)}\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) \]
    4. Applied rewrites59.8%

      \[\leadsto 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({\color{blue}{\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
    5. Applied rewrites59.6%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \color{blue}{\frac{\mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right) \cdot \left(\cos \left(\phi_2 + \phi_1\right) + \cos \left(\phi_2 - \phi_1\right)\right)}{2}}}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
    6. Applied rewrites58.6%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \frac{\mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right) \cdot \left(\cos \left(\phi_2 + \phi_1\right) + \cos \left(\phi_2 - \phi_1\right)\right)}{2}}}{\sqrt{1 - \color{blue}{\mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_1 + \phi_2\right), 0.25 + \cos \left(\lambda_2 - \lambda_1\right) \cdot -0.25, 0.5 - \cos \left(\phi_2 - \phi_1\right) \cdot 0.5\right)}}}\right) \]
    7. Applied rewrites58.7%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\color{blue}{\mathsf{fma}\left(\cos \phi_2 \cdot \cos \phi_1, \mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right), 0.5\right) - \cos \left(\phi_1 - \phi_2\right) \cdot 0.5}}}{\sqrt{1 - \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_1 + \phi_2\right), 0.25 + \cos \left(\lambda_2 - \lambda_1\right) \cdot -0.25, 0.5 - \cos \left(\phi_2 - \phi_1\right) \cdot 0.5\right)}}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \leq 10^{-58}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\cos \phi_2 \cdot \cos \phi_1, \mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right), 0.5\right) - \cos \left(\phi_1 - \phi_2\right) \cdot 0.5}}{\sqrt{1 - \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_2 + \phi_1\right), -0.25 \cdot \cos \left(\lambda_2 - \lambda_1\right) + 0.25, 0.5 - \cos \left(\phi_2 - \phi_1\right) \cdot 0.5\right)}} \cdot 2\right) \cdot R\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 58.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \phi_2 \cdot \cos \phi_1\\ t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\ t_2 := \cos \left(\phi_2 - \phi_1\right)\\ t_3 := \cos \left(\lambda_2 - \lambda_1\right)\\ t_4 := \mathsf{fma}\left(t\_3, -0.5, 0.5\right)\\ \mathbf{if}\;{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(t\_0 \cdot t\_1\right) \cdot t\_1 \leq 10^{-58}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, t\_0, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - t\_3 \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_4 \cdot \cos \phi_1, \cos \phi_2, 0.5 - t\_2 \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\left(-\cos \phi_1\right) \cdot \cos \phi_2, t\_4, \mathsf{fma}\left(t\_2, 0.5, 0.5\right)\right)}} \cdot \left(2 \cdot R\right)\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (* (cos phi2) (cos phi1)))
        (t_1 (sin (/ (- lambda1 lambda2) 2.0)))
        (t_2 (cos (- phi2 phi1)))
        (t_3 (cos (- lambda2 lambda1)))
        (t_4 (fma t_3 -0.5 0.5)))
   (if (<= (+ (pow (sin (/ (- phi1 phi2) 2.0)) 2.0) (* (* t_0 t_1) t_1)) 1e-58)
     (*
      (atan2
       (sqrt
        (fma
         (pow (sin (* (- lambda1 lambda2) 0.5)) 2.0)
         t_0
         (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5))))
       (sqrt (- 0.5 (* (- (- 0.5 (* t_3 0.5)) 0.5) (cos phi1)))))
      (* 2.0 R))
     (*
      (atan2
       (sqrt (fma (* t_4 (cos phi1)) (cos phi2) (- 0.5 (* t_2 0.5))))
       (sqrt (fma (* (- (cos phi1)) (cos phi2)) t_4 (fma t_2 0.5 0.5))))
      (* 2.0 R)))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = cos(phi2) * cos(phi1);
	double t_1 = sin(((lambda1 - lambda2) / 2.0));
	double t_2 = cos((phi2 - phi1));
	double t_3 = cos((lambda2 - lambda1));
	double t_4 = fma(t_3, -0.5, 0.5);
	double tmp;
	if ((pow(sin(((phi1 - phi2) / 2.0)), 2.0) + ((t_0 * t_1) * t_1)) <= 1e-58) {
		tmp = atan2(sqrt(fma(pow(sin(((lambda1 - lambda2) * 0.5)), 2.0), t_0, (0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt((0.5 - (((0.5 - (t_3 * 0.5)) - 0.5) * cos(phi1))))) * (2.0 * R);
	} else {
		tmp = atan2(sqrt(fma((t_4 * cos(phi1)), cos(phi2), (0.5 - (t_2 * 0.5)))), sqrt(fma((-cos(phi1) * cos(phi2)), t_4, fma(t_2, 0.5, 0.5)))) * (2.0 * R);
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = Float64(cos(phi2) * cos(phi1))
	t_1 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	t_2 = cos(Float64(phi2 - phi1))
	t_3 = cos(Float64(lambda2 - lambda1))
	t_4 = fma(t_3, -0.5, 0.5)
	tmp = 0.0
	if (Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + Float64(Float64(t_0 * t_1) * t_1)) <= 1e-58)
		tmp = Float64(atan(sqrt(fma((sin(Float64(Float64(lambda1 - lambda2) * 0.5)) ^ 2.0), t_0, Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(t_3 * 0.5)) - 0.5) * cos(phi1))))) * Float64(2.0 * R));
	else
		tmp = Float64(atan(sqrt(fma(Float64(t_4 * cos(phi1)), cos(phi2), Float64(0.5 - Float64(t_2 * 0.5)))), sqrt(fma(Float64(Float64(-cos(phi1)) * cos(phi2)), t_4, fma(t_2, 0.5, 0.5)))) * Float64(2.0 * R));
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(phi2 - phi1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * -0.5 + 0.5), $MachinePrecision]}, If[LessEqual[N[(N[Power[N[Sin[N[(N[(phi1 - phi2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(t$95$0 * t$95$1), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], 1e-58], N[(N[ArcTan[N[Sqrt[N[(N[Power[N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] * t$95$0 + N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(t$95$3 * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[Sqrt[N[(N[(t$95$4 * N[Cos[phi1], $MachinePrecision]), $MachinePrecision] * N[Cos[phi2], $MachinePrecision] + N[(0.5 - N[(t$95$2 * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(N[((-N[Cos[phi1], $MachinePrecision]) * N[Cos[phi2], $MachinePrecision]), $MachinePrecision] * t$95$4 + N[(t$95$2 * 0.5 + 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \phi_2 \cdot \cos \phi_1\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_2 := \cos \left(\phi_2 - \phi_1\right)\\
t_3 := \cos \left(\lambda_2 - \lambda_1\right)\\
t_4 := \mathsf{fma}\left(t\_3, -0.5, 0.5\right)\\
\mathbf{if}\;{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(t\_0 \cdot t\_1\right) \cdot t\_1 \leq 10^{-58}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, t\_0, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - t\_3 \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\

\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_4 \cdot \cos \phi_1, \cos \phi_2, 0.5 - t\_2 \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\left(-\cos \phi_1\right) \cdot \cos \phi_2, t\_4, \mathsf{fma}\left(t\_2, 0.5, 0.5\right)\right)}} \cdot \left(2 \cdot R\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64))))) < 1e-58

    1. Initial program 66.7%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites19.2%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6419.2

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites19.2%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 - \lambda_2\right)}\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 - \lambda_2\right)}\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      8. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      9. sqr-sin-aN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. div-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. lift-/.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. div-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. lift-/.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Applied rewrites58.7%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{{\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]

    if 1e-58 < (+.f64 (pow.f64 (sin.f64 (/.f64 (-.f64 phi1 phi2) #s(literal 2 binary64))) #s(literal 2 binary64)) (*.f64 (*.f64 (*.f64 (cos.f64 phi1) (cos.f64 phi2)) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))) (sin.f64 (/.f64 (-.f64 lambda1 lambda2) #s(literal 2 binary64)))))

    1. Initial program 58.0%

      \[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) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto 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({\color{blue}{\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) \]
      2. lift-/.f64N/A

        \[\leadsto 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 \color{blue}{\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) \]
      3. lift--.f64N/A

        \[\leadsto 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{\color{blue}{\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) \]
      4. div-subN/A

        \[\leadsto 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 \color{blue}{\left(\frac{\phi_1}{2} - \frac{\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) \]
      5. sin-diffN/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      6. lower--.f64N/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      7. lower-*.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      8. lower-sin.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      9. div-invN/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      10. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      11. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      12. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      13. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      14. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      15. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      16. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)}\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) \]
      17. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      18. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      19. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      20. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      21. lower-sin.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin \left(\frac{\phi_2}{2}\right)}\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) \]
      22. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)}\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) \]
      23. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right)\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) \]
      24. lower-*.f6459.8

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot 0.5\right)}\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) \]
    4. Applied rewrites59.8%

      \[\leadsto 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({\color{blue}{\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
    5. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      2. lift-/.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      3. div-invN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\left(\phi_1 - \phi_2\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      4. metadata-evalN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\left(\phi_1 - \phi_2\right) \cdot \color{blue}{\frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      5. *-commutativeN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      6. lift--.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 - \phi_2\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      7. sub-negN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 + \left(\mathsf{neg}\left(\phi_2\right)\right)\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      8. distribute-rgt-inN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} + \left(\mathsf{neg}\left(\phi_2\right)\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      9. lift-*.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\color{blue}{\phi_1 \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\phi_2\right)\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      10. cancel-sign-sub-invN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} - \phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      11. lift-*.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      12. sin-diffN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      13. lift-sin.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\color{blue}{\sin \left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      14. lift-cos.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\cos \left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      15. lift-*.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\color{blue}{\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      16. lift-cos.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      17. lift-sin.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin \left(\phi_2 \cdot \frac{1}{2}\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      18. lift-*.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      19. sub-negN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) + \left(\mathsf{neg}\left(\cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\right)\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
      20. +-commutativeN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\left(\mathsf{neg}\left(\cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\right)\right) + \sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    6. Applied rewrites76.6%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\mathsf{fma}\left(\sin \left(0.5 \cdot \phi_2\right), -\cos \left(0.5 \cdot \phi_1\right), \cos \left(0.5 \cdot \phi_2\right) \cdot \sin \left(0.5 \cdot \phi_1\right)\right)\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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
    7. Applied rewrites58.3%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right) \cdot \cos \phi_1, \cos \phi_2, 0.5 - \cos \left(\phi_2 - \phi_1\right) \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(-\cos \phi_2 \cdot \cos \phi_1, \mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right), \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right), 0.5, 0.5\right)\right)}} \cdot \left(R \cdot 2\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \leq 10^{-58}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right) \cdot \cos \phi_1, \cos \phi_2, 0.5 - \cos \left(\phi_2 - \phi_1\right) \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\left(-\cos \phi_1\right) \cdot \cos \phi_2, \mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right), \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right), 0.5, 0.5\right)\right)}} \cdot \left(2 \cdot R\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 63.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\ t_1 := \cos \left(\phi_1 - \phi_2\right)\\ \left(\tan^{-1}_* \frac{\sqrt{\left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot t\_0\right) \cdot t\_0 + {\left(\mathsf{fma}\left(\sin \left(\phi_1 \cdot 0.5\right), \cos \left(\phi_2 \cdot -0.5\right), \sin \left(\phi_2 \cdot -0.5\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)\right)}^{2}}}{\sqrt{1 - \mathsf{fma}\left(\mathsf{fma}\left(-0.25, \cos \left(\lambda_2 - \lambda_1\right), 0.25\right), t\_1 + \cos \left(\phi_2 + \phi_1\right), \mathsf{fma}\left(t\_1, -0.5, 0.5\right)\right)}} \cdot 2\right) \cdot R \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (sin (/ (- lambda1 lambda2) 2.0))) (t_1 (cos (- phi1 phi2))))
   (*
    (*
     (atan2
      (sqrt
       (+
        (* (* (* (cos phi2) (cos phi1)) t_0) t_0)
        (pow
         (fma
          (sin (* phi1 0.5))
          (cos (* phi2 -0.5))
          (* (sin (* phi2 -0.5)) (cos (* phi1 0.5))))
         2.0)))
      (sqrt
       (-
        1.0
        (fma
         (fma -0.25 (cos (- lambda2 lambda1)) 0.25)
         (+ t_1 (cos (+ phi2 phi1)))
         (fma t_1 -0.5 0.5)))))
     2.0)
    R)))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = sin(((lambda1 - lambda2) / 2.0));
	double t_1 = cos((phi1 - phi2));
	return (atan2(sqrt(((((cos(phi2) * cos(phi1)) * t_0) * t_0) + pow(fma(sin((phi1 * 0.5)), cos((phi2 * -0.5)), (sin((phi2 * -0.5)) * cos((phi1 * 0.5)))), 2.0))), sqrt((1.0 - fma(fma(-0.25, cos((lambda2 - lambda1)), 0.25), (t_1 + cos((phi2 + phi1))), fma(t_1, -0.5, 0.5))))) * 2.0) * R;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	t_1 = cos(Float64(phi1 - phi2))
	return Float64(Float64(atan(sqrt(Float64(Float64(Float64(Float64(cos(phi2) * cos(phi1)) * t_0) * t_0) + (fma(sin(Float64(phi1 * 0.5)), cos(Float64(phi2 * -0.5)), Float64(sin(Float64(phi2 * -0.5)) * cos(Float64(phi1 * 0.5)))) ^ 2.0))), sqrt(Float64(1.0 - fma(fma(-0.25, cos(Float64(lambda2 - lambda1)), 0.25), Float64(t_1 + cos(Float64(phi2 + phi1))), fma(t_1, -0.5, 0.5))))) * 2.0) * R)
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(phi1 - phi2), $MachinePrecision]], $MachinePrecision]}, N[(N[(N[ArcTan[N[Sqrt[N[(N[(N[(N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision] + N[Power[N[(N[Sin[N[(phi1 * 0.5), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(phi2 * -0.5), $MachinePrecision]], $MachinePrecision] + N[(N[Sin[N[(phi2 * -0.5), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(phi1 * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(1.0 - N[(N[(-0.25 * N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] + 0.25), $MachinePrecision] * N[(t$95$1 + N[Cos[N[(phi2 + phi1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * -0.5 + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * R), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := \cos \left(\phi_1 - \phi_2\right)\\
\left(\tan^{-1}_* \frac{\sqrt{\left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot t\_0\right) \cdot t\_0 + {\left(\mathsf{fma}\left(\sin \left(\phi_1 \cdot 0.5\right), \cos \left(\phi_2 \cdot -0.5\right), \sin \left(\phi_2 \cdot -0.5\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)\right)}^{2}}}{\sqrt{1 - \mathsf{fma}\left(\mathsf{fma}\left(-0.25, \cos \left(\lambda_2 - \lambda_1\right), 0.25\right), t\_1 + \cos \left(\phi_2 + \phi_1\right), \mathsf{fma}\left(t\_1, -0.5, 0.5\right)\right)}} \cdot 2\right) \cdot R
\end{array}
\end{array}
Derivation
  1. Initial program 58.4%

    \[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) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-sin.f64N/A

      \[\leadsto 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({\color{blue}{\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) \]
    2. lift-/.f64N/A

      \[\leadsto 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 \color{blue}{\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) \]
    3. lift--.f64N/A

      \[\leadsto 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{\color{blue}{\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) \]
    4. div-subN/A

      \[\leadsto 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 \color{blue}{\left(\frac{\phi_1}{2} - \frac{\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) \]
    5. sin-diffN/A

      \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    6. lower--.f64N/A

      \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    7. lower-*.f64N/A

      \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    8. lower-sin.f64N/A

      \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    9. div-invN/A

      \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    10. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    11. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    12. lower-cos.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    13. div-invN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    14. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    15. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    16. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)}\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) \]
    17. lower-cos.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    18. div-invN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    19. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    20. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    21. lower-sin.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin \left(\frac{\phi_2}{2}\right)}\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) \]
    22. div-invN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)}\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) \]
    23. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right)\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) \]
    24. lower-*.f6460.1

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot 0.5\right)}\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) \]
  4. Applied rewrites60.1%

    \[\leadsto 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({\color{blue}{\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
  5. Step-by-step derivation
    1. lift-sin.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    2. lift-/.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    3. div-invN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\left(\phi_1 - \phi_2\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    4. metadata-evalN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\left(\phi_1 - \phi_2\right) \cdot \color{blue}{\frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    5. *-commutativeN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    6. lift--.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 - \phi_2\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    7. sub-negN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 + \left(\mathsf{neg}\left(\phi_2\right)\right)\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    8. distribute-rgt-inN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} + \left(\mathsf{neg}\left(\phi_2\right)\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    9. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\color{blue}{\phi_1 \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\phi_2\right)\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    10. cancel-sign-sub-invN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} - \phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    11. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    12. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    13. *-commutativeN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \phi_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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    14. cancel-sign-sub-invN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \phi_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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    15. metadata-evalN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \phi_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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    16. *-commutativeN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} + \color{blue}{\phi_2 \cdot \frac{-1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    17. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} + \color{blue}{\phi_2 \cdot \frac{-1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    18. sin-sumN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{-1}{2}\right) + \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{-1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    19. lift-sin.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\color{blue}{\sin \left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\phi_2 \cdot \frac{-1}{2}\right) + \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{-1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    20. lower-fma.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\mathsf{fma}\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right), \cos \left(\phi_2 \cdot \frac{-1}{2}\right), \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{-1}{2}\right)\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
  6. Applied rewrites77.3%

    \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\mathsf{fma}\left(\sin \left(0.5 \cdot \phi_1\right), \cos \left(-0.5 \cdot \phi_2\right), \cos \left(0.5 \cdot \phi_1\right) \cdot \sin \left(-0.5 \cdot \phi_2\right)\right)\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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
  7. Applied rewrites60.4%

    \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(0.5 \cdot \phi_1\right), \cos \left(-0.5 \cdot \phi_2\right), \cos \left(0.5 \cdot \phi_1\right) \cdot \sin \left(-0.5 \cdot \phi_2\right)\right)\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 - \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-0.25, \cos \left(\lambda_2 - \lambda_1\right), 0.25\right), \cos \left(\phi_1 - \phi_2\right) + \cos \left(\phi_2 + \phi_1\right), \mathsf{fma}\left(\cos \left(\phi_1 - \phi_2\right), -0.5, 0.5\right)\right)}}}\right) \]
  8. Final simplification60.4%

    \[\leadsto \left(\tan^{-1}_* \frac{\sqrt{\left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) + {\left(\mathsf{fma}\left(\sin \left(\phi_1 \cdot 0.5\right), \cos \left(\phi_2 \cdot -0.5\right), \sin \left(\phi_2 \cdot -0.5\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)\right)}^{2}}}{\sqrt{1 - \mathsf{fma}\left(\mathsf{fma}\left(-0.25, \cos \left(\lambda_2 - \lambda_1\right), 0.25\right), \cos \left(\phi_1 - \phi_2\right) + \cos \left(\phi_2 + \phi_1\right), \mathsf{fma}\left(\cos \left(\phi_1 - \phi_2\right), -0.5, 0.5\right)\right)}} \cdot 2\right) \cdot R \]
  9. Add Preprocessing

Alternative 10: 63.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\ \left(\tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\phi_2 \cdot 0.5\right), -\cos \left(\phi_1 \cdot 0.5\right), \cos \left(\phi_2 \cdot 0.5\right) \cdot \sin \left(\phi_1 \cdot 0.5\right)\right)\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot t\_0\right) \cdot t\_0}}{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right), \left(-\cos \phi_1\right) \cdot \cos \phi_2, \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right), 0.5, 0.5\right)\right)}} \cdot 2\right) \cdot R \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (sin (/ (- lambda1 lambda2) 2.0))))
   (*
    (*
     (atan2
      (sqrt
       (+
        (pow
         (fma
          (sin (* phi2 0.5))
          (- (cos (* phi1 0.5)))
          (* (cos (* phi2 0.5)) (sin (* phi1 0.5))))
         2.0)
        (* (* (* (cos phi2) (cos phi1)) t_0) t_0)))
      (sqrt
       (fma
        (fma (cos (- lambda2 lambda1)) -0.5 0.5)
        (* (- (cos phi1)) (cos phi2))
        (fma (cos (- phi2 phi1)) 0.5 0.5))))
     2.0)
    R)))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = sin(((lambda1 - lambda2) / 2.0));
	return (atan2(sqrt((pow(fma(sin((phi2 * 0.5)), -cos((phi1 * 0.5)), (cos((phi2 * 0.5)) * sin((phi1 * 0.5)))), 2.0) + (((cos(phi2) * cos(phi1)) * t_0) * t_0))), sqrt(fma(fma(cos((lambda2 - lambda1)), -0.5, 0.5), (-cos(phi1) * cos(phi2)), fma(cos((phi2 - phi1)), 0.5, 0.5)))) * 2.0) * R;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	return Float64(Float64(atan(sqrt(Float64((fma(sin(Float64(phi2 * 0.5)), Float64(-cos(Float64(phi1 * 0.5))), Float64(cos(Float64(phi2 * 0.5)) * sin(Float64(phi1 * 0.5)))) ^ 2.0) + Float64(Float64(Float64(cos(phi2) * cos(phi1)) * t_0) * t_0))), sqrt(fma(fma(cos(Float64(lambda2 - lambda1)), -0.5, 0.5), Float64(Float64(-cos(phi1)) * cos(phi2)), fma(cos(Float64(phi2 - phi1)), 0.5, 0.5)))) * 2.0) * R)
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, N[(N[(N[ArcTan[N[Sqrt[N[(N[Power[N[(N[Sin[N[(phi2 * 0.5), $MachinePrecision]], $MachinePrecision] * (-N[Cos[N[(phi1 * 0.5), $MachinePrecision]], $MachinePrecision]) + N[(N[Cos[N[(phi2 * 0.5), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(phi1 * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(N[(N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] * N[((-N[Cos[phi1], $MachinePrecision]) * N[Cos[phi2], $MachinePrecision]), $MachinePrecision] + N[(N[Cos[N[(phi2 - phi1), $MachinePrecision]], $MachinePrecision] * 0.5 + 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * R), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
\left(\tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\phi_2 \cdot 0.5\right), -\cos \left(\phi_1 \cdot 0.5\right), \cos \left(\phi_2 \cdot 0.5\right) \cdot \sin \left(\phi_1 \cdot 0.5\right)\right)\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot t\_0\right) \cdot t\_0}}{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right), \left(-\cos \phi_1\right) \cdot \cos \phi_2, \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right), 0.5, 0.5\right)\right)}} \cdot 2\right) \cdot R
\end{array}
\end{array}
Derivation
  1. Initial program 58.4%

    \[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) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-sin.f64N/A

      \[\leadsto 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({\color{blue}{\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) \]
    2. lift-/.f64N/A

      \[\leadsto 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 \color{blue}{\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) \]
    3. lift--.f64N/A

      \[\leadsto 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{\color{blue}{\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) \]
    4. div-subN/A

      \[\leadsto 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 \color{blue}{\left(\frac{\phi_1}{2} - \frac{\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) \]
    5. sin-diffN/A

      \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    6. lower--.f64N/A

      \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    7. lower-*.f64N/A

      \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    8. lower-sin.f64N/A

      \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    9. div-invN/A

      \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    10. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    11. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    12. lower-cos.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    13. div-invN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    14. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    15. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    16. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)}\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) \]
    17. lower-cos.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    18. div-invN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    19. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    20. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    21. lower-sin.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin \left(\frac{\phi_2}{2}\right)}\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) \]
    22. div-invN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)}\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) \]
    23. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right)\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) \]
    24. lower-*.f6460.1

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot 0.5\right)}\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) \]
  4. Applied rewrites60.1%

    \[\leadsto 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({\color{blue}{\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
  5. Step-by-step derivation
    1. lift-sin.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    2. lift-/.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    3. div-invN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\left(\phi_1 - \phi_2\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    4. metadata-evalN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\left(\phi_1 - \phi_2\right) \cdot \color{blue}{\frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    5. *-commutativeN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    6. lift--.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 - \phi_2\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    7. sub-negN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 + \left(\mathsf{neg}\left(\phi_2\right)\right)\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    8. distribute-rgt-inN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} + \left(\mathsf{neg}\left(\phi_2\right)\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    9. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\color{blue}{\phi_1 \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\phi_2\right)\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    10. cancel-sign-sub-invN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} - \phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    11. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    12. sin-diffN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    13. lift-sin.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\color{blue}{\sin \left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    14. lift-cos.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\cos \left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    15. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\color{blue}{\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    16. lift-cos.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    17. lift-sin.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin \left(\phi_2 \cdot \frac{1}{2}\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    18. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    19. sub-negN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) + \left(\mathsf{neg}\left(\cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\right)\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    20. +-commutativeN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\left(\mathsf{neg}\left(\cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\right)\right) + \sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
  6. Applied rewrites77.3%

    \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\mathsf{fma}\left(\sin \left(0.5 \cdot \phi_2\right), -\cos \left(0.5 \cdot \phi_1\right), \cos \left(0.5 \cdot \phi_2\right) \cdot \sin \left(0.5 \cdot \phi_1\right)\right)\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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
  7. Applied rewrites59.7%

    \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(0.5 \cdot \phi_2\right), -\cos \left(0.5 \cdot \phi_1\right), \cos \left(0.5 \cdot \phi_2\right) \cdot \sin \left(0.5 \cdot \phi_1\right)\right)\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{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right), -\cos \phi_2 \cdot \cos \phi_1, \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right), 0.5, 0.5\right)\right)}}}\right) \]
  8. Final simplification59.7%

    \[\leadsto \left(\tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(\phi_2 \cdot 0.5\right), -\cos \left(\phi_1 \cdot 0.5\right), \cos \left(\phi_2 \cdot 0.5\right) \cdot \sin \left(\phi_1 \cdot 0.5\right)\right)\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)}}{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right), \left(-\cos \phi_1\right) \cdot \cos \phi_2, \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right), 0.5, 0.5\right)\right)}} \cdot 2\right) \cdot R \]
  9. Add Preprocessing

Alternative 11: 63.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\ t_1 := \cos \phi_2 \cdot \cos \phi_1\\ \left(\tan^{-1}_* \frac{\sqrt{\left(t\_1 \cdot t\_0\right) \cdot t\_0 + {\left(\mathsf{fma}\left(\sin \left(\phi_1 \cdot 0.5\right), \cos \left(\phi_2 \cdot -0.5\right), \sin \left(\phi_2 \cdot -0.5\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)\right)}^{2}}}{\sqrt{1 - \mathsf{fma}\left(\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right), t\_1, \mathsf{fma}\left(\cos \left(\phi_1 - \phi_2\right), -0.5, 0.5\right)\right)}} \cdot 2\right) \cdot R \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (sin (/ (- lambda1 lambda2) 2.0)))
        (t_1 (* (cos phi2) (cos phi1))))
   (*
    (*
     (atan2
      (sqrt
       (+
        (* (* t_1 t_0) t_0)
        (pow
         (fma
          (sin (* phi1 0.5))
          (cos (* phi2 -0.5))
          (* (sin (* phi2 -0.5)) (cos (* phi1 0.5))))
         2.0)))
      (sqrt
       (-
        1.0
        (fma
         (fma (cos (- lambda2 lambda1)) -0.5 0.5)
         t_1
         (fma (cos (- phi1 phi2)) -0.5 0.5)))))
     2.0)
    R)))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = sin(((lambda1 - lambda2) / 2.0));
	double t_1 = cos(phi2) * cos(phi1);
	return (atan2(sqrt((((t_1 * t_0) * t_0) + pow(fma(sin((phi1 * 0.5)), cos((phi2 * -0.5)), (sin((phi2 * -0.5)) * cos((phi1 * 0.5)))), 2.0))), sqrt((1.0 - fma(fma(cos((lambda2 - lambda1)), -0.5, 0.5), t_1, fma(cos((phi1 - phi2)), -0.5, 0.5))))) * 2.0) * R;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	t_1 = Float64(cos(phi2) * cos(phi1))
	return Float64(Float64(atan(sqrt(Float64(Float64(Float64(t_1 * t_0) * t_0) + (fma(sin(Float64(phi1 * 0.5)), cos(Float64(phi2 * -0.5)), Float64(sin(Float64(phi2 * -0.5)) * cos(Float64(phi1 * 0.5)))) ^ 2.0))), sqrt(Float64(1.0 - fma(fma(cos(Float64(lambda2 - lambda1)), -0.5, 0.5), t_1, fma(cos(Float64(phi1 - phi2)), -0.5, 0.5))))) * 2.0) * R)
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, N[(N[(N[ArcTan[N[Sqrt[N[(N[(N[(t$95$1 * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision] + N[Power[N[(N[Sin[N[(phi1 * 0.5), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(phi2 * -0.5), $MachinePrecision]], $MachinePrecision] + N[(N[Sin[N[(phi2 * -0.5), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(phi1 * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(1.0 - N[(N[(N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] * t$95$1 + N[(N[Cos[N[(phi1 - phi2), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * R), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
t_1 := \cos \phi_2 \cdot \cos \phi_1\\
\left(\tan^{-1}_* \frac{\sqrt{\left(t\_1 \cdot t\_0\right) \cdot t\_0 + {\left(\mathsf{fma}\left(\sin \left(\phi_1 \cdot 0.5\right), \cos \left(\phi_2 \cdot -0.5\right), \sin \left(\phi_2 \cdot -0.5\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)\right)}^{2}}}{\sqrt{1 - \mathsf{fma}\left(\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right), t\_1, \mathsf{fma}\left(\cos \left(\phi_1 - \phi_2\right), -0.5, 0.5\right)\right)}} \cdot 2\right) \cdot R
\end{array}
\end{array}
Derivation
  1. Initial program 58.4%

    \[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) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-sin.f64N/A

      \[\leadsto 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({\color{blue}{\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) \]
    2. lift-/.f64N/A

      \[\leadsto 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 \color{blue}{\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) \]
    3. lift--.f64N/A

      \[\leadsto 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{\color{blue}{\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) \]
    4. div-subN/A

      \[\leadsto 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 \color{blue}{\left(\frac{\phi_1}{2} - \frac{\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) \]
    5. sin-diffN/A

      \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    6. lower--.f64N/A

      \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    7. lower-*.f64N/A

      \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    8. lower-sin.f64N/A

      \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    9. div-invN/A

      \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    10. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    11. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    12. lower-cos.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    13. div-invN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    14. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    15. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    16. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)}\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) \]
    17. lower-cos.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    18. div-invN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    19. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    20. lower-*.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
    21. lower-sin.f64N/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin \left(\frac{\phi_2}{2}\right)}\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) \]
    22. div-invN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)}\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) \]
    23. metadata-evalN/A

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right)\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) \]
    24. lower-*.f6460.1

      \[\leadsto 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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot 0.5\right)}\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) \]
  4. Applied rewrites60.1%

    \[\leadsto 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({\color{blue}{\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
  5. Step-by-step derivation
    1. lift-sin.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    2. lift-/.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    3. div-invN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\left(\phi_1 - \phi_2\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    4. metadata-evalN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\left(\phi_1 - \phi_2\right) \cdot \color{blue}{\frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    5. *-commutativeN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    6. lift--.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 - \phi_2\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    7. sub-negN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{1}{2} \cdot \color{blue}{\left(\phi_1 + \left(\mathsf{neg}\left(\phi_2\right)\right)\right)}\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    8. distribute-rgt-inN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} + \left(\mathsf{neg}\left(\phi_2\right)\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    9. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\color{blue}{\phi_1 \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\phi_2\right)\right) \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    10. cancel-sign-sub-invN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} - \phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    11. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    12. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\phi_2 \cdot \frac{1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    13. *-commutativeN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \phi_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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    14. cancel-sign-sub-invN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \phi_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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    15. metadata-evalN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \phi_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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    16. *-commutativeN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} + \color{blue}{\phi_2 \cdot \frac{-1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    17. lift-*.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\phi_1 \cdot \frac{1}{2} + \color{blue}{\phi_2 \cdot \frac{-1}{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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    18. sin-sumN/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{-1}{2}\right) + \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{-1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    19. lift-sin.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\color{blue}{\sin \left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\phi_2 \cdot \frac{-1}{2}\right) + \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{-1}{2}\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
    20. lower-fma.f64N/A

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\mathsf{fma}\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right), \cos \left(\phi_2 \cdot \frac{-1}{2}\right), \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{-1}{2}\right)\right)\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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \frac{1}{2}\right)\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) \]
  6. Applied rewrites77.3%

    \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\color{blue}{\left(\mathsf{fma}\left(\sin \left(0.5 \cdot \phi_1\right), \cos \left(-0.5 \cdot \phi_2\right), \cos \left(0.5 \cdot \phi_1\right) \cdot \sin \left(-0.5 \cdot \phi_2\right)\right)\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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
  7. Applied rewrites59.7%

    \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\left(\mathsf{fma}\left(\sin \left(0.5 \cdot \phi_1\right), \cos \left(-0.5 \cdot \phi_2\right), \cos \left(0.5 \cdot \phi_1\right) \cdot \sin \left(-0.5 \cdot \phi_2\right)\right)\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 - \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, \mathsf{fma}\left(\cos \left(\phi_1 - \phi_2\right), -0.5, 0.5\right)\right)}}}\right) \]
  8. Final simplification59.7%

    \[\leadsto \left(\tan^{-1}_* \frac{\sqrt{\left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) + {\left(\mathsf{fma}\left(\sin \left(\phi_1 \cdot 0.5\right), \cos \left(\phi_2 \cdot -0.5\right), \sin \left(\phi_2 \cdot -0.5\right) \cdot \cos \left(\phi_1 \cdot 0.5\right)\right)\right)}^{2}}}{\sqrt{1 - \mathsf{fma}\left(\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, \mathsf{fma}\left(\cos \left(\phi_1 - \phi_2\right), -0.5, 0.5\right)\right)}} \cdot 2\right) \cdot R \]
  9. Add Preprocessing

Alternative 12: 62.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\phi_1 - \phi_2\right) \cdot 0.5\\ t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\ \left(\tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot t\_1\right) \cdot t\_1}}{\sqrt{1 - \frac{\mathsf{fma}\left(\cos \left(t\_0 - t\_0\right) - \cos \left(t\_0 \cdot 2\right), 2, \left(\left(\cos \left(\phi_1 - \phi_2\right) + \cos \left(\phi_2 + \phi_1\right)\right) \cdot \left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)\right) \cdot 2\right)}{4}}} \cdot 2\right) \cdot R \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (* (- phi1 phi2) 0.5)) (t_1 (sin (/ (- lambda1 lambda2) 2.0))))
   (*
    (*
     (atan2
      (sqrt
       (+
        (pow (sin (/ (- phi1 phi2) 2.0)) 2.0)
        (* (* (* (cos phi2) (cos phi1)) t_1) t_1)))
      (sqrt
       (-
        1.0
        (/
         (fma
          (- (cos (- t_0 t_0)) (cos (* t_0 2.0)))
          2.0
          (*
           (*
            (+ (cos (- phi1 phi2)) (cos (+ phi2 phi1)))
            (- 0.5 (* (cos (* (* (- lambda1 lambda2) 0.5) 2.0)) 0.5)))
           2.0))
         4.0))))
     2.0)
    R)))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = (phi1 - phi2) * 0.5;
	double t_1 = sin(((lambda1 - lambda2) / 2.0));
	return (atan2(sqrt((pow(sin(((phi1 - phi2) / 2.0)), 2.0) + (((cos(phi2) * cos(phi1)) * t_1) * t_1))), sqrt((1.0 - (fma((cos((t_0 - t_0)) - cos((t_0 * 2.0))), 2.0, (((cos((phi1 - phi2)) + cos((phi2 + phi1))) * (0.5 - (cos((((lambda1 - lambda2) * 0.5) * 2.0)) * 0.5))) * 2.0)) / 4.0)))) * 2.0) * R;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = Float64(Float64(phi1 - phi2) * 0.5)
	t_1 = sin(Float64(Float64(lambda1 - lambda2) / 2.0))
	return Float64(Float64(atan(sqrt(Float64((sin(Float64(Float64(phi1 - phi2) / 2.0)) ^ 2.0) + Float64(Float64(Float64(cos(phi2) * cos(phi1)) * t_1) * t_1))), sqrt(Float64(1.0 - Float64(fma(Float64(cos(Float64(t_0 - t_0)) - cos(Float64(t_0 * 2.0))), 2.0, Float64(Float64(Float64(cos(Float64(phi1 - phi2)) + cos(Float64(phi2 + phi1))) * Float64(0.5 - Float64(cos(Float64(Float64(Float64(lambda1 - lambda2) * 0.5) * 2.0)) * 0.5))) * 2.0)) / 4.0)))) * 2.0) * R)
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(N[(lambda1 - lambda2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, N[(N[(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[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(1.0 - N[(N[(N[(N[Cos[N[(t$95$0 - t$95$0), $MachinePrecision]], $MachinePrecision] - N[Cos[N[(t$95$0 * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0 + N[(N[(N[(N[Cos[N[(phi1 - phi2), $MachinePrecision]], $MachinePrecision] + N[Cos[N[(phi2 + phi1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(0.5 - N[(N[Cos[N[(N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * R), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(\phi_1 - \phi_2\right) \cdot 0.5\\
t_1 := \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\\
\left(\tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot t\_1\right) \cdot t\_1}}{\sqrt{1 - \frac{\mathsf{fma}\left(\cos \left(t\_0 - t\_0\right) - \cos \left(t\_0 \cdot 2\right), 2, \left(\left(\cos \left(\phi_1 - \phi_2\right) + \cos \left(\phi_2 + \phi_1\right)\right) \cdot \left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)\right) \cdot 2\right)}{4}}} \cdot 2\right) \cdot R
\end{array}
\end{array}
Derivation
  1. Initial program 58.4%

    \[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) \]
  2. Add Preprocessing
  3. Applied rewrites59.2%

    \[\leadsto 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 - \color{blue}{\frac{\mathsf{fma}\left(\cos \left(0.5 \cdot \left(\phi_1 - \phi_2\right) - 0.5 \cdot \left(\phi_1 - \phi_2\right)\right) - \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right), 2, 2 \cdot \left(\left(\cos \left(\phi_1 - \phi_2\right) + \cos \left(\phi_2 + \phi_1\right)\right) \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right)\right)\right)}{4}}}}\right) \]
  4. Final simplification59.2%

    \[\leadsto \left(\tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \left(\left(\cos \phi_2 \cdot \cos \phi_1\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)}}{\sqrt{1 - \frac{\mathsf{fma}\left(\cos \left(\left(\phi_1 - \phi_2\right) \cdot 0.5 - \left(\phi_1 - \phi_2\right) \cdot 0.5\right) - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right), 2, \left(\left(\cos \left(\phi_1 - \phi_2\right) + \cos \left(\phi_2 + \phi_1\right)\right) \cdot \left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)\right) \cdot 2\right)}{4}}} \cdot 2\right) \cdot R \]
  5. Add Preprocessing

Alternative 13: 59.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \phi_2 \cdot \cos \phi_1\\ t_1 := \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\ t_2 := \left(\lambda_1 - \lambda_2\right) \cdot 0.5\\ \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin t\_2}^{2}, t\_0, 0.5 - t\_1\right)}}{\sqrt{\left(t\_1 + 0.5\right) - \left(0.5 - \cos \left(t\_2 \cdot 2\right) \cdot 0.5\right) \cdot t\_0}} \cdot \left(2 \cdot R\right) \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (* (cos phi2) (cos phi1)))
        (t_1 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5))
        (t_2 (* (- lambda1 lambda2) 0.5)))
   (*
    (atan2
     (sqrt (fma (pow (sin t_2) 2.0) t_0 (- 0.5 t_1)))
     (sqrt (- (+ t_1 0.5) (* (- 0.5 (* (cos (* t_2 2.0)) 0.5)) t_0))))
    (* 2.0 R))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = cos(phi2) * cos(phi1);
	double t_1 = cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5;
	double t_2 = (lambda1 - lambda2) * 0.5;
	return atan2(sqrt(fma(pow(sin(t_2), 2.0), t_0, (0.5 - t_1))), sqrt(((t_1 + 0.5) - ((0.5 - (cos((t_2 * 2.0)) * 0.5)) * t_0)))) * (2.0 * R);
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = Float64(cos(phi2) * cos(phi1))
	t_1 = Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5)
	t_2 = Float64(Float64(lambda1 - lambda2) * 0.5)
	return Float64(atan(sqrt(fma((sin(t_2) ^ 2.0), t_0, Float64(0.5 - t_1))), sqrt(Float64(Float64(t_1 + 0.5) - Float64(Float64(0.5 - Float64(cos(Float64(t_2 * 2.0)) * 0.5)) * t_0)))) * Float64(2.0 * R))
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$2 = N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision]}, N[(N[ArcTan[N[Sqrt[N[(N[Power[N[Sin[t$95$2], $MachinePrecision], 2.0], $MachinePrecision] * t$95$0 + N[(0.5 - t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(N[(t$95$1 + 0.5), $MachinePrecision] - N[(N[(0.5 - N[(N[Cos[N[(t$95$2 * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \phi_2 \cdot \cos \phi_1\\
t_1 := \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\
t_2 := \left(\lambda_1 - \lambda_2\right) \cdot 0.5\\
\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin t\_2}^{2}, t\_0, 0.5 - t\_1\right)}}{\sqrt{\left(t\_1 + 0.5\right) - \left(0.5 - \cos \left(t\_2 \cdot 2\right) \cdot 0.5\right) \cdot t\_0}} \cdot \left(2 \cdot R\right)
\end{array}
\end{array}
Derivation
  1. Initial program 58.4%

    \[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) \]
  2. Add Preprocessing
  3. Applied rewrites56.4%

    \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
  4. Step-by-step derivation
    1. lift--.f64N/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    2. lift-*.f64N/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    3. lift-cos.f64N/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    4. lift-*.f64N/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    5. lift-*.f64N/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    6. *-commutativeN/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    7. metadata-evalN/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    8. div-invN/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\frac{\lambda_1 - \lambda_2}{2}}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    9. lift-/.f64N/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\frac{\lambda_1 - \lambda_2}{2}}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    10. sqr-sin-aN/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    11. lift-sin.f64N/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)} \cdot \sin \left(\frac{\lambda_1 - \lambda_2}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    12. lift-sin.f64N/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \color{blue}{\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    13. pow2N/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{{\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)}^{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    14. lower-pow.f6458.4

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{{\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right)}^{2}}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    15. lift-/.f64N/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)}}^{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    16. div-invN/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)}}^{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    17. metadata-evalN/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right)}^{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    18. *-commutativeN/A

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}}^{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
    19. lift-*.f6458.4

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \color{blue}{\left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}}^{2}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
  5. Applied rewrites58.4%

    \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{{\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right) \]
  6. Final simplification58.4%

    \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\left(\cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5 + 0.5\right) - \left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(2 \cdot R\right) \]
  7. Add Preprocessing

Alternative 14: 60.0% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\lambda_1 - \lambda_2\right) \cdot 0.5\\ t_1 := 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\ t_2 := \mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right)\\ t_3 := \cos \left(\phi_2 - \phi_1\right)\\ t_4 := \cos \left(\lambda_2 - \lambda_1\right)\\ t_5 := \cos \phi_2 \cdot \cos \phi_1\\ \mathbf{if}\;\phi_2 \leq -4.2 \cdot 10^{-7}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_2, \cos \phi_2, {\sin \left(\phi_2 \cdot -0.5\right)}^{2}\right)}}{\sqrt{1 - \mathsf{fma}\left(t\_3 + \cos \left(\phi_2 + \phi_1\right), -0.25 \cdot t\_4 + 0.25, 0.5 - t\_3 \cdot 0.5\right)}} \cdot 2\right) \cdot R\\ \mathbf{elif}\;\phi_2 \leq 9.8 \cdot 10^{+14}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin t\_0}^{2}, t\_5, t\_1\right)}}{\sqrt{0.5 - \left(\left(0.5 - t\_4 \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(t\_0 \cdot 2\right) \cdot 0.5, t\_5, t\_1\right)}}{\sqrt{0.5 - \left(t\_2 - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (* (- lambda1 lambda2) 0.5))
        (t_1 (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5)))
        (t_2 (fma (cos (- lambda1 lambda2)) -0.5 0.5))
        (t_3 (cos (- phi2 phi1)))
        (t_4 (cos (- lambda2 lambda1)))
        (t_5 (* (cos phi2) (cos phi1))))
   (if (<= phi2 -4.2e-7)
     (*
      (*
       (atan2
        (sqrt (fma t_2 (cos phi2) (pow (sin (* phi2 -0.5)) 2.0)))
        (sqrt
         (-
          1.0
          (fma
           (+ t_3 (cos (+ phi2 phi1)))
           (+ (* -0.25 t_4) 0.25)
           (- 0.5 (* t_3 0.5))))))
       2.0)
      R)
     (if (<= phi2 9.8e+14)
       (*
        (atan2
         (sqrt (fma (pow (sin t_0) 2.0) t_5 t_1))
         (sqrt (- 0.5 (* (- (- 0.5 (* t_4 0.5)) 0.5) (cos phi1)))))
        (* 2.0 R))
       (*
        (atan2
         (sqrt (fma (- 0.5 (* (cos (* t_0 2.0)) 0.5)) t_5 t_1))
         (sqrt (- 0.5 (* (- t_2 0.5) (cos phi2)))))
        (* 2.0 R))))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = (lambda1 - lambda2) * 0.5;
	double t_1 = 0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5);
	double t_2 = fma(cos((lambda1 - lambda2)), -0.5, 0.5);
	double t_3 = cos((phi2 - phi1));
	double t_4 = cos((lambda2 - lambda1));
	double t_5 = cos(phi2) * cos(phi1);
	double tmp;
	if (phi2 <= -4.2e-7) {
		tmp = (atan2(sqrt(fma(t_2, cos(phi2), pow(sin((phi2 * -0.5)), 2.0))), sqrt((1.0 - fma((t_3 + cos((phi2 + phi1))), ((-0.25 * t_4) + 0.25), (0.5 - (t_3 * 0.5)))))) * 2.0) * R;
	} else if (phi2 <= 9.8e+14) {
		tmp = atan2(sqrt(fma(pow(sin(t_0), 2.0), t_5, t_1)), sqrt((0.5 - (((0.5 - (t_4 * 0.5)) - 0.5) * cos(phi1))))) * (2.0 * R);
	} else {
		tmp = atan2(sqrt(fma((0.5 - (cos((t_0 * 2.0)) * 0.5)), t_5, t_1)), sqrt((0.5 - ((t_2 - 0.5) * cos(phi2))))) * (2.0 * R);
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = Float64(Float64(lambda1 - lambda2) * 0.5)
	t_1 = Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5))
	t_2 = fma(cos(Float64(lambda1 - lambda2)), -0.5, 0.5)
	t_3 = cos(Float64(phi2 - phi1))
	t_4 = cos(Float64(lambda2 - lambda1))
	t_5 = Float64(cos(phi2) * cos(phi1))
	tmp = 0.0
	if (phi2 <= -4.2e-7)
		tmp = Float64(Float64(atan(sqrt(fma(t_2, cos(phi2), (sin(Float64(phi2 * -0.5)) ^ 2.0))), sqrt(Float64(1.0 - fma(Float64(t_3 + cos(Float64(phi2 + phi1))), Float64(Float64(-0.25 * t_4) + 0.25), Float64(0.5 - Float64(t_3 * 0.5)))))) * 2.0) * R);
	elseif (phi2 <= 9.8e+14)
		tmp = Float64(atan(sqrt(fma((sin(t_0) ^ 2.0), t_5, t_1)), sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(t_4 * 0.5)) - 0.5) * cos(phi1))))) * Float64(2.0 * R));
	else
		tmp = Float64(atan(sqrt(fma(Float64(0.5 - Float64(cos(Float64(t_0 * 2.0)) * 0.5)), t_5, t_1)), sqrt(Float64(0.5 - Float64(Float64(t_2 - 0.5) * cos(phi2))))) * Float64(2.0 * R));
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision]}, Block[{t$95$3 = N[Cos[N[(phi2 - phi1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[phi2, -4.2e-7], N[(N[(N[ArcTan[N[Sqrt[N[(t$95$2 * N[Cos[phi2], $MachinePrecision] + N[Power[N[Sin[N[(phi2 * -0.5), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(1.0 - N[(N[(t$95$3 + N[Cos[N[(phi2 + phi1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(-0.25 * t$95$4), $MachinePrecision] + 0.25), $MachinePrecision] + N[(0.5 - N[(t$95$3 * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * R), $MachinePrecision], If[LessEqual[phi2, 9.8e+14], N[(N[ArcTan[N[Sqrt[N[(N[Power[N[Sin[t$95$0], $MachinePrecision], 2.0], $MachinePrecision] * t$95$5 + t$95$1), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(t$95$4 * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[Sqrt[N[(N[(0.5 - N[(N[Cos[N[(t$95$0 * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] * t$95$5 + t$95$1), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(t$95$2 - 0.5), $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(\lambda_1 - \lambda_2\right) \cdot 0.5\\
t_1 := 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\
t_2 := \mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right)\\
t_3 := \cos \left(\phi_2 - \phi_1\right)\\
t_4 := \cos \left(\lambda_2 - \lambda_1\right)\\
t_5 := \cos \phi_2 \cdot \cos \phi_1\\
\mathbf{if}\;\phi_2 \leq -4.2 \cdot 10^{-7}:\\
\;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_2, \cos \phi_2, {\sin \left(\phi_2 \cdot -0.5\right)}^{2}\right)}}{\sqrt{1 - \mathsf{fma}\left(t\_3 + \cos \left(\phi_2 + \phi_1\right), -0.25 \cdot t\_4 + 0.25, 0.5 - t\_3 \cdot 0.5\right)}} \cdot 2\right) \cdot R\\

\mathbf{elif}\;\phi_2 \leq 9.8 \cdot 10^{+14}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin t\_0}^{2}, t\_5, t\_1\right)}}{\sqrt{0.5 - \left(\left(0.5 - t\_4 \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\

\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(t\_0 \cdot 2\right) \cdot 0.5, t\_5, t\_1\right)}}{\sqrt{0.5 - \left(t\_2 - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if phi2 < -4.2e-7

    1. Initial program 44.9%

      \[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) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-sin.f64N/A

        \[\leadsto 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({\color{blue}{\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) \]
      2. lift-/.f64N/A

        \[\leadsto 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 \color{blue}{\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) \]
      3. lift--.f64N/A

        \[\leadsto 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{\color{blue}{\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) \]
      4. div-subN/A

        \[\leadsto 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 \color{blue}{\left(\frac{\phi_1}{2} - \frac{\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) \]
      5. sin-diffN/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      6. lower--.f64N/A

        \[\leadsto 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({\color{blue}{\left(\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      7. lower-*.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right) \cdot \cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      8. lower-sin.f64N/A

        \[\leadsto 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({\left(\color{blue}{\sin \left(\frac{\phi_1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      9. div-invN/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      10. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      11. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \cos \left(\frac{\phi_2}{2}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      12. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\cos \left(\frac{\phi_2}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      13. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      14. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right) - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      15. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)} - \cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      16. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)}\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) \]
      17. lower-cos.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \color{blue}{\cos \left(\frac{\phi_1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      18. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      19. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      20. lower-*.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \color{blue}{\left(\phi_1 \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{\phi_2}{2}\right)\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) \]
      21. lower-sin.f64N/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \color{blue}{\sin \left(\frac{\phi_2}{2}\right)}\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) \]
      22. div-invN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot \frac{1}{2}\right)}\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) \]
      23. metadata-evalN/A

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \cos \left(\phi_2 \cdot \frac{1}{2}\right) - \cos \left(\phi_1 \cdot \frac{1}{2}\right) \cdot \sin \left(\phi_2 \cdot \color{blue}{\frac{1}{2}}\right)\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) \]
      24. lower-*.f6447.5

        \[\leadsto 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({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \color{blue}{\left(\phi_2 \cdot 0.5\right)}\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) \]
    4. Applied rewrites47.5%

      \[\leadsto 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({\color{blue}{\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
    5. Applied rewrites47.7%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \color{blue}{\frac{\mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right) \cdot \left(\cos \left(\phi_2 + \phi_1\right) + \cos \left(\phi_2 - \phi_1\right)\right)}{2}}}}{\sqrt{1 - \left({\left(\sin \left(\phi_1 \cdot 0.5\right) \cdot \cos \left(\phi_2 \cdot 0.5\right) - \cos \left(\phi_1 \cdot 0.5\right) \cdot \sin \left(\phi_2 \cdot 0.5\right)\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) \]
    6. Applied rewrites46.0%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{{\sin \left(\frac{\phi_1 - \phi_2}{2}\right)}^{2} + \frac{\mathsf{fma}\left(-0.5, \cos \left(\lambda_1 - \lambda_2\right), 0.5\right) \cdot \left(\cos \left(\phi_2 + \phi_1\right) + \cos \left(\phi_2 - \phi_1\right)\right)}{2}}}{\sqrt{1 - \color{blue}{\mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_1 + \phi_2\right), 0.25 + \cos \left(\lambda_2 - \lambda_1\right) \cdot -0.25, 0.5 - \cos \left(\phi_2 - \phi_1\right) \cdot 0.5\right)}}}\right) \]
    7. Taylor expanded in phi1 around 0

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\color{blue}{\cos \phi_2 \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right) + {\sin \left(\frac{-1}{2} \cdot \phi_2\right)}^{2}}}}{\sqrt{1 - \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_1 + \phi_2\right), \frac{1}{4} + \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{-1}{4}, \frac{1}{2} - \cos \left(\phi_2 - \phi_1\right) \cdot \frac{1}{2}\right)}}\right) \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right) \cdot \cos \phi_2} + {\sin \left(\frac{-1}{2} \cdot \phi_2\right)}^{2}}}{\sqrt{1 - \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_1 + \phi_2\right), \frac{1}{4} + \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{-1}{4}, \frac{1}{2} - \cos \left(\phi_2 - \phi_1\right) \cdot \frac{1}{2}\right)}}\right) \]
      2. lower-fma.f64N/A

        \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\color{blue}{\mathsf{fma}\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right), \cos \phi_2, {\sin \left(\frac{-1}{2} \cdot \phi_2\right)}^{2}\right)}}}{\sqrt{1 - \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_1 + \phi_2\right), \frac{1}{4} + \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{-1}{4}, \frac{1}{2} - \cos \left(\phi_2 - \phi_1\right) \cdot \frac{1}{2}\right)}}\right) \]
    9. Applied rewrites47.3%

      \[\leadsto R \cdot \left(2 \cdot \tan^{-1}_* \frac{\sqrt{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right), \cos \phi_2, {\sin \left(-0.5 \cdot \phi_2\right)}^{2}\right)}}}{\sqrt{1 - \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_1 + \phi_2\right), 0.25 + \cos \left(\lambda_2 - \lambda_1\right) \cdot -0.25, 0.5 - \cos \left(\phi_2 - \phi_1\right) \cdot 0.5\right)}}\right) \]

    if -4.2e-7 < phi2 < 9.8e14

    1. Initial program 71.5%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites66.9%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6467.0

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites67.0%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 - \lambda_2\right)}\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 - \lambda_2\right)}\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      8. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      9. sqr-sin-aN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. div-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. lift-/.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. div-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. lift-/.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Applied rewrites70.9%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{{\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]

    if 9.8e14 < phi2

    1. Initial program 45.3%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites45.3%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6422.0

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites22.0%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in phi1 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\phi_2\right)\right)\right) - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    8. Applied rewrites49.5%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_2 \cdot \left(0.5 - \mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\phi_2 \leq -4.2 \cdot 10^{-7}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right), \cos \phi_2, {\sin \left(\phi_2 \cdot -0.5\right)}^{2}\right)}}{\sqrt{1 - \mathsf{fma}\left(\cos \left(\phi_2 - \phi_1\right) + \cos \left(\phi_2 + \phi_1\right), -0.25 \cdot \cos \left(\lambda_2 - \lambda_1\right) + 0.25, 0.5 - \cos \left(\phi_2 - \phi_1\right) \cdot 0.5\right)}} \cdot 2\right) \cdot R\\ \mathbf{elif}\;\phi_2 \leq 9.8 \cdot 10^{+14}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 59.7% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\lambda_1 - \lambda_2\right) \cdot 0.5\\ t_1 := \cos \phi_2 \cdot \cos \phi_1\\ t_2 := 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\ t_3 := \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(t\_0 \cdot 2\right) \cdot 0.5, t\_1, t\_2\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \mathbf{if}\;\phi_2 \leq -1.6 \cdot 10^{-5}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;\phi_2 \leq 9.8 \cdot 10^{+14}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin t\_0}^{2}, t\_1, t\_2\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (* (- lambda1 lambda2) 0.5))
        (t_1 (* (cos phi2) (cos phi1)))
        (t_2 (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5)))
        (t_3
         (*
          (atan2
           (sqrt (fma (- 0.5 (* (cos (* t_0 2.0)) 0.5)) t_1 t_2))
           (sqrt
            (-
             0.5
             (* (- (fma (cos (- lambda1 lambda2)) -0.5 0.5) 0.5) (cos phi2)))))
          (* 2.0 R))))
   (if (<= phi2 -1.6e-5)
     t_3
     (if (<= phi2 9.8e+14)
       (*
        (atan2
         (sqrt (fma (pow (sin t_0) 2.0) t_1 t_2))
         (sqrt
          (-
           0.5
           (* (- (- 0.5 (* (cos (- lambda2 lambda1)) 0.5)) 0.5) (cos phi1)))))
        (* 2.0 R))
       t_3))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = (lambda1 - lambda2) * 0.5;
	double t_1 = cos(phi2) * cos(phi1);
	double t_2 = 0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5);
	double t_3 = atan2(sqrt(fma((0.5 - (cos((t_0 * 2.0)) * 0.5)), t_1, t_2)), sqrt((0.5 - ((fma(cos((lambda1 - lambda2)), -0.5, 0.5) - 0.5) * cos(phi2))))) * (2.0 * R);
	double tmp;
	if (phi2 <= -1.6e-5) {
		tmp = t_3;
	} else if (phi2 <= 9.8e+14) {
		tmp = atan2(sqrt(fma(pow(sin(t_0), 2.0), t_1, t_2)), sqrt((0.5 - (((0.5 - (cos((lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * (2.0 * R);
	} else {
		tmp = t_3;
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = Float64(Float64(lambda1 - lambda2) * 0.5)
	t_1 = Float64(cos(phi2) * cos(phi1))
	t_2 = Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5))
	t_3 = Float64(atan(sqrt(fma(Float64(0.5 - Float64(cos(Float64(t_0 * 2.0)) * 0.5)), t_1, t_2)), sqrt(Float64(0.5 - Float64(Float64(fma(cos(Float64(lambda1 - lambda2)), -0.5, 0.5) - 0.5) * cos(phi2))))) * Float64(2.0 * R))
	tmp = 0.0
	if (phi2 <= -1.6e-5)
		tmp = t_3;
	elseif (phi2 <= 9.8e+14)
		tmp = Float64(atan(sqrt(fma((sin(t_0) ^ 2.0), t_1, t_2)), sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(cos(Float64(lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * Float64(2.0 * R));
	else
		tmp = t_3;
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[N[Sqrt[N[(N[(0.5 - N[(N[Cos[N[(t$95$0 * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] * t$95$1 + t$95$2), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[phi2, -1.6e-5], t$95$3, If[LessEqual[phi2, 9.8e+14], N[(N[ArcTan[N[Sqrt[N[(N[Power[N[Sin[t$95$0], $MachinePrecision], 2.0], $MachinePrecision] * t$95$1 + t$95$2), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(\lambda_1 - \lambda_2\right) \cdot 0.5\\
t_1 := \cos \phi_2 \cdot \cos \phi_1\\
t_2 := 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\
t_3 := \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(t\_0 \cdot 2\right) \cdot 0.5, t\_1, t\_2\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\
\mathbf{if}\;\phi_2 \leq -1.6 \cdot 10^{-5}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;\phi_2 \leq 9.8 \cdot 10^{+14}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin t\_0}^{2}, t\_1, t\_2\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\

\mathbf{else}:\\
\;\;\;\;t\_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if phi2 < -1.59999999999999993e-5 or 9.8e14 < phi2

    1. Initial program 45.1%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites45.8%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6421.7

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites21.7%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in phi1 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\phi_2\right)\right)\right) - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    8. Applied rewrites47.8%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_2 \cdot \left(0.5 - \mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]

    if -1.59999999999999993e-5 < phi2 < 9.8e14

    1. Initial program 71.5%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites66.9%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6467.0

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites67.0%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. lift-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 - \lambda_2\right)}\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\lambda_1 - \lambda_2\right)}\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      8. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      9. sqr-sin-aN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right) \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. div-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. lift-/.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)} \cdot \sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. lower-sin.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \color{blue}{\sin \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \left(\left(\lambda_1 - \lambda_2\right) \cdot \color{blue}{\frac{1}{2}}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. div-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. lift-/.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\sin \left(\frac{\lambda_1 - \lambda_2}{2}\right) \cdot \sin \color{blue}{\left(\frac{\lambda_1 - \lambda_2}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Applied rewrites70.9%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{{\sin \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)}^{2}}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\phi_2 \leq -1.6 \cdot 10^{-5}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \mathbf{elif}\;\phi_2 \leq 9.8 \cdot 10^{+14}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left({\sin \left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right)}^{2}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 57.1% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}\\ t_1 := \cos \phi_2 \cdot \cos \phi_1\\ t_2 := 0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\ \mathbf{if}\;\phi_1 \leq -6 \cdot 10^{+23}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_2, t\_1, 0.5 - \cos \left(\mathsf{fma}\left(\frac{\phi_2}{\phi_1}, -\phi_1, \phi_1\right)\right) \cdot 0.5\right)}}{t\_0} \cdot \left(2 \cdot R\right)\\ \mathbf{elif}\;\phi_1 \leq 0.65:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_2, t\_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_2, t\_1, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{t\_0} \cdot \left(2 \cdot R\right)\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0
         (sqrt
          (-
           0.5
           (* (- (- 0.5 (* (cos (- lambda2 lambda1)) 0.5)) 0.5) (cos phi1)))))
        (t_1 (* (cos phi2) (cos phi1)))
        (t_2 (- 0.5 (* (cos (* (* (- lambda1 lambda2) 0.5) 2.0)) 0.5))))
   (if (<= phi1 -6e+23)
     (*
      (atan2
       (sqrt
        (fma t_2 t_1 (- 0.5 (* (cos (fma (/ phi2 phi1) (- phi1) phi1)) 0.5))))
       t_0)
      (* 2.0 R))
     (if (<= phi1 0.65)
       (*
        (atan2
         (sqrt
          (fma t_2 t_1 (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5))))
         (sqrt
          (-
           0.5
           (* (- (fma (cos (- lambda1 lambda2)) -0.5 0.5) 0.5) (cos phi2)))))
        (* 2.0 R))
       (*
        (atan2 (sqrt (fma t_2 t_1 (- 0.5 (* (cos phi1) 0.5)))) t_0)
        (* 2.0 R))))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = sqrt((0.5 - (((0.5 - (cos((lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))));
	double t_1 = cos(phi2) * cos(phi1);
	double t_2 = 0.5 - (cos((((lambda1 - lambda2) * 0.5) * 2.0)) * 0.5);
	double tmp;
	if (phi1 <= -6e+23) {
		tmp = atan2(sqrt(fma(t_2, t_1, (0.5 - (cos(fma((phi2 / phi1), -phi1, phi1)) * 0.5)))), t_0) * (2.0 * R);
	} else if (phi1 <= 0.65) {
		tmp = atan2(sqrt(fma(t_2, t_1, (0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt((0.5 - ((fma(cos((lambda1 - lambda2)), -0.5, 0.5) - 0.5) * cos(phi2))))) * (2.0 * R);
	} else {
		tmp = atan2(sqrt(fma(t_2, t_1, (0.5 - (cos(phi1) * 0.5)))), t_0) * (2.0 * R);
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(cos(Float64(lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))
	t_1 = Float64(cos(phi2) * cos(phi1))
	t_2 = Float64(0.5 - Float64(cos(Float64(Float64(Float64(lambda1 - lambda2) * 0.5) * 2.0)) * 0.5))
	tmp = 0.0
	if (phi1 <= -6e+23)
		tmp = Float64(atan(sqrt(fma(t_2, t_1, Float64(0.5 - Float64(cos(fma(Float64(phi2 / phi1), Float64(-phi1), phi1)) * 0.5)))), t_0) * Float64(2.0 * R));
	elseif (phi1 <= 0.65)
		tmp = Float64(atan(sqrt(fma(t_2, t_1, Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(Float64(0.5 - Float64(Float64(fma(cos(Float64(lambda1 - lambda2)), -0.5, 0.5) - 0.5) * cos(phi2))))) * Float64(2.0 * R));
	else
		tmp = Float64(atan(sqrt(fma(t_2, t_1, Float64(0.5 - Float64(cos(phi1) * 0.5)))), t_0) * Float64(2.0 * R));
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 - N[(N[Cos[N[(N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[phi1, -6e+23], N[(N[ArcTan[N[Sqrt[N[(t$95$2 * t$95$1 + N[(0.5 - N[(N[Cos[N[(N[(phi2 / phi1), $MachinePrecision] * (-phi1) + phi1), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], If[LessEqual[phi1, 0.65], N[(N[ArcTan[N[Sqrt[N[(t$95$2 * t$95$1 + N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[Sqrt[N[(t$95$2 * t$95$1 + N[(0.5 - N[(N[Cos[phi1], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}\\
t_1 := \cos \phi_2 \cdot \cos \phi_1\\
t_2 := 0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\
\mathbf{if}\;\phi_1 \leq -6 \cdot 10^{+23}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_2, t\_1, 0.5 - \cos \left(\mathsf{fma}\left(\frac{\phi_2}{\phi_1}, -\phi_1, \phi_1\right)\right) \cdot 0.5\right)}}{t\_0} \cdot \left(2 \cdot R\right)\\

\mathbf{elif}\;\phi_1 \leq 0.65:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_2, t\_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\

\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_2, t\_1, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{t\_0} \cdot \left(2 \cdot R\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if phi1 < -6.0000000000000002e23

    1. Initial program 49.5%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites49.5%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6451.4

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites51.4%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in phi1 around -inf

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(-1 \cdot \left(\phi_1 \cdot \left(\frac{\phi_2}{\phi_1} - 1\right)\right)\right)}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(\left(-1 \cdot \phi_1\right) \cdot \left(\frac{\phi_2}{\phi_1} - 1\right)\right)}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. neg-mul-1N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(\color{blue}{\left(\mathsf{neg}\left(\phi_1\right)\right)} \cdot \left(\frac{\phi_2}{\phi_1} - 1\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(\left(\mathsf{neg}\left(\phi_1\right)\right) \cdot \color{blue}{\left(\frac{\phi_2}{\phi_1} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(\left(\mathsf{neg}\left(\phi_1\right)\right) \cdot \left(\frac{\phi_2}{\phi_1} + \color{blue}{-1}\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. distribute-rgt-inN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(\frac{\phi_2}{\phi_1} \cdot \left(\mathsf{neg}\left(\phi_1\right)\right) + -1 \cdot \left(\mathsf{neg}\left(\phi_1\right)\right)\right)}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. neg-mul-1N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{\phi_2}{\phi_1} \cdot \left(\mathsf{neg}\left(\phi_1\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\phi_1\right)\right)\right)\right)}\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. remove-double-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{\phi_2}{\phi_1} \cdot \left(\mathsf{neg}\left(\phi_1\right)\right) + \color{blue}{\phi_1}\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      8. lower-fma.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \color{blue}{\left(\mathsf{fma}\left(\frac{\phi_2}{\phi_1}, \mathsf{neg}\left(\phi_1\right), \phi_1\right)\right)}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      9. lower-/.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(\mathsf{fma}\left(\color{blue}{\frac{\phi_2}{\phi_1}}, \mathsf{neg}\left(\phi_1\right), \phi_1\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-neg.f6451.4

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(\mathsf{fma}\left(\frac{\phi_2}{\phi_1}, \color{blue}{-\phi_1}, \phi_1\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    9. Applied rewrites51.4%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \color{blue}{\left(\mathsf{fma}\left(\frac{\phi_2}{\phi_1}, -\phi_1, \phi_1\right)\right)}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]

    if -6.0000000000000002e23 < phi1 < 0.650000000000000022

    1. Initial program 72.0%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites67.3%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6440.5

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites40.5%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in phi1 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\phi_2\right)\right)\right) - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    8. Applied rewrites67.4%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_2 \cdot \left(0.5 - \mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]

    if 0.650000000000000022 < phi1

    1. Initial program 42.7%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites43.7%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6445.9

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites45.9%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Step-by-step derivation
      1. lower-cos.f6446.6

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    9. Applied rewrites46.6%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\phi_1 \leq -6 \cdot 10^{+23}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\mathsf{fma}\left(\frac{\phi_2}{\phi_1}, -\phi_1, \phi_1\right)\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{elif}\;\phi_1 \leq 0.65:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 57.1% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \phi_2 \cdot \cos \phi_1\\ t_1 := 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\ t_2 := \cos \left(\lambda_2 - \lambda_1\right)\\ t_3 := \sqrt{0.5 - \left(\left(0.5 - t\_2 \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}\\ t_4 := 0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\ \mathbf{if}\;\phi_1 \leq -6 \cdot 10^{+23}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(t\_2, -0.5, 0.5\right), t\_0, t\_1\right)}}{t\_3} \cdot \left(2 \cdot R\right)\\ \mathbf{elif}\;\phi_1 \leq 0.65:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_4, t\_0, t\_1\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_4, t\_0, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{t\_3} \cdot \left(2 \cdot R\right)\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (* (cos phi2) (cos phi1)))
        (t_1 (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5)))
        (t_2 (cos (- lambda2 lambda1)))
        (t_3 (sqrt (- 0.5 (* (- (- 0.5 (* t_2 0.5)) 0.5) (cos phi1)))))
        (t_4 (- 0.5 (* (cos (* (* (- lambda1 lambda2) 0.5) 2.0)) 0.5))))
   (if (<= phi1 -6e+23)
     (* (atan2 (sqrt (fma (fma t_2 -0.5 0.5) t_0 t_1)) t_3) (* 2.0 R))
     (if (<= phi1 0.65)
       (*
        (atan2
         (sqrt (fma t_4 t_0 t_1))
         (sqrt
          (-
           0.5
           (* (- (fma (cos (- lambda1 lambda2)) -0.5 0.5) 0.5) (cos phi2)))))
        (* 2.0 R))
       (*
        (atan2 (sqrt (fma t_4 t_0 (- 0.5 (* (cos phi1) 0.5)))) t_3)
        (* 2.0 R))))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = cos(phi2) * cos(phi1);
	double t_1 = 0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5);
	double t_2 = cos((lambda2 - lambda1));
	double t_3 = sqrt((0.5 - (((0.5 - (t_2 * 0.5)) - 0.5) * cos(phi1))));
	double t_4 = 0.5 - (cos((((lambda1 - lambda2) * 0.5) * 2.0)) * 0.5);
	double tmp;
	if (phi1 <= -6e+23) {
		tmp = atan2(sqrt(fma(fma(t_2, -0.5, 0.5), t_0, t_1)), t_3) * (2.0 * R);
	} else if (phi1 <= 0.65) {
		tmp = atan2(sqrt(fma(t_4, t_0, t_1)), sqrt((0.5 - ((fma(cos((lambda1 - lambda2)), -0.5, 0.5) - 0.5) * cos(phi2))))) * (2.0 * R);
	} else {
		tmp = atan2(sqrt(fma(t_4, t_0, (0.5 - (cos(phi1) * 0.5)))), t_3) * (2.0 * R);
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = Float64(cos(phi2) * cos(phi1))
	t_1 = Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5))
	t_2 = cos(Float64(lambda2 - lambda1))
	t_3 = sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(t_2 * 0.5)) - 0.5) * cos(phi1))))
	t_4 = Float64(0.5 - Float64(cos(Float64(Float64(Float64(lambda1 - lambda2) * 0.5) * 2.0)) * 0.5))
	tmp = 0.0
	if (phi1 <= -6e+23)
		tmp = Float64(atan(sqrt(fma(fma(t_2, -0.5, 0.5), t_0, t_1)), t_3) * Float64(2.0 * R));
	elseif (phi1 <= 0.65)
		tmp = Float64(atan(sqrt(fma(t_4, t_0, t_1)), sqrt(Float64(0.5 - Float64(Float64(fma(cos(Float64(lambda1 - lambda2)), -0.5, 0.5) - 0.5) * cos(phi2))))) * Float64(2.0 * R));
	else
		tmp = Float64(atan(sqrt(fma(t_4, t_0, Float64(0.5 - Float64(cos(phi1) * 0.5)))), t_3) * Float64(2.0 * R));
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(t$95$2 * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(0.5 - N[(N[Cos[N[(N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[phi1, -6e+23], N[(N[ArcTan[N[Sqrt[N[(N[(t$95$2 * -0.5 + 0.5), $MachinePrecision] * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision] / t$95$3], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], If[LessEqual[phi1, 0.65], N[(N[ArcTan[N[Sqrt[N[(t$95$4 * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[Sqrt[N[(t$95$4 * t$95$0 + N[(0.5 - N[(N[Cos[phi1], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$3], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \phi_2 \cdot \cos \phi_1\\
t_1 := 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\
t_2 := \cos \left(\lambda_2 - \lambda_1\right)\\
t_3 := \sqrt{0.5 - \left(\left(0.5 - t\_2 \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}\\
t_4 := 0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\
\mathbf{if}\;\phi_1 \leq -6 \cdot 10^{+23}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(t\_2, -0.5, 0.5\right), t\_0, t\_1\right)}}{t\_3} \cdot \left(2 \cdot R\right)\\

\mathbf{elif}\;\phi_1 \leq 0.65:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_4, t\_0, t\_1\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\

\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_4, t\_0, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{t\_3} \cdot \left(2 \cdot R\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if phi1 < -6.0000000000000002e23

    1. Initial program 49.5%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites49.5%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6451.4

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites51.4%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right)\right) + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)}\right)\right) + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. distribute-lft-neg-inN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2}} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right) + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2} \cdot \cos \color{blue}{\left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      8. lift-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2} \cdot \cos \left(2 \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)}\right) + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      9. associate-*r*N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2} \cdot \cos \color{blue}{\left(\left(2 \cdot \frac{1}{2}\right) \cdot \left(\lambda_1 - \lambda_2\right)\right)} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2} \cdot \cos \left(\color{blue}{1} \cdot \left(\lambda_1 - \lambda_2\right)\right) + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. *-lft-identityN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2} \cdot \cos \color{blue}{\left(\lambda_1 - \lambda_2\right)} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. rem-exp-logN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2} \cdot \cos \color{blue}{\left(e^{\log \left(\lambda_1 - \lambda_2\right)}\right)} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. lift-log.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2} \cdot \cos \left(e^{\color{blue}{\log \left(\lambda_1 - \lambda_2\right)}}\right) + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. lift-exp.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{-1}{2} \cdot \cos \color{blue}{\left(e^{\log \left(\lambda_1 - \lambda_2\right)}\right)} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \left(e^{\log \left(\lambda_1 - \lambda_2\right)}\right) \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. lower-fma.f6414.0

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \left(e^{\log \left(\lambda_1 - \lambda_2\right)}\right), -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Applied rewrites51.4%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]

    if -6.0000000000000002e23 < phi1 < 0.650000000000000022

    1. Initial program 72.0%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites67.3%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6440.5

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites40.5%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in phi1 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\phi_2\right)\right)\right) - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    8. Applied rewrites67.4%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_2 \cdot \left(0.5 - \mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]

    if 0.650000000000000022 < phi1

    1. Initial program 42.7%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites43.7%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6445.9

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites45.9%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Step-by-step derivation
      1. lower-cos.f6446.6

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    9. Applied rewrites46.6%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\phi_1 \leq -6 \cdot 10^{+23}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \left(\lambda_2 - \lambda_1\right), -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{elif}\;\phi_1 \leq 0.65:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 43.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \phi_2 \cdot \cos \phi_1\\ t_1 := 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\ t_2 := \sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}\\ t_3 := \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_2, -0.5, 0.5\right), t\_0, t\_1\right)}}{t\_2} \cdot \left(2 \cdot R\right)\\ t_4 := \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), t\_0, t\_1\right)}\\ \mathbf{if}\;\lambda_2 \leq -1.7 \cdot 10^{-16}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;\lambda_2 \leq 1.5 \cdot 10^{-200}:\\ \;\;\;\;\tan^{-1}_* \frac{t\_4}{t\_2} \cdot \left(2 \cdot R\right)\\ \mathbf{elif}\;\lambda_2 \leq 9.5 \cdot 10^{-10}:\\ \;\;\;\;\tan^{-1}_* \frac{t\_4}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (* (cos phi2) (cos phi1)))
        (t_1 (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5)))
        (t_2
         (sqrt
          (-
           0.5
           (* (- (- 0.5 (* (cos (- lambda2 lambda1)) 0.5)) 0.5) (cos phi1)))))
        (t_3
         (*
          (atan2 (sqrt (fma (fma (cos lambda2) -0.5 0.5) t_0 t_1)) t_2)
          (* 2.0 R)))
        (t_4 (sqrt (fma (fma (cos lambda1) -0.5 0.5) t_0 t_1))))
   (if (<= lambda2 -1.7e-16)
     t_3
     (if (<= lambda2 1.5e-200)
       (* (atan2 t_4 t_2) (* 2.0 R))
       (if (<= lambda2 9.5e-10)
         (*
          (atan2
           t_4
           (sqrt
            (-
             0.5
             (* (- (fma (cos (- lambda1 lambda2)) -0.5 0.5) 0.5) (cos phi2)))))
          (* 2.0 R))
         t_3)))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = cos(phi2) * cos(phi1);
	double t_1 = 0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5);
	double t_2 = sqrt((0.5 - (((0.5 - (cos((lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))));
	double t_3 = atan2(sqrt(fma(fma(cos(lambda2), -0.5, 0.5), t_0, t_1)), t_2) * (2.0 * R);
	double t_4 = sqrt(fma(fma(cos(lambda1), -0.5, 0.5), t_0, t_1));
	double tmp;
	if (lambda2 <= -1.7e-16) {
		tmp = t_3;
	} else if (lambda2 <= 1.5e-200) {
		tmp = atan2(t_4, t_2) * (2.0 * R);
	} else if (lambda2 <= 9.5e-10) {
		tmp = atan2(t_4, sqrt((0.5 - ((fma(cos((lambda1 - lambda2)), -0.5, 0.5) - 0.5) * cos(phi2))))) * (2.0 * R);
	} else {
		tmp = t_3;
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = Float64(cos(phi2) * cos(phi1))
	t_1 = Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5))
	t_2 = sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(cos(Float64(lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))
	t_3 = Float64(atan(sqrt(fma(fma(cos(lambda2), -0.5, 0.5), t_0, t_1)), t_2) * Float64(2.0 * R))
	t_4 = sqrt(fma(fma(cos(lambda1), -0.5, 0.5), t_0, t_1))
	tmp = 0.0
	if (lambda2 <= -1.7e-16)
		tmp = t_3;
	elseif (lambda2 <= 1.5e-200)
		tmp = Float64(atan(t_4, t_2) * Float64(2.0 * R));
	elseif (lambda2 <= 9.5e-10)
		tmp = Float64(atan(t_4, sqrt(Float64(0.5 - Float64(Float64(fma(cos(Float64(lambda1 - lambda2)), -0.5, 0.5) - 0.5) * cos(phi2))))) * Float64(2.0 * R));
	else
		tmp = t_3;
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[N[Sqrt[N[(N[(N[Cos[lambda2], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision] / t$95$2], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(N[(N[Cos[lambda1], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[lambda2, -1.7e-16], t$95$3, If[LessEqual[lambda2, 1.5e-200], N[(N[ArcTan[t$95$4 / t$95$2], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], If[LessEqual[lambda2, 9.5e-10], N[(N[ArcTan[t$95$4 / N[Sqrt[N[(0.5 - N[(N[(N[(N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \phi_2 \cdot \cos \phi_1\\
t_1 := 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\
t_2 := \sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}\\
t_3 := \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_2, -0.5, 0.5\right), t\_0, t\_1\right)}}{t\_2} \cdot \left(2 \cdot R\right)\\
t_4 := \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), t\_0, t\_1\right)}\\
\mathbf{if}\;\lambda_2 \leq -1.7 \cdot 10^{-16}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;\lambda_2 \leq 1.5 \cdot 10^{-200}:\\
\;\;\;\;\tan^{-1}_* \frac{t\_4}{t\_2} \cdot \left(2 \cdot R\right)\\

\mathbf{elif}\;\lambda_2 \leq 9.5 \cdot 10^{-10}:\\
\;\;\;\;\tan^{-1}_* \frac{t\_4}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\

\mathbf{else}:\\
\;\;\;\;t\_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if lambda2 < -1.7e-16 or 9.50000000000000028e-10 < lambda2

    1. Initial program 44.9%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites44.8%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6436.9

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites36.9%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in lambda1 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(\mathsf{neg}\left(\lambda_2\right)\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \left(\mathsf{neg}\left(\lambda_2\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \left(\mathsf{neg}\left(\lambda_2\right)\right) + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \left(\mathsf{neg}\left(\lambda_2\right)\right) \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \left(\mathsf{neg}\left(\lambda_2\right)\right), \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_2}, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower-cos.f6436.8

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_2}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    9. Applied rewrites36.8%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_2, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]

    if -1.7e-16 < lambda2 < 1.49999999999999997e-200

    1. Initial program 77.5%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites74.9%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6458.8

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites58.8%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in lambda2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \lambda_1, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \lambda_1 + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \lambda_1 \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f6458.8

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_1}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    9. Applied rewrites58.8%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]

    if 1.49999999999999997e-200 < lambda2 < 9.50000000000000028e-10

    1. Initial program 67.3%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites60.1%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6442.9

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites42.9%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in lambda2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \lambda_1, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \lambda_1 + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \lambda_1 \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f6442.9

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_1}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    9. Applied rewrites42.9%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    10. Taylor expanded in phi1 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\phi_2\right)\right)\right) - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    11. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\phi_2\right)\right) - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\phi_2\right)\right) - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\frac{1}{2} \cdot \color{blue}{\cos \phi_2} - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_2 \cdot \frac{1}{2}} - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. cancel-sign-sub-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\cos \phi_2 \cdot \frac{1}{2} - \cos \phi_2 \cdot \color{blue}{\left(\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      6. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\cos \phi_2 \cdot \frac{1}{2} - \cos \phi_2 \cdot \left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_2 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_2 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      9. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_2} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_2 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      11. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_2 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right) + \frac{1}{2}\right)}\right)}} \cdot \left(R \cdot 2\right) \]
    12. Applied rewrites54.4%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_2 \cdot \left(0.5 - \mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\lambda_2 \leq -1.7 \cdot 10^{-16}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_2, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{elif}\;\lambda_2 \leq 1.5 \cdot 10^{-200}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{elif}\;\lambda_2 \leq 9.5 \cdot 10^{-10}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_2, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 52.9% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \phi_2 \cdot \cos \phi_1\\ t_1 := \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), t\_0, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \mathbf{if}\;\phi_2 \leq -0.0024:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;\phi_2 \leq 300000:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, t\_0, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (* (cos phi2) (cos phi1)))
        (t_1
         (*
          (atan2
           (sqrt
            (fma
             (fma (cos lambda1) -0.5 0.5)
             t_0
             (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5))))
           (sqrt
            (-
             0.5
             (* (- (fma (cos (- lambda1 lambda2)) -0.5 0.5) 0.5) (cos phi2)))))
          (* 2.0 R))))
   (if (<= phi2 -0.0024)
     t_1
     (if (<= phi2 300000.0)
       (*
        (atan2
         (sqrt
          (fma
           (- 0.5 (* (cos (* (* (- lambda1 lambda2) 0.5) 2.0)) 0.5))
           t_0
           (- 0.5 (* (cos phi1) 0.5))))
         (sqrt
          (-
           0.5
           (* (- (- 0.5 (* (cos (- lambda2 lambda1)) 0.5)) 0.5) (cos phi1)))))
        (* 2.0 R))
       t_1))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = cos(phi2) * cos(phi1);
	double t_1 = atan2(sqrt(fma(fma(cos(lambda1), -0.5, 0.5), t_0, (0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt((0.5 - ((fma(cos((lambda1 - lambda2)), -0.5, 0.5) - 0.5) * cos(phi2))))) * (2.0 * R);
	double tmp;
	if (phi2 <= -0.0024) {
		tmp = t_1;
	} else if (phi2 <= 300000.0) {
		tmp = atan2(sqrt(fma((0.5 - (cos((((lambda1 - lambda2) * 0.5) * 2.0)) * 0.5)), t_0, (0.5 - (cos(phi1) * 0.5)))), sqrt((0.5 - (((0.5 - (cos((lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * (2.0 * R);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = Float64(cos(phi2) * cos(phi1))
	t_1 = Float64(atan(sqrt(fma(fma(cos(lambda1), -0.5, 0.5), t_0, Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(Float64(0.5 - Float64(Float64(fma(cos(Float64(lambda1 - lambda2)), -0.5, 0.5) - 0.5) * cos(phi2))))) * Float64(2.0 * R))
	tmp = 0.0
	if (phi2 <= -0.0024)
		tmp = t_1;
	elseif (phi2 <= 300000.0)
		tmp = Float64(atan(sqrt(fma(Float64(0.5 - Float64(cos(Float64(Float64(Float64(lambda1 - lambda2) * 0.5) * 2.0)) * 0.5)), t_0, Float64(0.5 - Float64(cos(phi1) * 0.5)))), sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(cos(Float64(lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * Float64(2.0 * R));
	else
		tmp = t_1;
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[N[Sqrt[N[(N[(N[Cos[lambda1], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] * t$95$0 + N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[phi2, -0.0024], t$95$1, If[LessEqual[phi2, 300000.0], N[(N[ArcTan[N[Sqrt[N[(N[(0.5 - N[(N[Cos[N[(N[(N[(lambda1 - lambda2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] * t$95$0 + N[(0.5 - N[(N[Cos[phi1], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \phi_2 \cdot \cos \phi_1\\
t_1 := \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), t\_0, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\
\mathbf{if}\;\phi_2 \leq -0.0024:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;\phi_2 \leq 300000:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, t\_0, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if phi2 < -0.00239999999999999979 or 3e5 < phi2

    1. Initial program 44.9%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites45.6%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6421.7

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites21.7%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in lambda2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \lambda_1, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \lambda_1 + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \lambda_1 \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f6421.6

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_1}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    9. Applied rewrites21.6%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    10. Taylor expanded in phi1 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\phi_2\right)\right)\right) - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    11. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\phi_2\right)\right) - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\phi_2\right)\right) - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\frac{1}{2} \cdot \color{blue}{\cos \phi_2} - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_2 \cdot \frac{1}{2}} - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. cancel-sign-sub-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\cos \phi_2 \cdot \frac{1}{2} - \cos \phi_2 \cdot \color{blue}{\left(\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      6. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\cos \phi_2 \cdot \frac{1}{2} - \cos \phi_2 \cdot \left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_2 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_2 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      9. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_2} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_2 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      11. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_2 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right) + \frac{1}{2}\right)}\right)}} \cdot \left(R \cdot 2\right) \]
    12. Applied rewrites38.5%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_2 \cdot \left(0.5 - \mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]

    if -0.00239999999999999979 < phi2 < 3e5

    1. Initial program 71.9%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites67.3%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6467.3

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites67.3%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Step-by-step derivation
      1. lower-cos.f6467.4

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    9. Applied rewrites67.4%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\phi_2 \leq -0.0024:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \mathbf{elif}\;\phi_2 \leq 300000:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - \cos \left(\left(\left(\lambda_1 - \lambda_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 42.0% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \phi_2 \cdot \cos \phi_1\\ t_1 := \mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)\\ t_2 := \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_1, t\_0, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{if}\;\phi_1 \leq -2.2 \cdot 10^{+31}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;\phi_1 \leq 0.0031:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_1, t\_0, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (* (cos phi2) (cos phi1)))
        (t_1 (fma (cos lambda1) -0.5 0.5))
        (t_2
         (*
          (atan2
           (sqrt (fma t_1 t_0 (- 0.5 (* (cos phi1) 0.5))))
           (sqrt
            (-
             0.5
             (*
              (- (- 0.5 (* (cos (- lambda2 lambda1)) 0.5)) 0.5)
              (cos phi1)))))
          (* 2.0 R))))
   (if (<= phi1 -2.2e+31)
     t_2
     (if (<= phi1 0.0031)
       (*
        (atan2
         (sqrt
          (fma t_1 t_0 (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5))))
         (sqrt
          (-
           0.5
           (* (- (fma (cos (- lambda1 lambda2)) -0.5 0.5) 0.5) (cos phi2)))))
        (* 2.0 R))
       t_2))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = cos(phi2) * cos(phi1);
	double t_1 = fma(cos(lambda1), -0.5, 0.5);
	double t_2 = atan2(sqrt(fma(t_1, t_0, (0.5 - (cos(phi1) * 0.5)))), sqrt((0.5 - (((0.5 - (cos((lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * (2.0 * R);
	double tmp;
	if (phi1 <= -2.2e+31) {
		tmp = t_2;
	} else if (phi1 <= 0.0031) {
		tmp = atan2(sqrt(fma(t_1, t_0, (0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt((0.5 - ((fma(cos((lambda1 - lambda2)), -0.5, 0.5) - 0.5) * cos(phi2))))) * (2.0 * R);
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = Float64(cos(phi2) * cos(phi1))
	t_1 = fma(cos(lambda1), -0.5, 0.5)
	t_2 = Float64(atan(sqrt(fma(t_1, t_0, Float64(0.5 - Float64(cos(phi1) * 0.5)))), sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(cos(Float64(lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * Float64(2.0 * R))
	tmp = 0.0
	if (phi1 <= -2.2e+31)
		tmp = t_2;
	elseif (phi1 <= 0.0031)
		tmp = Float64(atan(sqrt(fma(t_1, t_0, Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(Float64(0.5 - Float64(Float64(fma(cos(Float64(lambda1 - lambda2)), -0.5, 0.5) - 0.5) * cos(phi2))))) * Float64(2.0 * R));
	else
		tmp = t_2;
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[lambda1], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[N[Sqrt[N[(t$95$1 * t$95$0 + N[(0.5 - N[(N[Cos[phi1], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[phi1, -2.2e+31], t$95$2, If[LessEqual[phi1, 0.0031], N[(N[ArcTan[N[Sqrt[N[(t$95$1 * t$95$0 + N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \phi_2 \cdot \cos \phi_1\\
t_1 := \mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)\\
t_2 := \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_1, t\_0, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\
\mathbf{if}\;\phi_1 \leq -2.2 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;\phi_1 \leq 0.0031:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_1, t\_0, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if phi1 < -2.2000000000000001e31 or 0.00309999999999999989 < phi1

    1. Initial program 45.4%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites46.0%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6448.1

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites48.1%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in lambda2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \lambda_1, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \lambda_1 + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \lambda_1 \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f6439.2

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_1}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    9. Applied rewrites39.2%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    10. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    11. Step-by-step derivation
      1. lower-cos.f6439.7

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    12. Applied rewrites39.7%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]

    if -2.2000000000000001e31 < phi1 < 0.00309999999999999989

    1. Initial program 71.8%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites67.2%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6440.8

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites40.8%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in lambda2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \lambda_1, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \lambda_1 + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \lambda_1 \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f6431.7

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_1}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    9. Applied rewrites31.7%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    10. Taylor expanded in phi1 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\phi_2\right)\right)\right) - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    11. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\phi_2\right)\right) - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \left(\mathsf{neg}\left(\phi_2\right)\right) - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\frac{1}{2} \cdot \color{blue}{\cos \phi_2} - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_2 \cdot \frac{1}{2}} - \cos \phi_2 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. cancel-sign-sub-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\cos \phi_2 \cdot \frac{1}{2} - \cos \phi_2 \cdot \color{blue}{\left(\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      6. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\cos \phi_2 \cdot \frac{1}{2} - \cos \phi_2 \cdot \left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_2 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_2 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      9. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_2} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_2 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      11. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_2 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{-1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right) + \frac{1}{2}\right)}\right)}} \cdot \left(R \cdot 2\right) \]
    12. Applied rewrites49.2%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_2 \cdot \left(0.5 - \mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\phi_1 \leq -2.2 \cdot 10^{+31}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{elif}\;\phi_1 \leq 0.0031:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), -0.5, 0.5\right) - 0.5\right) \cdot \cos \phi_2}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 32.9% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \phi_2 \cdot \cos \phi_1\\ t_1 := \mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)\\ t_2 := \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_1, t\_0, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{if}\;\phi_1 \leq -2.2 \cdot 10^{+31}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;\phi_1 \leq 0.00235:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_1, t\_0, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), 0.5, 0.5\right)}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (R lambda1 lambda2 phi1 phi2)
 :precision binary64
 (let* ((t_0 (* (cos phi2) (cos phi1)))
        (t_1 (fma (cos lambda1) -0.5 0.5))
        (t_2
         (*
          (atan2
           (sqrt (fma t_1 t_0 (- 0.5 (* (cos phi1) 0.5))))
           (sqrt
            (-
             0.5
             (*
              (- (- 0.5 (* (cos (- lambda2 lambda1)) 0.5)) 0.5)
              (cos phi1)))))
          (* 2.0 R))))
   (if (<= phi1 -2.2e+31)
     t_2
     (if (<= phi1 0.00235)
       (*
        (atan2
         (sqrt
          (fma t_1 t_0 (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5))))
         (sqrt (fma (cos (- lambda1 lambda2)) 0.5 0.5)))
        (* 2.0 R))
       t_2))))
double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
	double t_0 = cos(phi2) * cos(phi1);
	double t_1 = fma(cos(lambda1), -0.5, 0.5);
	double t_2 = atan2(sqrt(fma(t_1, t_0, (0.5 - (cos(phi1) * 0.5)))), sqrt((0.5 - (((0.5 - (cos((lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * (2.0 * R);
	double tmp;
	if (phi1 <= -2.2e+31) {
		tmp = t_2;
	} else if (phi1 <= 0.00235) {
		tmp = atan2(sqrt(fma(t_1, t_0, (0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(fma(cos((lambda1 - lambda2)), 0.5, 0.5))) * (2.0 * R);
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(R, lambda1, lambda2, phi1, phi2)
	t_0 = Float64(cos(phi2) * cos(phi1))
	t_1 = fma(cos(lambda1), -0.5, 0.5)
	t_2 = Float64(atan(sqrt(fma(t_1, t_0, Float64(0.5 - Float64(cos(phi1) * 0.5)))), sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(cos(Float64(lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * Float64(2.0 * R))
	tmp = 0.0
	if (phi1 <= -2.2e+31)
		tmp = t_2;
	elseif (phi1 <= 0.00235)
		tmp = Float64(atan(sqrt(fma(t_1, t_0, Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(fma(cos(Float64(lambda1 - lambda2)), 0.5, 0.5))) * Float64(2.0 * R));
	else
		tmp = t_2;
	end
	return tmp
end
code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[lambda1], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[N[Sqrt[N[(t$95$1 * t$95$0 + N[(0.5 - N[(N[Cos[phi1], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[phi1, -2.2e+31], t$95$2, If[LessEqual[phi1, 0.00235], N[(N[ArcTan[N[Sqrt[N[(t$95$1 * t$95$0 + N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision] * 0.5 + 0.5), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \phi_2 \cdot \cos \phi_1\\
t_1 := \mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)\\
t_2 := \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_1, t\_0, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\
\mathbf{if}\;\phi_1 \leq -2.2 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;\phi_1 \leq 0.00235:\\
\;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_1, t\_0, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), 0.5, 0.5\right)}} \cdot \left(2 \cdot R\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if phi1 < -2.2000000000000001e31 or 0.00235000000000000009 < phi1

    1. Initial program 45.4%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites46.0%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6448.1

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites48.1%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in lambda2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \lambda_1, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \lambda_1 + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \lambda_1 \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f6439.2

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_1}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    9. Applied rewrites39.2%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    10. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    11. Step-by-step derivation
      1. lower-cos.f6439.7

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    12. Applied rewrites39.7%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]

    if -2.2000000000000001e31 < phi1 < 0.00235000000000000009

    1. Initial program 71.8%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites67.2%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6440.8

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites40.8%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in lambda2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \lambda_1, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \lambda_1 + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \lambda_1 \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f6431.7

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_1}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    9. Applied rewrites31.7%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    10. Taylor expanded in phi1 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\frac{1}{2} \cdot \cos \left(\lambda_2 - \lambda_1\right)}}} \cdot \left(R \cdot 2\right) \]
    11. Step-by-step derivation
      1. Applied rewrites31.8%

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), \color{blue}{0.5}, 0.5\right)}} \cdot \left(R \cdot 2\right) \]
    12. Recombined 2 regimes into one program.
    13. Final simplification35.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\phi_1 \leq -2.2 \cdot 10^{+31}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{elif}\;\phi_1 \leq 0.00235:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), 0.5, 0.5\right)}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \end{array} \]
    14. Add Preprocessing

    Alternative 22: 31.8% accurate, 1.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \phi_2 \cdot \cos \phi_1\\ t_1 := \sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}\\ t_2 := \mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)\\ \mathbf{if}\;\phi_2 \leq -0.00245:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_2, t\_0, 0.5 - \cos \phi_2 \cdot 0.5\right)}}{t\_1} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_2, t\_0, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{t\_1} \cdot \left(2 \cdot R\right)\\ \end{array} \end{array} \]
    (FPCore (R lambda1 lambda2 phi1 phi2)
     :precision binary64
     (let* ((t_0 (* (cos phi2) (cos phi1)))
            (t_1
             (sqrt
              (-
               0.5
               (* (- (- 0.5 (* (cos (- lambda2 lambda1)) 0.5)) 0.5) (cos phi1)))))
            (t_2 (fma (cos lambda1) -0.5 0.5)))
       (if (<= phi2 -0.00245)
         (* (atan2 (sqrt (fma t_2 t_0 (- 0.5 (* (cos phi2) 0.5)))) t_1) (* 2.0 R))
         (*
          (atan2 (sqrt (fma t_2 t_0 (- 0.5 (* (cos phi1) 0.5)))) t_1)
          (* 2.0 R)))))
    double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
    	double t_0 = cos(phi2) * cos(phi1);
    	double t_1 = sqrt((0.5 - (((0.5 - (cos((lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))));
    	double t_2 = fma(cos(lambda1), -0.5, 0.5);
    	double tmp;
    	if (phi2 <= -0.00245) {
    		tmp = atan2(sqrt(fma(t_2, t_0, (0.5 - (cos(phi2) * 0.5)))), t_1) * (2.0 * R);
    	} else {
    		tmp = atan2(sqrt(fma(t_2, t_0, (0.5 - (cos(phi1) * 0.5)))), t_1) * (2.0 * R);
    	}
    	return tmp;
    }
    
    function code(R, lambda1, lambda2, phi1, phi2)
    	t_0 = Float64(cos(phi2) * cos(phi1))
    	t_1 = sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(cos(Float64(lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))
    	t_2 = fma(cos(lambda1), -0.5, 0.5)
    	tmp = 0.0
    	if (phi2 <= -0.00245)
    		tmp = Float64(atan(sqrt(fma(t_2, t_0, Float64(0.5 - Float64(cos(phi2) * 0.5)))), t_1) * Float64(2.0 * R));
    	else
    		tmp = Float64(atan(sqrt(fma(t_2, t_0, Float64(0.5 - Float64(cos(phi1) * 0.5)))), t_1) * Float64(2.0 * R));
    	end
    	return tmp
    end
    
    code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Cos[lambda1], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision]}, If[LessEqual[phi2, -0.00245], N[(N[ArcTan[N[Sqrt[N[(t$95$2 * t$95$0 + N[(0.5 - N[(N[Cos[phi2], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[Sqrt[N[(t$95$2 * t$95$0 + N[(0.5 - N[(N[Cos[phi1], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \cos \phi_2 \cdot \cos \phi_1\\
    t_1 := \sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}\\
    t_2 := \mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)\\
    \mathbf{if}\;\phi_2 \leq -0.00245:\\
    \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_2, t\_0, 0.5 - \cos \phi_2 \cdot 0.5\right)}}{t\_1} \cdot \left(2 \cdot R\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(t\_2, t\_0, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{t\_1} \cdot \left(2 \cdot R\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if phi2 < -0.0024499999999999999

      1. Initial program 44.9%

        \[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) \]
      2. Add Preprocessing
      3. Applied rewrites46.1%

        \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
      4. Taylor expanded in phi2 around 0

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. Step-by-step derivation
        1. associate--l+N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
        2. lower-+.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
        3. *-commutativeN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
        4. distribute-lft-out--N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
        5. lower-*.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
        6. lower-cos.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
        7. lower--.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
        8. lower--.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
        9. *-commutativeN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        10. lower-*.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        11. sub-negN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        12. +-commutativeN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        13. neg-sub0N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        14. associate-+l-N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        15. unsub-negN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        16. mul-1-negN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        17. neg-sub0N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        18. cos-negN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        19. lower-cos.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        20. mul-1-negN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        21. unsub-negN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        22. lower--.f6421.5

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. Applied rewrites21.5%

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      7. Taylor expanded in lambda2 around 0

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      8. Step-by-step derivation
        1. cancel-sign-sub-invN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        2. metadata-evalN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \lambda_1, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        3. +-commutativeN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \lambda_1 + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        4. *-commutativeN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \lambda_1 \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        5. lower-fma.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        6. lower-cos.f6421.3

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_1}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
      9. Applied rewrites21.3%

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. Taylor expanded in phi1 around 0

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \left(\mathsf{neg}\left(\phi_2\right)\right)}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. Step-by-step derivation
        1. cos-negN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \phi_2}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        2. lower-cos.f6421.8

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_2}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. Applied rewrites21.8%

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_2}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]

      if -0.0024499999999999999 < phi2

      1. Initial program 64.0%

        \[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) \]
      2. Add Preprocessing
      3. Applied rewrites60.7%

        \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
      4. Taylor expanded in phi2 around 0

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. Step-by-step derivation
        1. associate--l+N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
        2. lower-+.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
        3. *-commutativeN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
        4. distribute-lft-out--N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
        5. lower-*.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
        6. lower-cos.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
        7. lower--.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
        8. lower--.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
        9. *-commutativeN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        10. lower-*.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        11. sub-negN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        12. +-commutativeN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        13. neg-sub0N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        14. associate-+l-N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        15. unsub-negN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        16. mul-1-negN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        17. neg-sub0N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        18. cos-negN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        19. lower-cos.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        20. mul-1-negN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        21. unsub-negN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        22. lower--.f6454.1

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. Applied rewrites54.1%

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      7. Taylor expanded in lambda2 around 0

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      8. Step-by-step derivation
        1. cancel-sign-sub-invN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        2. metadata-evalN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \lambda_1, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        3. +-commutativeN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \lambda_1 + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        4. *-commutativeN/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \lambda_1 \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        5. lower-fma.f64N/A

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        6. lower-cos.f6441.4

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_1}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
      9. Applied rewrites41.4%

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. Taylor expanded in phi2 around 0

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. Step-by-step derivation
        1. lower-cos.f6439.5

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. Applied rewrites39.5%

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \color{blue}{\cos \phi_1}\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification34.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\phi_2 \leq -0.00245:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \phi_2 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \phi_1 \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 23: 33.4% accurate, 1.9× speedup?

    \[\begin{array}{l} \\ \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\cos \phi_1 \cdot 0.5, \cos \lambda_1, 0.5\right)}} \cdot \left(2 \cdot R\right) \end{array} \]
    (FPCore (R lambda1 lambda2 phi1 phi2)
     :precision binary64
     (*
      (atan2
       (sqrt
        (fma
         (fma (cos lambda1) -0.5 0.5)
         (* (cos phi2) (cos phi1))
         (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5))))
       (sqrt (fma (* (cos phi1) 0.5) (cos lambda1) 0.5)))
      (* 2.0 R)))
    double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
    	return atan2(sqrt(fma(fma(cos(lambda1), -0.5, 0.5), (cos(phi2) * cos(phi1)), (0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(fma((cos(phi1) * 0.5), cos(lambda1), 0.5))) * (2.0 * R);
    }
    
    function code(R, lambda1, lambda2, phi1, phi2)
    	return Float64(atan(sqrt(fma(fma(cos(lambda1), -0.5, 0.5), Float64(cos(phi2) * cos(phi1)), Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(fma(Float64(cos(phi1) * 0.5), cos(lambda1), 0.5))) * Float64(2.0 * R))
    end
    
    code[R_, lambda1_, lambda2_, phi1_, phi2_] := N[(N[ArcTan[N[Sqrt[N[(N[(N[Cos[lambda1], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] * N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision] + N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(N[(N[Cos[phi1], $MachinePrecision] * 0.5), $MachinePrecision] * N[Cos[lambda1], $MachinePrecision] + 0.5), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\cos \phi_1 \cdot 0.5, \cos \lambda_1, 0.5\right)}} \cdot \left(2 \cdot R\right)
    \end{array}
    
    Derivation
    1. Initial program 58.4%

      \[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) \]
    2. Add Preprocessing
    3. Applied rewrites56.4%

      \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
    4. Taylor expanded in phi2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    5. Step-by-step derivation
      1. associate--l+N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      2. lower-+.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      3. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      5. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
      7. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
      8. lower--.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
      9. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      10. lower-*.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      11. sub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      12. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      13. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      14. associate-+l-N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      15. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      16. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      17. neg-sub0N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      18. cos-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      19. lower-cos.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      20. mul-1-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      21. unsub-negN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      22. lower--.f6444.5

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    6. Applied rewrites44.5%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    7. Taylor expanded in lambda2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
    8. Step-by-step derivation
      1. cancel-sign-sub-invN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      2. metadata-evalN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \lambda_1, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      3. +-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \lambda_1 + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      4. *-commutativeN/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \lambda_1 \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
      6. lower-cos.f6435.5

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_1}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    9. Applied rewrites35.5%

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
    10. Taylor expanded in lambda2 around 0

      \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\frac{1}{2} \cdot \left(\cos \phi_1 \cdot \cos \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
    11. Step-by-step derivation
      1. Applied rewrites35.2%

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\mathsf{fma}\left(0.5 \cdot \cos \phi_1, \color{blue}{\cos \lambda_1}, 0.5\right)}} \cdot \left(R \cdot 2\right) \]
      2. Final simplification35.2%

        \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\cos \phi_1 \cdot 0.5, \cos \lambda_1, 0.5\right)}} \cdot \left(2 \cdot R\right) \]
      3. Add Preprocessing

      Alternative 24: 30.2% accurate, 2.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \phi_2 \cdot \cos \phi_1\\ t_1 := 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\ t_2 := \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), t\_0, t\_1\right)}}{\sqrt{\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), 0.5, 0.5\right)}} \cdot \left(2 \cdot R\right)\\ \mathbf{if}\;\lambda_1 \leq -0.27:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;\lambda_1 \leq 2300000000000:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\left(\lambda_1 \cdot \lambda_1\right) \cdot 0.25, t\_0, t\_1\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
      (FPCore (R lambda1 lambda2 phi1 phi2)
       :precision binary64
       (let* ((t_0 (* (cos phi2) (cos phi1)))
              (t_1 (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5)))
              (t_2
               (*
                (atan2
                 (sqrt (fma (fma (cos lambda1) -0.5 0.5) t_0 t_1))
                 (sqrt (fma (cos (- lambda1 lambda2)) 0.5 0.5)))
                (* 2.0 R))))
         (if (<= lambda1 -0.27)
           t_2
           (if (<= lambda1 2300000000000.0)
             (*
              (atan2
               (sqrt (fma (* (* lambda1 lambda1) 0.25) t_0 t_1))
               (sqrt
                (-
                 0.5
                 (* (- (- 0.5 (* (cos (- lambda2 lambda1)) 0.5)) 0.5) (cos phi1)))))
              (* 2.0 R))
             t_2))))
      double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
      	double t_0 = cos(phi2) * cos(phi1);
      	double t_1 = 0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5);
      	double t_2 = atan2(sqrt(fma(fma(cos(lambda1), -0.5, 0.5), t_0, t_1)), sqrt(fma(cos((lambda1 - lambda2)), 0.5, 0.5))) * (2.0 * R);
      	double tmp;
      	if (lambda1 <= -0.27) {
      		tmp = t_2;
      	} else if (lambda1 <= 2300000000000.0) {
      		tmp = atan2(sqrt(fma(((lambda1 * lambda1) * 0.25), t_0, t_1)), sqrt((0.5 - (((0.5 - (cos((lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * (2.0 * R);
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      function code(R, lambda1, lambda2, phi1, phi2)
      	t_0 = Float64(cos(phi2) * cos(phi1))
      	t_1 = Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5))
      	t_2 = Float64(atan(sqrt(fma(fma(cos(lambda1), -0.5, 0.5), t_0, t_1)), sqrt(fma(cos(Float64(lambda1 - lambda2)), 0.5, 0.5))) * Float64(2.0 * R))
      	tmp = 0.0
      	if (lambda1 <= -0.27)
      		tmp = t_2;
      	elseif (lambda1 <= 2300000000000.0)
      		tmp = Float64(atan(sqrt(fma(Float64(Float64(lambda1 * lambda1) * 0.25), t_0, t_1)), sqrt(Float64(0.5 - Float64(Float64(Float64(0.5 - Float64(cos(Float64(lambda2 - lambda1)) * 0.5)) - 0.5) * cos(phi1))))) * Float64(2.0 * R));
      	else
      		tmp = t_2;
      	end
      	return tmp
      end
      
      code[R_, lambda1_, lambda2_, phi1_, phi2_] := Block[{t$95$0 = N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[N[Sqrt[N[(N[(N[Cos[lambda1], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision] * 0.5 + 0.5), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[lambda1, -0.27], t$95$2, If[LessEqual[lambda1, 2300000000000.0], N[(N[ArcTan[N[Sqrt[N[(N[(N[(lambda1 * lambda1), $MachinePrecision] * 0.25), $MachinePrecision] * t$95$0 + t$95$1), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.5 - N[(N[(N[(0.5 - N[(N[Cos[N[(lambda2 - lambda1), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \cos \phi_2 \cdot \cos \phi_1\\
      t_1 := 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\\
      t_2 := \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), t\_0, t\_1\right)}}{\sqrt{\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), 0.5, 0.5\right)}} \cdot \left(2 \cdot R\right)\\
      \mathbf{if}\;\lambda_1 \leq -0.27:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;\lambda_1 \leq 2300000000000:\\
      \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\left(\lambda_1 \cdot \lambda_1\right) \cdot 0.25, t\_0, t\_1\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_2\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if lambda1 < -0.27000000000000002 or 2.3e12 < lambda1

        1. Initial program 47.8%

          \[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) \]
        2. Add Preprocessing
        3. Applied rewrites47.8%

          \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
        4. Taylor expanded in phi2 around 0

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
        5. Step-by-step derivation
          1. associate--l+N/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
          2. lower-+.f64N/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
          3. *-commutativeN/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
          4. distribute-lft-out--N/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
          5. lower-*.f64N/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
          6. lower-cos.f64N/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
          7. lower--.f64N/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
          8. lower--.f64N/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
          9. *-commutativeN/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          10. lower-*.f64N/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          11. sub-negN/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          12. +-commutativeN/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          13. neg-sub0N/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          14. associate-+l-N/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          15. unsub-negN/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          16. mul-1-negN/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          17. neg-sub0N/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          18. cos-negN/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          19. lower-cos.f64N/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          20. mul-1-negN/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          21. unsub-negN/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          22. lower--.f6441.8

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
        6. Applied rewrites41.8%

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
        7. Taylor expanded in lambda2 around 0

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
        8. Step-by-step derivation
          1. cancel-sign-sub-invN/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          2. metadata-evalN/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \lambda_1, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          3. +-commutativeN/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \lambda_1 + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          4. *-commutativeN/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \lambda_1 \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          5. lower-fma.f64N/A

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          6. lower-cos.f6441.7

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_1}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
        9. Applied rewrites41.7%

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
        10. Taylor expanded in phi1 around 0

          \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\frac{1}{2} \cdot \cos \left(\lambda_2 - \lambda_1\right)}}} \cdot \left(R \cdot 2\right) \]
        11. Step-by-step derivation
          1. Applied rewrites31.6%

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), \color{blue}{0.5}, 0.5\right)}} \cdot \left(R \cdot 2\right) \]

          if -0.27000000000000002 < lambda1 < 2.3e12

          1. Initial program 69.9%

            \[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) \]
          2. Add Preprocessing
          3. Applied rewrites65.8%

            \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
          4. Taylor expanded in phi2 around 0

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
          5. Step-by-step derivation
            1. associate--l+N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
            2. lower-+.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
            3. *-commutativeN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
            4. distribute-lft-out--N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
            5. lower-*.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
            6. lower-cos.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
            7. lower--.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
            8. lower--.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
            9. *-commutativeN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            10. lower-*.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            11. sub-negN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            12. +-commutativeN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            13. neg-sub0N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            14. associate-+l-N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            15. unsub-negN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            16. mul-1-negN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            17. neg-sub0N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            18. cos-negN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            19. lower-cos.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            20. mul-1-negN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            21. unsub-negN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            22. lower--.f6447.5

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
          6. Applied rewrites47.5%

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
          7. Taylor expanded in lambda2 around 0

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          8. Step-by-step derivation
            1. cancel-sign-sub-invN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            2. metadata-evalN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \lambda_1, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            3. +-commutativeN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \lambda_1 + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            4. *-commutativeN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \lambda_1 \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            5. lower-fma.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            6. lower-cos.f6428.9

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_1}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
          9. Applied rewrites28.9%

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
          10. Taylor expanded in lambda1 around 0

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{4} \cdot \color{blue}{{\lambda_1}^{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          11. Step-by-step derivation
            1. Applied rewrites30.6%

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\left(\lambda_1 \cdot \lambda_1\right) \cdot \color{blue}{0.25}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
          12. Recombined 2 regimes into one program.
          13. Final simplification31.1%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\lambda_1 \leq -0.27:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), 0.5, 0.5\right)}} \cdot \left(2 \cdot R\right)\\ \mathbf{elif}\;\lambda_1 \leq 2300000000000:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\left(\lambda_1 \cdot \lambda_1\right) \cdot 0.25, \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{0.5 - \left(\left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right) - 0.5\right) \cdot \cos \phi_1}} \cdot \left(2 \cdot R\right)\\ \mathbf{else}:\\ \;\;\;\;\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), 0.5, 0.5\right)}} \cdot \left(2 \cdot R\right)\\ \end{array} \]
          14. Add Preprocessing

          Alternative 25: 23.8% accurate, 2.1× speedup?

          \[\begin{array}{l} \\ \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), 0.5, 0.5\right)}} \cdot \left(2 \cdot R\right) \end{array} \]
          (FPCore (R lambda1 lambda2 phi1 phi2)
           :precision binary64
           (*
            (atan2
             (sqrt
              (fma
               (fma (cos lambda1) -0.5 0.5)
               (* (cos phi2) (cos phi1))
               (- 0.5 (* (cos (* (* (- phi1 phi2) 0.5) 2.0)) 0.5))))
             (sqrt (fma (cos (- lambda1 lambda2)) 0.5 0.5)))
            (* 2.0 R)))
          double code(double R, double lambda1, double lambda2, double phi1, double phi2) {
          	return atan2(sqrt(fma(fma(cos(lambda1), -0.5, 0.5), (cos(phi2) * cos(phi1)), (0.5 - (cos((((phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(fma(cos((lambda1 - lambda2)), 0.5, 0.5))) * (2.0 * R);
          }
          
          function code(R, lambda1, lambda2, phi1, phi2)
          	return Float64(atan(sqrt(fma(fma(cos(lambda1), -0.5, 0.5), Float64(cos(phi2) * cos(phi1)), Float64(0.5 - Float64(cos(Float64(Float64(Float64(phi1 - phi2) * 0.5) * 2.0)) * 0.5)))), sqrt(fma(cos(Float64(lambda1 - lambda2)), 0.5, 0.5))) * Float64(2.0 * R))
          end
          
          code[R_, lambda1_, lambda2_, phi1_, phi2_] := N[(N[ArcTan[N[Sqrt[N[(N[(N[Cos[lambda1], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] * N[(N[Cos[phi2], $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision] + N[(0.5 - N[(N[Cos[N[(N[(N[(phi1 - phi2), $MachinePrecision] * 0.5), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(N[Cos[N[(lambda1 - lambda2), $MachinePrecision]], $MachinePrecision] * 0.5 + 0.5), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * R), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), 0.5, 0.5\right)}} \cdot \left(2 \cdot R\right)
          \end{array}
          
          Derivation
          1. Initial program 58.4%

            \[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) \]
          2. Add Preprocessing
          3. Applied rewrites56.4%

            \[\leadsto \color{blue}{\tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right) - \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right)\right) \cdot \left(\cos \phi_2 \cdot \cos \phi_1\right)}} \cdot \left(R \cdot 2\right)} \]
          4. Taylor expanded in phi2 around 0

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\left(\frac{1}{2} + \frac{1}{2} \cdot \cos \phi_1\right) - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}}} \cdot \left(R \cdot 2\right) \]
          5. Step-by-step derivation
            1. associate--l+N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
            2. lower-+.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{\frac{1}{2} + \left(\frac{1}{2} \cdot \cos \phi_1 - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
            3. *-commutativeN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \left(\color{blue}{\cos \phi_1 \cdot \frac{1}{2}} - \cos \phi_1 \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
            4. distribute-lft-out--N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
            5. lower-*.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
            6. lower-cos.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\cos \phi_1} \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}} \cdot \left(R \cdot 2\right) \]
            7. lower--.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \color{blue}{\left(\frac{1}{2} - \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)\right)}}} \cdot \left(R \cdot 2\right) \]
            8. lower--.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\lambda_1 - \lambda_2\right)\right)}\right)}} \cdot \left(R \cdot 2\right) \]
            9. *-commutativeN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            10. lower-*.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_1 - \lambda_2\right) \cdot \frac{1}{2}}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            11. sub-negN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_1 + \left(\mathsf{neg}\left(\lambda_2\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            12. +-commutativeN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\left(\mathsf{neg}\left(\lambda_2\right)\right) + \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            13. neg-sub0N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\color{blue}{\left(0 - \lambda_2\right)} + \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            14. associate-+l-N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(0 - \left(\lambda_2 - \lambda_1\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            15. unsub-negN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \color{blue}{\left(\lambda_2 + \left(\mathsf{neg}\left(\lambda_1\right)\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            16. mul-1-negN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(0 - \left(\lambda_2 + \color{blue}{-1 \cdot \lambda_1}\right)\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            17. neg-sub0N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\mathsf{neg}\left(\left(\lambda_2 + -1 \cdot \lambda_1\right)\right)\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            18. cos-negN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            19. lower-cos.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \color{blue}{\cos \left(\lambda_2 + -1 \cdot \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            20. mul-1-negN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 + \color{blue}{\left(\mathsf{neg}\left(\lambda_1\right)\right)}\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            21. unsub-negN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            22. lower--.f6444.5

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \color{blue}{\left(\lambda_2 - \lambda_1\right)} \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
          6. Applied rewrites44.5%

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\lambda_1 - \lambda_2\right)\right)\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\color{blue}{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}}} \cdot \left(R \cdot 2\right) \]
          7. Taylor expanded in lambda2 around 0

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} - \frac{1}{2} \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
          8. Step-by-step derivation
            1. cancel-sign-sub-invN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \lambda_1}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            2. metadata-evalN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\frac{1}{2} + \color{blue}{\frac{-1}{2}} \cdot \cos \lambda_1, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            3. +-commutativeN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot \cos \lambda_1 + \frac{1}{2}}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            4. *-commutativeN/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\cos \lambda_1 \cdot \frac{-1}{2}} + \frac{1}{2}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            5. lower-fma.f64N/A

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right)}, \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \cos \phi_1 \cdot \left(\frac{1}{2} - \left(\frac{1}{2} - \cos \left(\lambda_2 - \lambda_1\right) \cdot \frac{1}{2}\right)\right)}} \cdot \left(R \cdot 2\right) \]
            6. lower-cos.f6435.5

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\cos \lambda_1}, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
          9. Applied rewrites35.5%

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right)}, \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{0.5 + \cos \phi_1 \cdot \left(0.5 - \left(0.5 - \cos \left(\lambda_2 - \lambda_1\right) \cdot 0.5\right)\right)}} \cdot \left(R \cdot 2\right) \]
          10. Taylor expanded in phi1 around 0

            \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, \frac{-1}{2}, \frac{1}{2}\right), \cos \phi_2 \cdot \cos \phi_1, \frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\frac{1}{2} \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\frac{1}{2} + \color{blue}{\frac{1}{2} \cdot \cos \left(\lambda_2 - \lambda_1\right)}}} \cdot \left(R \cdot 2\right) \]
          11. Step-by-step derivation
            1. Applied rewrites26.4%

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - 0.5 \cdot \cos \left(2 \cdot \left(0.5 \cdot \left(\phi_1 - \phi_2\right)\right)\right)\right)}}{\sqrt{\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), \color{blue}{0.5}, 0.5\right)}} \cdot \left(R \cdot 2\right) \]
            2. Final simplification26.4%

              \[\leadsto \tan^{-1}_* \frac{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\cos \lambda_1, -0.5, 0.5\right), \cos \phi_2 \cdot \cos \phi_1, 0.5 - \cos \left(\left(\left(\phi_1 - \phi_2\right) \cdot 0.5\right) \cdot 2\right) \cdot 0.5\right)}}{\sqrt{\mathsf{fma}\left(\cos \left(\lambda_1 - \lambda_2\right), 0.5, 0.5\right)}} \cdot \left(2 \cdot R\right) \]
            3. Add Preprocessing

            Reproduce

            ?
            herbie shell --seed 2024237 
            (FPCore (R lambda1 lambda2 phi1 phi2)
              :name "Distance on a great circle"
              :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))))))))))