\[\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 := \mathsf{fma}\left(\cos \phi_1, \sin delta \cdot \cos theta, \cos delta \cdot \sin \phi_1\right)\\
t_2 := \sin \phi_1 \cdot t_1\\
t_3 := \mathsf{fma}\left(t_2, \mathsf{fma}\left(\sin \phi_1, t_1, \cos delta\right), {\cos delta}^{2}\right)\\
\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\frac{{\cos delta}^{3}}{t_3} - \frac{{t_2}^{3}}{t_3}}
\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
(fma
(cos phi1)
(* (sin delta) (cos theta))
(* (cos delta) (sin phi1))))
(t_2 (* (sin phi1) t_1))
(t_3 (fma t_2 (fma (sin phi1) t_1 (cos delta)) (pow (cos delta) 2.0))))
(+
lambda1
(atan2
(* (* (sin theta) (sin delta)) (cos phi1))
(- (/ (pow (cos delta) 3.0) t_3) (/ (pow t_2 3.0) t_3))))))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 = fma(cos(phi1), (sin(delta) * cos(theta)), (cos(delta) * sin(phi1)));
double t_2 = sin(phi1) * t_1;
double t_3 = fma(t_2, fma(sin(phi1), t_1, cos(delta)), pow(cos(delta), 2.0));
return lambda1 + atan2(((sin(theta) * sin(delta)) * cos(phi1)), ((pow(cos(delta), 3.0) / t_3) - (pow(t_2, 3.0) / t_3)));
}
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 = fma(cos(phi1), Float64(sin(delta) * cos(theta)), Float64(cos(delta) * sin(phi1)))
t_2 = Float64(sin(phi1) * t_1)
t_3 = fma(t_2, fma(sin(phi1), t_1, cos(delta)), (cos(delta) ^ 2.0))
return Float64(lambda1 + atan(Float64(Float64(sin(theta) * sin(delta)) * cos(phi1)), Float64(Float64((cos(delta) ^ 3.0) / t_3) - Float64((t_2 ^ 3.0) / t_3))))
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[phi1], $MachinePrecision] * N[(N[Sin[delta], $MachinePrecision] * N[Cos[theta], $MachinePrecision]), $MachinePrecision] + N[(N[Cos[delta], $MachinePrecision] * N[Sin[phi1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[phi1], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[Sin[phi1], $MachinePrecision] * t$95$1 + N[Cos[delta], $MachinePrecision]), $MachinePrecision] + N[Power[N[Cos[delta], $MachinePrecision], 2.0], $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[N[Cos[delta], $MachinePrecision], 3.0], $MachinePrecision] / t$95$3), $MachinePrecision] - N[(N[Power[t$95$2, 3.0], $MachinePrecision] / t$95$3), $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 := \mathsf{fma}\left(\cos \phi_1, \sin delta \cdot \cos theta, \cos delta \cdot \sin \phi_1\right)\\
t_2 := \sin \phi_1 \cdot t_1\\
t_3 := \mathsf{fma}\left(t_2, \mathsf{fma}\left(\sin \phi_1, t_1, \cos delta\right), {\cos delta}^{2}\right)\\
\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\frac{{\cos delta}^{3}}{t_3} - \frac{{t_2}^{3}}{t_3}}
\end{array}
Alternatives
| Alternative 1 |
|---|
| Accuracy | 99.8% |
|---|
| Cost | 71680 |
|---|
\[\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos delta - \sin \phi_1 \cdot \left(\cos delta \cdot \sin \phi_1 + \sin delta \cdot \left(\cos \phi_1 \cdot \cos theta\right)\right)}
\]
| Alternative 2 |
|---|
| Accuracy | 94.9% |
|---|
| Cost | 65152 |
|---|
\[\begin{array}{l}
t_1 := \sin delta \cdot \cos \phi_1\\
\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot t_1}{\cos delta - \sin \phi_1 \cdot \left(\cos delta \cdot \sin \phi_1 + t_1\right)}
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 94.9% |
|---|
| Cost | 65152 |
|---|
\[\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\sin theta \cdot \cos \phi_1\right)}{\cos delta - \sin \phi_1 \cdot \left(\cos delta \cdot \sin \phi_1 + \sin delta \cdot \cos \phi_1\right)}
\]
| Alternative 4 |
|---|
| Accuracy | 92.4% |
|---|
| Cost | 45504 |
|---|
\[\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos delta - {\sin \phi_1}^{2}}
\]
| Alternative 5 |
|---|
| Accuracy | 92.4% |
|---|
| Cost | 39424 |
|---|
\[\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos delta + \left(\frac{\cos \left(\phi_1 + \phi_1\right)}{2} - 0.5\right)}
\]
| Alternative 6 |
|---|
| Accuracy | 91.6% |
|---|
| Cost | 39240 |
|---|
\[\begin{array}{l}
t_1 := \sin delta \cdot \left(\sin theta \cdot \cos \phi_1\right)\\
\mathbf{if}\;delta \leq -10000:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos delta - \phi_1 \cdot \phi_1}\\
\mathbf{elif}\;delta \leq 5 \cdot 10^{-23}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{t_1}{{\cos \phi_1}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{t_1}{\cos delta}\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 91.6% |
|---|
| Cost | 33160 |
|---|
\[\begin{array}{l}
t_1 := \sin delta \cdot \left(\sin theta \cdot \cos \phi_1\right)\\
\mathbf{if}\;delta \leq -500:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos delta - \phi_1 \cdot \phi_1}\\
\mathbf{elif}\;delta \leq 5 \cdot 10^{-23}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{t_1}{\frac{\cos \left(\phi_1 + \phi_1\right) + 1}{2}}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{t_1}{\cos delta}\\
\end{array}
\]
| Alternative 8 |
|---|
| Accuracy | 90.9% |
|---|
| Cost | 32904 |
|---|
\[\begin{array}{l}
\mathbf{if}\;delta \leq -500:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot \sin delta}{\cos delta}\\
\mathbf{elif}\;delta \leq 5.1 \cdot 10^{-23}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\cos \phi_1 \cdot \left(\sin theta \cdot delta\right)}{\cos \phi_1 \cdot \cos \phi_1}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\sin theta \cdot \cos \phi_1\right)}{\cos delta}\\
\end{array}
\]
| Alternative 9 |
|---|
| Accuracy | 91.6% |
|---|
| Cost | 32904 |
|---|
\[\begin{array}{l}
\mathbf{if}\;delta \leq -560:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\left(\sin theta \cdot \sin delta\right) \cdot \cos \phi_1}{\cos delta - \phi_1 \cdot \phi_1}\\
\mathbf{elif}\;delta \leq 5 \cdot 10^{-23}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\cos \phi_1 \cdot \left(\sin theta \cdot delta\right)}{\cos \phi_1 \cdot \cos \phi_1}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\sin theta \cdot \cos \phi_1\right)}{\cos delta}\\
\end{array}
\]
| Alternative 10 |
|---|
| Accuracy | 88.8% |
|---|
| Cost | 32512 |
|---|
\[\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\sin theta \cdot \cos \phi_1\right)}{\cos delta}
\]
| Alternative 11 |
|---|
| Accuracy | 86.4% |
|---|
| Cost | 26240 |
|---|
\[\lambda_1 + \tan^{-1}_* \frac{\frac{\sin theta \cdot 2}{\frac{2}{\sin delta}}}{\cos delta}
\]
| Alternative 12 |
|---|
| Accuracy | 86.4% |
|---|
| Cost | 25984 |
|---|
\[\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot \sin delta}{\cos delta}
\]
| Alternative 13 |
|---|
| Accuracy | 76.5% |
|---|
| Cost | 19849 |
|---|
\[\begin{array}{l}
\mathbf{if}\;delta \leq -5.5 \cdot 10^{-77} \lor \neg \left(delta \leq 1.25 \cdot 10^{-52}\right):\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{theta \cdot \sin delta}{\cos delta}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1\\
\end{array}
\]
| Alternative 14 |
|---|
| Accuracy | 80.4% |
|---|
| Cost | 19849 |
|---|
\[\begin{array}{l}
\mathbf{if}\;delta \leq -115000000000 \lor \neg \left(delta \leq 0.11\right):\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{theta \cdot \sin delta}{\cos delta}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot delta}{\cos delta}\\
\end{array}
\]
| Alternative 15 |
|---|
| Accuracy | 70.7% |
|---|
| Cost | 19720 |
|---|
\[\begin{array}{l}
\mathbf{if}\;\lambda_1 \leq -1.45 \cdot 10^{-279}:\\
\;\;\;\;\lambda_1\\
\mathbf{elif}\;\lambda_1 \leq 2 \cdot 10^{-262}:\\
\;\;\;\;\tan^{-1}_* \frac{theta \cdot \sin delta}{\cos delta}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1\\
\end{array}
\]
| Alternative 16 |
|---|
| Accuracy | 69.8% |
|---|
| Cost | 13448 |
|---|
\[\begin{array}{l}
\mathbf{if}\;theta \leq -3.2 \cdot 10^{+182}:\\
\;\;\;\;\lambda_1\\
\mathbf{elif}\;theta \leq -7 \cdot 10^{-278}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{theta \cdot delta}{\cos delta}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1\\
\end{array}
\]
| Alternative 17 |
|---|
| Accuracy | 70.2% |
|---|
| Cost | 64 |
|---|
\[\lambda_1
\]