\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\]
↓
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 10^{+55}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\end{array}
\]
(FPCore (F B x)
:precision binary64
(+
(- (* x (/ 1.0 (tan B))))
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
↓
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4e+21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e+55)
(- (/ F (/ (sin B) (pow (fma x 2.0 (fma F F 2.0)) -0.5))) t_0)
(+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B))))))))double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
↓
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4e+21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e+55) {
tmp = (F / (sin(B) / pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
}
return tmp;
}
function code(F, B, x)
return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0)))))
end
↓
function code(F, B, x)
t_0 = Float64(x / tan(B))
tmp = 0.0
if (F <= -1.4e+21)
tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
elseif (F <= 1e+55)
tmp = Float64(Float64(F / Float64(sin(B) / (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5))) - t_0);
else
tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
end
return tmp
end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4e+21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e+55], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
↓
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 10^{+55}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Accuracy | 99.6% |
|---|
| Cost | 33160 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -105000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 4 \cdot 10^{+56}:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 99.6% |
|---|
| Cost | 20744 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 6.4 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 99.0% |
|---|
| Cost | 20424 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{\frac{1}{2 + x \cdot 2}}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 99.0% |
|---|
| Cost | 20040 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 91.4% |
|---|
| Cost | 14028 |
|---|
\[\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.42:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -1.3 \cdot 10^{-99}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{\frac{1}{t_0}}}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.074:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{t_0}} - t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 91.4% |
|---|
| Cost | 14028 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -8.3 \cdot 10^{-100}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + F \cdot F}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.09:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 90.8% |
|---|
| Cost | 13896 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.42:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.082:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Accuracy | 82.7% |
|---|
| Cost | 13512 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.16 \cdot 10^{-14}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-39}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Accuracy | 67.7% |
|---|
| Cost | 13448 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.85 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{+25}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{+152}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\]
| Alternative 10 |
|---|
| Accuracy | 67.8% |
|---|
| Cost | 13448 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.72 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{+25}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{+152}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\]
| Alternative 11 |
|---|
| Accuracy | 75.2% |
|---|
| Cost | 13448 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.5 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{+25}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{+152}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\]
| Alternative 12 |
|---|
| Accuracy | 59.4% |
|---|
| Cost | 7944 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -22000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9 \cdot 10^{-272}:\\
\;\;\;\;{\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5} \cdot \left(F \cdot \frac{1}{B}\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{+72} \lor \neg \left(F \leq 6.9 \cdot 10^{+152}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\]
| Alternative 13 |
|---|
| Accuracy | 59.4% |
|---|
| Cost | 7816 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -21500:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.12 \cdot 10^{-272}:\\
\;\;\;\;{\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{+70} \lor \neg \left(F \leq 5.8 \cdot 10^{+152}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\]
| Alternative 14 |
|---|
| Accuracy | 52.0% |
|---|
| Cost | 7509 |
|---|
\[\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.6 \cdot 10^{+95}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.22 \cdot 10^{-220}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2.75 \cdot 10^{-272}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{+26} \lor \neg \left(F \leq 5.3 \cdot 10^{+223}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\]
| Alternative 15 |
|---|
| Accuracy | 55.8% |
|---|
| Cost | 7509 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+96}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{-217}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -1.68 \cdot 10^{-270}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 2.15 \cdot 10^{+70} \lor \neg \left(F \leq 1.6 \cdot 10^{+152}\right):\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\]
| Alternative 16 |
|---|
| Accuracy | 56.7% |
|---|
| Cost | 7509 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.85 \cdot 10^{+95}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.7 \cdot 10^{-219}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -4.7 \cdot 10^{-271}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{+71} \lor \neg \left(F \leq 4.5 \cdot 10^{+152}\right):\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\]
| Alternative 17 |
|---|
| Accuracy | 52.4% |
|---|
| Cost | 7377 |
|---|
\[\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.4 \cdot 10^{-221}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2.3 \cdot 10^{-271}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{+26} \lor \neg \left(F \leq 5.3 \cdot 10^{+223}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\]
| Alternative 18 |
|---|
| Accuracy | 45.8% |
|---|
| Cost | 6856 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.72 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-7}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\]
| Alternative 19 |
|---|
| Accuracy | 41.8% |
|---|
| Cost | 6724 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.05 \cdot 10^{-40}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\]
| Alternative 20 |
|---|
| Accuracy | 38.2% |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 6.3 \cdot 10^{-50}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\]
| Alternative 21 |
|---|
| Accuracy | 26.8% |
|---|
| Cost | 452 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.2 \cdot 10^{-11}:\\
\;\;\;\;1 + \frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\]
| Alternative 22 |
|---|
| Accuracy | 30.0% |
|---|
| Cost | 452 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -3.9 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\]
| Alternative 23 |
|---|
| Accuracy | 26.2% |
|---|
| Cost | 388 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -3.1 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\]
| Alternative 24 |
|---|
| Accuracy | 11.1% |
|---|
| Cost | 192 |
|---|
\[\frac{-1}{B}
\]