?

Average Accuracy: 99.7% → 99.9%
Time: 28.9s
Precision: binary64
Cost: 305344

?

\[\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos delta - \sin \phi_1 \cdot \sin \sin^{-1} \left(\sin \phi_1 \cdot \cos delta + \left(\cos \phi_1 \cdot \sin delta\right) \cdot \cos theta\right)} \]
\[\begin{array}{l} t_1 := \cos theta \cdot \left(-\sin \phi_1\right)\\ t_2 := \mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot t_1\right)\\ t_3 := \mathsf{fma}\left(t_1, \sin delta, \sin \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right)\\ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\frac{{t_2}^{3} + {t_3}^{3}}{\frac{{t_2}^{2} + t_3 \cdot \left(t_3 - t_2\right)}{\cos \phi_1}}} \end{array} \]
(FPCore (lambda1 phi1 phi2 delta theta)
 :precision binary64
 (+
  lambda1
  (atan2
   (* (* (sin theta) (sin delta)) (cos phi1))
   (-
    (cos delta)
    (*
     (sin phi1)
     (sin
      (asin
       (+
        (* (sin phi1) (cos delta))
        (* (* (cos phi1) (sin delta)) (cos theta))))))))))
(FPCore (lambda1 phi1 phi2 delta theta)
 :precision binary64
 (let* ((t_1 (* (cos theta) (- (sin phi1))))
        (t_2 (fma (cos phi1) (cos delta) (* (sin delta) t_1)))
        (t_3 (fma t_1 (sin delta) (* (sin phi1) (* (sin delta) (cos theta))))))
   (+
    lambda1
    (atan2
     (* (* (sin theta) (sin delta)) (cos phi1))
     (/
      (+ (pow t_2 3.0) (pow t_3 3.0))
      (/ (+ (pow t_2 2.0) (* t_3 (- t_3 t_2))) (cos phi1)))))))
double code(double lambda1, double phi1, double phi2, double delta, double theta) {
	return lambda1 + atan2(((sin(theta) * sin(delta)) * cos(phi1)), (cos(delta) - (sin(phi1) * sin(asin(((sin(phi1) * cos(delta)) + ((cos(phi1) * sin(delta)) * cos(theta))))))));
}
double code(double lambda1, double phi1, double phi2, double delta, double theta) {
	double t_1 = cos(theta) * -sin(phi1);
	double t_2 = fma(cos(phi1), cos(delta), (sin(delta) * t_1));
	double t_3 = fma(t_1, sin(delta), (sin(phi1) * (sin(delta) * cos(theta))));
	return lambda1 + atan2(((sin(theta) * sin(delta)) * cos(phi1)), ((pow(t_2, 3.0) + pow(t_3, 3.0)) / ((pow(t_2, 2.0) + (t_3 * (t_3 - t_2))) / cos(phi1))));
}
function code(lambda1, phi1, phi2, delta, theta)
	return Float64(lambda1 + atan(Float64(Float64(sin(theta) * sin(delta)) * cos(phi1)), Float64(cos(delta) - Float64(sin(phi1) * sin(asin(Float64(Float64(sin(phi1) * cos(delta)) + Float64(Float64(cos(phi1) * sin(delta)) * cos(theta)))))))))
end
function code(lambda1, phi1, phi2, delta, theta)
	t_1 = Float64(cos(theta) * Float64(-sin(phi1)))
	t_2 = fma(cos(phi1), cos(delta), Float64(sin(delta) * t_1))
	t_3 = fma(t_1, sin(delta), Float64(sin(phi1) * Float64(sin(delta) * cos(theta))))
	return Float64(lambda1 + atan(Float64(Float64(sin(theta) * sin(delta)) * cos(phi1)), Float64(Float64((t_2 ^ 3.0) + (t_3 ^ 3.0)) / Float64(Float64((t_2 ^ 2.0) + Float64(t_3 * Float64(t_3 - t_2))) / cos(phi1)))))
end
code[lambda1_, phi1_, phi2_, delta_, theta_] := N[(lambda1 + N[ArcTan[N[(N[(N[Sin[theta], $MachinePrecision] * N[Sin[delta], $MachinePrecision]), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[delta], $MachinePrecision] - N[(N[Sin[phi1], $MachinePrecision] * N[Sin[N[ArcSin[N[(N[(N[Sin[phi1], $MachinePrecision] * N[Cos[delta], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Cos[phi1], $MachinePrecision] * N[Sin[delta], $MachinePrecision]), $MachinePrecision] * N[Cos[theta], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[lambda1_, phi1_, phi2_, delta_, theta_] := Block[{t$95$1 = N[(N[Cos[theta], $MachinePrecision] * (-N[Sin[phi1], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$2 = N[(N[Cos[phi1], $MachinePrecision] * N[Cos[delta], $MachinePrecision] + N[(N[Sin[delta], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[Sin[delta], $MachinePrecision] + N[(N[Sin[phi1], $MachinePrecision] * N[(N[Sin[delta], $MachinePrecision] * N[Cos[theta], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(lambda1 + N[ArcTan[N[(N[(N[Sin[theta], $MachinePrecision] * N[Sin[delta], $MachinePrecision]), $MachinePrecision] * N[Cos[phi1], $MachinePrecision]), $MachinePrecision] / N[(N[(N[Power[t$95$2, 3.0], $MachinePrecision] + N[Power[t$95$3, 3.0], $MachinePrecision]), $MachinePrecision] / N[(N[(N[Power[t$95$2, 2.0], $MachinePrecision] + N[(t$95$3 * N[(t$95$3 - t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cos[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos delta - \sin \phi_1 \cdot \sin \sin^{-1} \left(\sin \phi_1 \cdot \cos delta + \left(\cos \phi_1 \cdot \sin delta\right) \cdot \cos theta\right)}
\begin{array}{l}
t_1 := \cos theta \cdot \left(-\sin \phi_1\right)\\
t_2 := \mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot t_1\right)\\
t_3 := \mathsf{fma}\left(t_1, \sin delta, \sin \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right)\\
\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\frac{{t_2}^{3} + {t_3}^{3}}{\frac{{t_2}^{2} + t_3 \cdot \left(t_3 - t_2\right)}{\cos \phi_1}}}
\end{array}

Error?

Derivation?

  1. Initial program 99.7%

    \[\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos delta - \sin \phi_1 \cdot \sin \sin^{-1} \left(\sin \phi_1 \cdot \cos delta + \left(\cos \phi_1 \cdot \sin delta\right) \cdot \cos theta\right)} \]
  2. Applied egg-rr99.7%

    \[\leadsto \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\color{blue}{\left(\cos delta + \left(\cos delta \cdot \sin \phi_1\right) \cdot \left(-\sin \phi_1\right)\right) + \left(\cos \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(-\sin \phi_1\right)}} \]
  3. Taylor expanded in delta around inf 99.7%

    \[\leadsto \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\color{blue}{\left(\cos delta + -1 \cdot \left(\cos delta \cdot {\sin \phi_1}^{2}\right)\right)} + \left(\cos \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(-\sin \phi_1\right)} \]
  4. Simplified99.9%

    \[\leadsto \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\color{blue}{\left(\cos \phi_1 \cdot \cos \phi_1\right) \cdot \cos delta} + \left(\cos \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(-\sin \phi_1\right)} \]
    Proof

    [Start]99.7

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\left(\cos delta + -1 \cdot \left(\cos delta \cdot {\sin \phi_1}^{2}\right)\right) + \left(\cos \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(-\sin \phi_1\right)} \]

    *-lft-identity [<=]99.7

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\left(\color{blue}{1 \cdot \cos delta} + -1 \cdot \left(\cos delta \cdot {\sin \phi_1}^{2}\right)\right) + \left(\cos \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(-\sin \phi_1\right)} \]

    *-commutative [=>]99.7

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\left(1 \cdot \cos delta + -1 \cdot \color{blue}{\left({\sin \phi_1}^{2} \cdot \cos delta\right)}\right) + \left(\cos \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(-\sin \phi_1\right)} \]

    associate-*r* [=>]99.7

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\left(1 \cdot \cos delta + \color{blue}{\left(-1 \cdot {\sin \phi_1}^{2}\right) \cdot \cos delta}\right) + \left(\cos \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(-\sin \phi_1\right)} \]

    distribute-rgt-in [<=]99.8

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\color{blue}{\cos delta \cdot \left(1 + -1 \cdot {\sin \phi_1}^{2}\right)} + \left(\cos \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(-\sin \phi_1\right)} \]

    mul-1-neg [=>]99.8

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos delta \cdot \left(1 + \color{blue}{\left(-{\sin \phi_1}^{2}\right)}\right) + \left(\cos \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(-\sin \phi_1\right)} \]

    sub-neg [<=]99.8

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos delta \cdot \color{blue}{\left(1 - {\sin \phi_1}^{2}\right)} + \left(\cos \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(-\sin \phi_1\right)} \]

    *-commutative [=>]99.8

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\color{blue}{\left(1 - {\sin \phi_1}^{2}\right) \cdot \cos delta} + \left(\cos \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(-\sin \phi_1\right)} \]

    unpow2 [=>]99.8

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\left(1 - \color{blue}{\sin \phi_1 \cdot \sin \phi_1}\right) \cdot \cos delta + \left(\cos \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(-\sin \phi_1\right)} \]

    1-sub-sin [=>]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\color{blue}{\left(\cos \phi_1 \cdot \cos \phi_1\right)} \cdot \cos delta + \left(\cos \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(-\sin \phi_1\right)} \]
  5. Taylor expanded in phi1 around inf 99.9%

    \[\leadsto \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\color{blue}{\cos delta \cdot {\cos \phi_1}^{2} + -1 \cdot \left(\sin delta \cdot \left(\sin \phi_1 \cdot \left(\cos \phi_1 \cdot \cos theta\right)\right)\right)}} \]
  6. Simplified99.9%

    \[\leadsto \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\color{blue}{\cos \phi_1 \cdot \left(\cos \phi_1 \cdot \cos delta - \sin delta \cdot \left(\cos theta \cdot \sin \phi_1\right)\right)}} \]
    Proof

    [Start]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos delta \cdot {\cos \phi_1}^{2} + -1 \cdot \left(\sin delta \cdot \left(\sin \phi_1 \cdot \left(\cos \phi_1 \cdot \cos theta\right)\right)\right)} \]

    *-commutative [<=]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\color{blue}{{\cos \phi_1}^{2} \cdot \cos delta} + -1 \cdot \left(\sin delta \cdot \left(\sin \phi_1 \cdot \left(\cos \phi_1 \cdot \cos theta\right)\right)\right)} \]

    mul-1-neg [=>]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{{\cos \phi_1}^{2} \cdot \cos delta + \color{blue}{\left(-\sin delta \cdot \left(\sin \phi_1 \cdot \left(\cos \phi_1 \cdot \cos theta\right)\right)\right)}} \]

    *-commutative [=>]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{{\cos \phi_1}^{2} \cdot \cos delta + \left(-\sin delta \cdot \color{blue}{\left(\left(\cos \phi_1 \cdot \cos theta\right) \cdot \sin \phi_1\right)}\right)} \]

    associate-*r* [=>]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{{\cos \phi_1}^{2} \cdot \cos delta + \left(-\color{blue}{\left(\sin delta \cdot \left(\cos \phi_1 \cdot \cos theta\right)\right) \cdot \sin \phi_1}\right)} \]

    *-commutative [=>]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{{\cos \phi_1}^{2} \cdot \cos delta + \left(-\left(\sin delta \cdot \color{blue}{\left(\cos theta \cdot \cos \phi_1\right)}\right) \cdot \sin \phi_1\right)} \]

    distribute-lft-neg-in [=>]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{{\cos \phi_1}^{2} \cdot \cos delta + \color{blue}{\left(-\sin delta \cdot \left(\cos theta \cdot \cos \phi_1\right)\right) \cdot \sin \phi_1}} \]

    unpow2 [=>]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\color{blue}{\left(\cos \phi_1 \cdot \cos \phi_1\right)} \cdot \cos delta + \left(-\sin delta \cdot \left(\cos theta \cdot \cos \phi_1\right)\right) \cdot \sin \phi_1} \]

    associate-*r* [<=]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\color{blue}{\cos \phi_1 \cdot \left(\cos \phi_1 \cdot \cos delta\right)} + \left(-\sin delta \cdot \left(\cos theta \cdot \cos \phi_1\right)\right) \cdot \sin \phi_1} \]

    *-commutative [=>]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos \phi_1 \cdot \left(\cos \phi_1 \cdot \cos delta\right) + \color{blue}{\sin \phi_1 \cdot \left(-\sin delta \cdot \left(\cos theta \cdot \cos \phi_1\right)\right)}} \]

    distribute-rgt-neg-in [<=]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos \phi_1 \cdot \left(\cos \phi_1 \cdot \cos delta\right) + \color{blue}{\left(-\sin \phi_1 \cdot \left(\sin delta \cdot \left(\cos theta \cdot \cos \phi_1\right)\right)\right)}} \]
  7. Applied egg-rr99.9%

    \[\leadsto \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\color{blue}{\frac{\cos \phi_1 \cdot \left({\left(\mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\sin \phi_1 \cdot \left(-\cos theta\right)\right)\right)\right)}^{3} + {\left(\mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin delta \cdot \left(\cos theta \cdot \sin \phi_1\right)\right)\right)}^{3}\right)}{{\left(\mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\sin \phi_1 \cdot \left(-\cos theta\right)\right)\right)\right)}^{2} + \left(\mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin delta \cdot \left(\cos theta \cdot \sin \phi_1\right)\right) \cdot \mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin delta \cdot \left(\cos theta \cdot \sin \phi_1\right)\right) - \mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\sin \phi_1 \cdot \left(-\cos theta\right)\right)\right) \cdot \mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin delta \cdot \left(\cos theta \cdot \sin \phi_1\right)\right)\right)}}} \]
  8. Simplified99.9%

    \[\leadsto \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\color{blue}{\frac{{\left(\mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\sin \phi_1 \cdot \left(-\cos theta\right)\right)\right)\right)}^{3} + {\left(\mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin \phi_1 \cdot \left(\cos theta \cdot \sin delta\right)\right)\right)}^{3}}{\frac{{\left(\mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\sin \phi_1 \cdot \left(-\cos theta\right)\right)\right)\right)}^{2} + \mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin \phi_1 \cdot \left(\cos theta \cdot \sin delta\right)\right) \cdot \left(\mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin \phi_1 \cdot \left(\cos theta \cdot \sin delta\right)\right) - \mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\sin \phi_1 \cdot \left(-\cos theta\right)\right)\right)\right)}{\cos \phi_1}}}} \]
    Proof

    [Start]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\frac{\cos \phi_1 \cdot \left({\left(\mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\sin \phi_1 \cdot \left(-\cos theta\right)\right)\right)\right)}^{3} + {\left(\mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin delta \cdot \left(\cos theta \cdot \sin \phi_1\right)\right)\right)}^{3}\right)}{{\left(\mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\sin \phi_1 \cdot \left(-\cos theta\right)\right)\right)\right)}^{2} + \left(\mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin delta \cdot \left(\cos theta \cdot \sin \phi_1\right)\right) \cdot \mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin delta \cdot \left(\cos theta \cdot \sin \phi_1\right)\right) - \mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\sin \phi_1 \cdot \left(-\cos theta\right)\right)\right) \cdot \mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin delta \cdot \left(\cos theta \cdot \sin \phi_1\right)\right)\right)}} \]

    *-commutative [<=]99.9

    \[ \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\frac{\color{blue}{\left({\left(\mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\sin \phi_1 \cdot \left(-\cos theta\right)\right)\right)\right)}^{3} + {\left(\mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin delta \cdot \left(\cos theta \cdot \sin \phi_1\right)\right)\right)}^{3}\right) \cdot \cos \phi_1}}{{\left(\mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\sin \phi_1 \cdot \left(-\cos theta\right)\right)\right)\right)}^{2} + \left(\mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin delta \cdot \left(\cos theta \cdot \sin \phi_1\right)\right) \cdot \mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin delta \cdot \left(\cos theta \cdot \sin \phi_1\right)\right) - \mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\sin \phi_1 \cdot \left(-\cos theta\right)\right)\right) \cdot \mathsf{fma}\left(\sin \phi_1 \cdot \left(-\cos theta\right), \sin delta, \sin delta \cdot \left(\cos theta \cdot \sin \phi_1\right)\right)\right)}} \]
  9. Final simplification99.9%

    \[\leadsto \lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\frac{{\left(\mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\cos theta \cdot \left(-\sin \phi_1\right)\right)\right)\right)}^{3} + {\left(\mathsf{fma}\left(\cos theta \cdot \left(-\sin \phi_1\right), \sin delta, \sin \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right)\right)}^{3}}{\frac{{\left(\mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\cos theta \cdot \left(-\sin \phi_1\right)\right)\right)\right)}^{2} + \mathsf{fma}\left(\cos theta \cdot \left(-\sin \phi_1\right), \sin delta, \sin \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) \cdot \left(\mathsf{fma}\left(\cos theta \cdot \left(-\sin \phi_1\right), \sin delta, \sin \phi_1 \cdot \left(\sin delta \cdot \cos theta\right)\right) - \mathsf{fma}\left(\cos \phi_1, \cos delta, \sin delta \cdot \left(\cos theta \cdot \left(-\sin \phi_1\right)\right)\right)\right)}{\cos \phi_1}}} \]

Alternatives

Alternative 1
Accuracy99.9%
Cost65152
\[\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\sin theta \cdot \cos \phi_1\right)}{\cos \phi_1 \cdot \left(\cos \phi_1 \cdot \cos delta - \sin delta \cdot \left(\sin \phi_1 \cdot \cos theta\right)\right)} \]
Alternative 2
Accuracy94.5%
Cost58624
\[\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos \phi_1 \cdot \left(\cos \phi_1 \cdot \cos delta - \sin delta \cdot \sin \phi_1\right)} \]
Alternative 3
Accuracy91.6%
Cost45576
\[\begin{array}{l} t_1 := \sin theta \cdot \cos \phi_1\\ \mathbf{if}\;delta \leq -0.0037:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot \left(\sin delta \cdot \cos \phi_1\right)}{\cos delta}\\ \mathbf{elif}\;delta \leq 1.65 \cdot 10^{-21}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{delta \cdot t_1}{\cos \phi_1 \cdot \cos \phi_1}\\ \mathbf{else}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\mathsf{expm1}\left(\mathsf{log1p}\left(\sin delta \cdot t_1\right)\right)}{\cos delta}\\ \end{array} \]
Alternative 4
Accuracy92.0%
Cost45504
\[\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos delta - {\sin \phi_1}^{2}} \]
Alternative 5
Accuracy91.6%
Cost32905
\[\begin{array}{l} \mathbf{if}\;delta \leq -0.0105 \lor \neg \left(delta \leq 10^{-21}\right):\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot \left(\sin delta \cdot \cos \phi_1\right)}{\cos delta}\\ \mathbf{else}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{delta \cdot \left(\sin theta \cdot \cos \phi_1\right)}{\cos \phi_1 \cdot \cos \phi_1}\\ \end{array} \]
Alternative 6
Accuracy86.0%
Cost32780
\[\begin{array}{l} t_1 := \sin theta \cdot \sin delta\\ \mathbf{if}\;\phi_1 \leq -2.4 \cdot 10^{+75}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\cos \phi_1 \cdot \left(\sin theta \cdot delta\right)}{0.5 + 0.5 \cdot \cos \left(\phi_1 + \phi_1\right)}\\ \mathbf{elif}\;\phi_1 \leq 1.75 \cdot 10^{+16}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{t_1 \cdot \left(-0.5 \cdot \left(\phi_1 \cdot \phi_1\right) + 1\right)}{\cos delta}\\ \mathbf{elif}\;\phi_1 \leq 5 \cdot 10^{+123}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\left|t_1\right|}{\cos delta}\\ \mathbf{else}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot \left|\sin delta\right|}{\cos delta}\\ \end{array} \]
Alternative 7
Accuracy91.6%
Cost32777
\[\begin{array}{l} \mathbf{if}\;delta \leq -0.0037 \lor \neg \left(delta \leq 1.1 \cdot 10^{-21}\right):\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot \left(\sin delta \cdot \cos \phi_1\right)}{\cos delta}\\ \mathbf{else}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\cos \phi_1 \cdot \left(\sin theta \cdot delta\right)}{0.5 + 0.5 \cdot \cos \left(\phi_1 + \phi_1\right)}\\ \end{array} \]
Alternative 8
Accuracy87.7%
Cost26760
\[\begin{array}{l} \mathbf{if}\;delta \leq -1.2:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(theta \cdot \cos \phi_1\right)}{\cos delta}\\ \mathbf{elif}\;delta \leq 1.65 \cdot 10^{-21}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\cos \phi_1 \cdot \left(\sin theta \cdot delta\right)}{0.5 + 0.5 \cdot \cos \left(\phi_1 + \phi_1\right)}\\ \mathbf{else}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot \sin delta}{\cos delta}\\ \end{array} \]
Alternative 9
Accuracy85.7%
Cost26377
\[\begin{array}{l} \mathbf{if}\;theta \leq -8.2 \cdot 10^{-7} \lor \neg \left(theta \leq 1.15 \cdot 10^{+84}\right):\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot \sin delta}{\cos delta}\\ \mathbf{else}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(theta \cdot \cos \phi_1\right)}{\cos delta}\\ \end{array} \]
Alternative 10
Accuracy85.9%
Cost25984
\[\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot \sin delta}{\cos delta} \]
Alternative 11
Accuracy79.5%
Cost19849
\[\begin{array}{l} \mathbf{if}\;theta \leq -6.1 \cdot 10^{-80} \lor \neg \left(theta \leq 2.5 \cdot 10^{+22}\right):\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot delta}{\cos delta}\\ \mathbf{else}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{theta \cdot \sin delta}{\cos delta}\\ \end{array} \]
Alternative 12
Accuracy76.4%
Cost19848
\[\begin{array}{l} \mathbf{if}\;theta \leq -3200:\\ \;\;\;\;\lambda_1\\ \mathbf{elif}\;theta \leq 9 \cdot 10^{+31}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{theta \cdot \sin delta}{\cos delta}\\ \mathbf{else}:\\ \;\;\;\;\lambda_1\\ \end{array} \]
Alternative 13
Accuracy69.3%
Cost13448
\[\begin{array}{l} \mathbf{if}\;\phi_1 \leq -1 \cdot 10^{+97}:\\ \;\;\;\;\lambda_1\\ \mathbf{elif}\;\phi_1 \leq -3.9 \cdot 10^{-107}:\\ \;\;\;\;\lambda_1 + \tan^{-1}_* \frac{theta \cdot delta}{\cos delta}\\ \mathbf{else}:\\ \;\;\;\;\lambda_1\\ \end{array} \]
Alternative 14
Accuracy69.9%
Cost64
\[\lambda_1 \]

Error

Reproduce?

herbie shell --seed 2023129 
(FPCore (lambda1 phi1 phi2 delta theta)
  :name "Destination given bearing on a great circle"
  :precision binary64
  (+ lambda1 (atan2 (* (* (sin theta) (sin delta)) (cos phi1)) (- (cos delta) (* (sin phi1) (sin (asin (+ (* (sin phi1) (cos delta)) (* (* (cos phi1) (sin delta)) (cos theta))))))))))