\[\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)}
\]
↓
\[\lambda_1 + \tan^{-1}_* \frac{\mathsf{log1p}\left(\mathsf{expm1}\left(\sin delta \cdot \left(\cos \phi_1 \cdot \sin theta\right)\right)\right)}{\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)}
\]
(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
(+
lambda1
(atan2
(log1p (expm1 (* (sin delta) (* (cos phi1) (sin theta)))))
(-
(cos delta)
(*
(sin phi1)
(+
(* (cos delta) (sin phi1))
(* (sin delta) (* (cos phi1) (cos theta)))))))))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) {
return lambda1 + atan2(log1p(expm1((sin(delta) * (cos(phi1) * sin(theta))))), (cos(delta) - (sin(phi1) * ((cos(delta) * sin(phi1)) + (sin(delta) * (cos(phi1) * cos(theta)))))));
}
public static double code(double lambda1, double phi1, double phi2, double delta, double theta) {
return lambda1 + Math.atan2(((Math.sin(theta) * Math.sin(delta)) * Math.cos(phi1)), (Math.cos(delta) - (Math.sin(phi1) * Math.sin(Math.asin(((Math.sin(phi1) * Math.cos(delta)) + ((Math.cos(phi1) * Math.sin(delta)) * Math.cos(theta))))))));
}
↓
public static double code(double lambda1, double phi1, double phi2, double delta, double theta) {
return lambda1 + Math.atan2(Math.log1p(Math.expm1((Math.sin(delta) * (Math.cos(phi1) * Math.sin(theta))))), (Math.cos(delta) - (Math.sin(phi1) * ((Math.cos(delta) * Math.sin(phi1)) + (Math.sin(delta) * (Math.cos(phi1) * Math.cos(theta)))))));
}
def code(lambda1, phi1, phi2, delta, theta):
return lambda1 + math.atan2(((math.sin(theta) * math.sin(delta)) * math.cos(phi1)), (math.cos(delta) - (math.sin(phi1) * math.sin(math.asin(((math.sin(phi1) * math.cos(delta)) + ((math.cos(phi1) * math.sin(delta)) * math.cos(theta))))))))
↓
def code(lambda1, phi1, phi2, delta, theta):
return lambda1 + math.atan2(math.log1p(math.expm1((math.sin(delta) * (math.cos(phi1) * math.sin(theta))))), (math.cos(delta) - (math.sin(phi1) * ((math.cos(delta) * math.sin(phi1)) + (math.sin(delta) * (math.cos(phi1) * math.cos(theta)))))))
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)
return Float64(lambda1 + atan(log1p(expm1(Float64(sin(delta) * Float64(cos(phi1) * sin(theta))))), Float64(cos(delta) - Float64(sin(phi1) * Float64(Float64(cos(delta) * sin(phi1)) + Float64(sin(delta) * Float64(cos(phi1) * cos(theta))))))))
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_] := N[(lambda1 + N[ArcTan[N[Log[1 + N[(Exp[N[(N[Sin[delta], $MachinePrecision] * N[(N[Cos[phi1], $MachinePrecision] * N[Sin[theta], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision] / N[(N[Cos[delta], $MachinePrecision] - N[(N[Sin[phi1], $MachinePrecision] * N[(N[(N[Cos[delta], $MachinePrecision] * N[Sin[phi1], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[delta], $MachinePrecision] * N[(N[Cos[phi1], $MachinePrecision] * N[Cos[theta], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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)}
↓
\lambda_1 + \tan^{-1}_* \frac{\mathsf{log1p}\left(\mathsf{expm1}\left(\sin delta \cdot \left(\cos \phi_1 \cdot \sin theta\right)\right)\right)}{\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)}
Alternatives
| Alternative 1 |
|---|
| Error | 0.23% |
|---|
| Cost | 71680 |
|---|
\[\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\cos \phi_1 \cdot \sin theta\right)}{\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 |
|---|
| Error | 5.36% |
|---|
| Cost | 71616 |
|---|
\[\begin{array}{l}
t_1 := \sin delta \cdot \cos \phi_1\\
\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot t_1}{\cos delta - \left(\sin \phi_1 \cdot t_1 + \cos delta \cdot {\sin \phi_1}^{2}\right)}
\end{array}
\]
| Alternative 3 |
|---|
| Error | 6.4% |
|---|
| Cost | 65284 |
|---|
\[\begin{array}{l}
t_1 := \cos delta \cdot \sin \phi_1\\
\mathbf{if}\;theta \leq -7.4 \cdot 10^{+37}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\cos \phi_1 \cdot \sin theta\right)}{\cos delta - \sin \phi_1 \cdot \left(t_1 + \sin delta \cdot \cos theta\right)}\\
\mathbf{elif}\;theta \leq 2 \cdot 10^{-17}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\cos \phi_1 \cdot theta\right)}{\cos delta - \sin \phi_1 \cdot \left(t_1 + \sin delta \cdot \cos \phi_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\cos \phi_1 \cdot \left(\sin delta \cdot \sin theta\right)}{\left(\cos delta + -0.5\right) + 0.5 \cdot \cos \left(\phi_1 + \phi_1\right)}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 5.36% |
|---|
| 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 5 |
|---|
| Error | 6.48% |
|---|
| Cost | 59017 |
|---|
\[\begin{array}{l}
\mathbf{if}\;theta \leq -7.4 \cdot 10^{+37} \lor \neg \left(theta \leq 10^{-19}\right):\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\cos \phi_1 \cdot \left(\sin delta \cdot \sin theta\right)}{\left(\cos delta + -0.5\right) + 0.5 \cdot \cos \left(\phi_1 + \phi_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\cos \phi_1 \cdot theta\right)}{\cos delta - \sin \phi_1 \cdot \left(\cos delta \cdot \sin \phi_1 + \sin delta \cdot \cos \phi_1\right)}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 7.8% |
|---|
| Cost | 39424 |
|---|
\[\lambda_1 + \tan^{-1}_* \frac{\cos \phi_1 \cdot \left(\sin delta \cdot \sin theta\right)}{\left(\cos delta + -0.5\right) + 0.5 \cdot \cos \left(\phi_1 + \phi_1\right)}
\]
| Alternative 7 |
|---|
| Error | 8.89% |
|---|
| Cost | 33160 |
|---|
\[\begin{array}{l}
\mathbf{if}\;delta \leq -0.00025:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\cos \phi_1 \cdot \left(\sin delta \cdot \sin theta\right)}{\cos delta - \phi_1 \cdot \phi_1}\\
\mathbf{elif}\;delta \leq 8 \cdot 10^{-28}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot \left(\sin delta \cdot \cos \phi_1\right)}{0.5 + 0.5 \cdot \cos \left(\phi_1 + \phi_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\cos \phi_1 \cdot \sin theta\right)}{\cos delta}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 8.44% |
|---|
| Cost | 32969 |
|---|
\[\begin{array}{l}
\mathbf{if}\;delta \leq -7.4 \cdot 10^{-6} \lor \neg \left(delta \leq 8 \cdot 10^{-28}\right):\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\cos \phi_1 \cdot \sin theta\right)}{\cos delta}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\cos \phi_1 \cdot \left(delta \cdot \sin theta\right)}{1 - {\sin \phi_1}^{2}}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 8.45% |
|---|
| Cost | 32969 |
|---|
\[\begin{array}{l}
\mathbf{if}\;delta \leq -2.6 \cdot 10^{-5} \lor \neg \left(delta \leq 8 \cdot 10^{-28}\right):\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\cos \phi_1 \cdot \sin theta\right)}{\cos delta}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot \left(delta \cdot \cos \phi_1\right)}{1 - {\sin \phi_1}^{2}}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 8.9% |
|---|
| Cost | 32968 |
|---|
\[\begin{array}{l}
\mathbf{if}\;delta \leq -0.018:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\cos \phi_1 \cdot \left(\sin delta \cdot \sin theta\right)}{\cos delta - \phi_1 \cdot \phi_1}\\
\mathbf{elif}\;delta \leq 8 \cdot 10^{-28}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin theta \cdot \left(delta \cdot \cos \phi_1\right)}{1 - {\sin \phi_1}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\cos \phi_1 \cdot \sin theta\right)}{\cos delta}\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 11.3% |
|---|
| Cost | 32512 |
|---|
\[\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \left(\cos \phi_1 \cdot \sin theta\right)}{\cos delta}
\]
| Alternative 12 |
|---|
| Error | 12.34% |
|---|
| Cost | 26377 |
|---|
\[\begin{array}{l}
\mathbf{if}\;theta \leq -5 \cdot 10^{-47} \lor \neg \left(theta \leq 2 \cdot 10^{-27}\right):\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \sin theta}{\cos delta}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\cos \phi_1 \cdot \left(\sin delta \cdot theta\right)}{\cos delta}\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 13.46% |
|---|
| Cost | 25984 |
|---|
\[\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot \sin theta}{\cos delta}
\]
| Alternative 14 |
|---|
| Error | 23.78% |
|---|
| Cost | 19849 |
|---|
\[\begin{array}{l}
\mathbf{if}\;delta \leq -1.8 \cdot 10^{-126} \lor \neg \left(delta \leq 5 \cdot 10^{-193}\right):\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot theta}{\cos delta}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 19.75% |
|---|
| Cost | 19849 |
|---|
\[\begin{array}{l}
\mathbf{if}\;delta \leq -1.4 \cdot 10^{+31} \lor \neg \left(delta \leq 1.66 \cdot 10^{-43}\right):\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{\sin delta \cdot theta}{\cos delta}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{delta \cdot \sin theta}{\cos delta}\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 29.44% |
|---|
| Cost | 13448 |
|---|
\[\begin{array}{l}
\mathbf{if}\;theta \leq -1 \cdot 10^{-152}:\\
\;\;\;\;\lambda_1\\
\mathbf{elif}\;theta \leq 270000000:\\
\;\;\;\;\lambda_1 + \tan^{-1}_* \frac{delta \cdot theta}{\cos delta}\\
\mathbf{else}:\\
\;\;\;\;\lambda_1\\
\end{array}
\]
| Alternative 17 |
|---|
| Error | 29.7% |
|---|
| Cost | 64 |
|---|
\[\lambda_1
\]