\[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right|
\]
↓
\[\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{-\tan t \cdot eh}{ew}\right) - \frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right|
\]
(FPCore (eh ew t)
:precision binary64
(fabs
(-
(* (* ew (cos t)) (cos (atan (/ (* (- eh) (tan t)) ew))))
(* (* eh (sin t)) (sin (atan (/ (* (- eh) (tan t)) ew)))))))
↓
(FPCore (eh ew t)
:precision binary64
(fabs
(-
(* (* eh (sin t)) (sin (atan (/ (- (* (tan t) eh)) ew))))
(/ (* ew (cos t)) (hypot 1.0 (* (tan t) (/ eh ew)))))))
double code(double eh, double ew, double t) {
return fabs((((ew * cos(t)) * cos(atan(((-eh * tan(t)) / ew)))) - ((eh * sin(t)) * sin(atan(((-eh * tan(t)) / ew))))));
}
↓
double code(double eh, double ew, double t) {
return fabs((((eh * sin(t)) * sin(atan((-(tan(t) * eh) / ew)))) - ((ew * cos(t)) / hypot(1.0, (tan(t) * (eh / ew))))));
}
public static double code(double eh, double ew, double t) {
return Math.abs((((ew * Math.cos(t)) * Math.cos(Math.atan(((-eh * Math.tan(t)) / ew)))) - ((eh * Math.sin(t)) * Math.sin(Math.atan(((-eh * Math.tan(t)) / ew))))));
}
↓
public static double code(double eh, double ew, double t) {
return Math.abs((((eh * Math.sin(t)) * Math.sin(Math.atan((-(Math.tan(t) * eh) / ew)))) - ((ew * Math.cos(t)) / Math.hypot(1.0, (Math.tan(t) * (eh / ew))))));
}
def code(eh, ew, t):
return math.fabs((((ew * math.cos(t)) * math.cos(math.atan(((-eh * math.tan(t)) / ew)))) - ((eh * math.sin(t)) * math.sin(math.atan(((-eh * math.tan(t)) / ew))))))
↓
def code(eh, ew, t):
return math.fabs((((eh * math.sin(t)) * math.sin(math.atan((-(math.tan(t) * eh) / ew)))) - ((ew * math.cos(t)) / math.hypot(1.0, (math.tan(t) * (eh / ew))))))
function code(eh, ew, t)
return abs(Float64(Float64(Float64(ew * cos(t)) * cos(atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)))) - Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(Float64(-eh) * tan(t)) / ew))))))
end
↓
function code(eh, ew, t)
return abs(Float64(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(-Float64(tan(t) * eh)) / ew)))) - Float64(Float64(ew * cos(t)) / hypot(1.0, Float64(tan(t) * Float64(eh / ew))))))
end
function tmp = code(eh, ew, t)
tmp = abs((((ew * cos(t)) * cos(atan(((-eh * tan(t)) / ew)))) - ((eh * sin(t)) * sin(atan(((-eh * tan(t)) / ew))))));
end
↓
function tmp = code(eh, ew, t)
tmp = abs((((eh * sin(t)) * sin(atan((-(tan(t) * eh) / ew)))) - ((ew * cos(t)) / hypot(1.0, (tan(t) * (eh / ew))))));
end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
↓
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[((-N[(N[Tan[t], $MachinePrecision] * eh), $MachinePrecision]) / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[Tan[t], $MachinePrecision] * N[(eh / ew), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right) - \left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\right|
↓
\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{-\tan t \cdot eh}{ew}\right) - \frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right|
Alternatives
| Alternative 1 |
|---|
| Error | 5.6 |
|---|
| Cost | 52808 |
|---|
\[\begin{array}{l}
t_1 := \frac{\tan t}{ew}\\
t_2 := ew \cdot \cos t\\
t_3 := \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\\
t_4 := t_2 \cdot \cos t_3\\
\mathbf{if}\;eh \leq -4.25 \cdot 10^{-187}:\\
\;\;\;\;\left|t_4 - eh \cdot \left(\sin t \cdot \sin t_3\right)\right|\\
\mathbf{elif}\;eh \leq 2.15 \cdot 10^{-156}:\\
\;\;\;\;\left|t_2 \cdot \cos \tan^{-1} \left(\frac{1}{eh} \cdot \left(\left(eh \cdot eh\right) \cdot t_1\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t_4 - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\left(-eh\right) \cdot t_1\right)\right)\right|\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 5.6 |
|---|
| Cost | 46409 |
|---|
\[\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\\
t_2 := ew \cdot \cos t\\
\mathbf{if}\;eh \leq -2.25 \cdot 10^{-186} \lor \neg \left(eh \leq 9 \cdot 10^{-155}\right):\\
\;\;\;\;\left|t_2 \cdot \cos t_1 - eh \cdot \left(\sin t \cdot \sin t_1\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t_2 \cdot \cos \tan^{-1} \left(\frac{1}{eh} \cdot \left(\left(eh \cdot eh\right) \cdot \frac{\tan t}{ew}\right)\right)\right|\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 8.5 |
|---|
| Cost | 40392 |
|---|
\[\begin{array}{l}
t_1 := t \cdot \frac{eh}{ew}\\
t_2 := ew \cdot \cos t\\
t_3 := \left|t_2 \cdot \cos \tan^{-1} \left(eh \cdot \frac{1}{\frac{ew \cdot \frac{eh}{\tan t}}{eh}}\right)\right|\\
t_4 := \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\\
\mathbf{if}\;ew \leq -3.2 \cdot 10^{+161}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;ew \leq -1.2 \cdot 10^{-16}:\\
\;\;\;\;\left|t_2 \cdot \cos t_4 - \frac{eh}{\mathsf{hypot}\left(1, t_1\right)} \cdot \left(\sin t \cdot t_1\right)\right|\\
\mathbf{elif}\;ew \leq 1.6 \cdot 10^{+108}:\\
\;\;\;\;\left|ew \cdot \cos \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right) - eh \cdot \left(\sin t \cdot \sin t_4\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 8.6 |
|---|
| Cost | 39881 |
|---|
\[\begin{array}{l}
\mathbf{if}\;eh \leq -1.35 \cdot 10^{-10} \lor \neg \left(eh \leq 3.9 \cdot 10^{-100}\right):\\
\;\;\;\;\left|ew \cdot \cos \tan^{-1} \left(\frac{eh \cdot \left(-t\right)}{ew}\right) - eh \cdot \left(\sin t \cdot \sin \tan^{-1} \left(\frac{-t}{\frac{ew}{eh}}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\frac{1}{eh} \cdot \left(\left(eh \cdot eh\right) \cdot \frac{\tan t}{ew}\right)\right)\right|\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 24.8 |
|---|
| Cost | 32640 |
|---|
\[\left|\left(ew \cdot \cos t\right) \cdot \cos \tan^{-1} \left(\left(-eh\right) \cdot \frac{\tan t}{ew}\right)\right|
\]
| Alternative 6 |
|---|
| Error | 25.0 |
|---|
| Cost | 26368 |
|---|
\[\left|\left(ew \cdot \cos t\right) \cdot \frac{1}{\mathsf{hypot}\left(1, eh \cdot \frac{\tan t}{ew}\right)}\right|
\]
| Alternative 7 |
|---|
| Error | 25.0 |
|---|
| Cost | 26240 |
|---|
\[\left|\frac{\cos t}{\frac{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}{ew}}\right|
\]
| Alternative 8 |
|---|
| Error | 25.0 |
|---|
| Cost | 26240 |
|---|
\[\left|\frac{ew \cdot \cos t}{\mathsf{hypot}\left(1, \tan t \cdot \frac{eh}{ew}\right)}\right|
\]
| Alternative 9 |
|---|
| Error | 37.2 |
|---|
| Cost | 6464 |
|---|
\[\left|ew\right|
\]