\[\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 \cdot 10^{+157}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5000:\\
\;\;\;\;\frac{F \cdot {\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} - t_0\\
\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 -1e+157)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5000.0)
(- (/ (* F (pow (fma x 2.0 (fma F F 2.0)) -0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))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 <= -1e+157) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5000.0) {
tmp = ((F * pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
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 <= -1e+157)
tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
elseif (F <= 5000.0)
tmp = Float64(Float64(Float64(F * (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5)) / sin(B)) - t_0);
else
tmp = Float64(Float64(1.0 / sin(B)) - t_0);
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, -1e+157], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5000.0], N[(N[(N[(F * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $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 \cdot 10^{+157}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5000:\\
\;\;\;\;\frac{F \cdot {\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} - t_0\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Accuracy | 90.1% |
|---|
| Cost | 26568 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.2 \cdot 10^{+70}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 10000000:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 90.1% |
|---|
| Cost | 20744 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -125000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 89.6% |
|---|
| Cost | 20040 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -115:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 7.3:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B} - t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 89.5% |
|---|
| Cost | 20040 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -115:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 10.5:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B} - t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 89.6% |
|---|
| Cost | 20040 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -115:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 6.3:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B} - t_0\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 89.6% |
|---|
| Cost | 20040 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -115:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 51:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B} - t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 78.0% |
|---|
| Cost | 14608 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{1}{\sin B}\\
t_2 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(F \cdot t_1\right) - \frac{x}{B}\\
\mathbf{if}\;F \leq -5000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-252}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-156}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-50}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 - t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Accuracy | 78.0% |
|---|
| Cost | 14480 |
|---|
\[\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -102000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -4.8 \cdot 10^{-252}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-156}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-50}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\]
| Alternative 9 |
|---|
| Accuracy | 74.6% |
|---|
| Cost | 14024 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{-66}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2.25:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B} - t_0\\
\end{array}
\]
| Alternative 10 |
|---|
| Accuracy | 74.1% |
|---|
| Cost | 13512 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{-66}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-91}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
| Alternative 11 |
|---|
| Accuracy | 68.2% |
|---|
| Cost | 13380 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -5.8 \cdot 10^{-66}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.46:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\]
| Alternative 12 |
|---|
| Accuracy | 59.9% |
|---|
| Cost | 7376 |
|---|
\[\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.6 \cdot 10^{+224}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -8.5 \cdot 10^{+141}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -4 \cdot 10^{-66}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-12}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\]
| Alternative 13 |
|---|
| Accuracy | 52.0% |
|---|
| Cost | 7244 |
|---|
\[\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.4 \cdot 10^{+224}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.8 \cdot 10^{+143}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{-66}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\]
| Alternative 14 |
|---|
| Accuracy | 32.1% |
|---|
| Cost | 6788 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -470000000000:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\end{array}
\]
| Alternative 15 |
|---|
| Accuracy | 50.2% |
|---|
| Cost | 6788 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.75 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\]
| Alternative 16 |
|---|
| Accuracy | 30.2% |
|---|
| Cost | 6724 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.75 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\]
| Alternative 17 |
|---|
| Accuracy | 27.0% |
|---|
| Cost | 452 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -5.5 \cdot 10^{-66}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\]
| Alternative 18 |
|---|
| Accuracy | 23.5% |
|---|
| Cost | 388 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.75 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\]
| Alternative 19 |
|---|
| Accuracy | 10.9% |
|---|
| Cost | 192 |
|---|
\[\frac{-1}{B}
\]