\[\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 -3.2:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{+28}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin 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 -3.2)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.2e+28)
(- (/ F (/ (sin B) (pow (fma F F (fma 2.0 x 2.0)) -0.5))) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin 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 <= -3.2) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.2e+28) {
tmp = (F / (sin(B) / pow(fma(F, F, fma(2.0, x, 2.0)), -0.5))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(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 <= -3.2)
tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
elseif (F <= 3.2e+28)
tmp = Float64(Float64(F / Float64(sin(B) / (fma(F, F, fma(2.0, x, 2.0)) ^ -0.5))) - t_0);
else
tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(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, -3.2], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.2e+28], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Power[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $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 -3.2:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{+28}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.4 |
|---|
| Cost | 20616 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.2:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2.7746147388270927 \cdot 10^{+32}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.8 |
|---|
| Cost | 20296 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.00042:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.0041:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\frac{\sin B}{1 + \frac{-1 - x}{F \cdot F}}}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 7.4 |
|---|
| Cost | 14544 |
|---|
\[\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.00042:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -4.8 \cdot 10^{-129}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-103}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.0041:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\frac{\sin B}{1 + \frac{-1 - x}{F \cdot F}}}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 7.4 |
|---|
| Cost | 14288 |
|---|
\[\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.00042:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -4.8 \cdot 10^{-129}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-103}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.0041:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 5.7 |
|---|
| Cost | 14280 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.2:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.0041:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\frac{\sin B}{1 + \frac{-1 - x}{F \cdot F}}}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 10.7 |
|---|
| Cost | 13772 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.2:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -5.4 \cdot 10^{-86}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-63}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 10.7 |
|---|
| Cost | 13772 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -3.2:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -5.4 \cdot 10^{-86}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-63}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 20.6 |
|---|
| Cost | 13580 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -3.2:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -5.4 \cdot 10^{-86}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 10^{-16}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 15.0 |
|---|
| Cost | 13580 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -3.2:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -5.4 \cdot 10^{-86}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 10^{-16}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 25.2 |
|---|
| Cost | 8080 |
|---|
\[\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -6800000000:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.72 \cdot 10^{-192}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.32 \cdot 10^{-101}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{1}{F}}{\frac{B}{F}}\\
\mathbf{elif}\;F \leq 0.0041:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 26.3 |
|---|
| Cost | 7496 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{-193}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-15}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{1}{F}}{\frac{B}{F}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 29.7 |
|---|
| Cost | 7244 |
|---|
\[\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq 10^{-16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 2.0213326276211628 \cdot 10^{+43}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 4.154714223751283 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 27.2 |
|---|
| Cost | 6980 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq 10^{-16}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\]
| Alternative 14 |
|---|
| Error | 34.6 |
|---|
| Cost | 6856 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-63}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\]
| Alternative 15 |
|---|
| Error | 42.0 |
|---|
| Cost | 6724 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{B}\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 44.7 |
|---|
| Cost | 708 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -2.2 \cdot 10^{-20}:\\
\;\;\;\;\frac{-1 - x}{B} + B \cdot -0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{B}\\
\end{array}
\]
| Alternative 17 |
|---|
| Error | 49.1 |
|---|
| Cost | 520 |
|---|
\[\begin{array}{l}
t_0 := -\frac{x}{B}\\
\mathbf{if}\;x \leq -4.529608969130441 \cdot 10^{-127}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 4.1358422872280267 \cdot 10^{-38}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 18 |
|---|
| Error | 44.7 |
|---|
| Cost | 452 |
|---|
\[\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{B}\\
\end{array}
\]
| Alternative 19 |
|---|
| Error | 57.0 |
|---|
| Cost | 192 |
|---|
\[\frac{-1}{B}
\]