Math FPCore C Julia Wolfram TeX \[\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 -5 \cdot 10^{+83}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 155000000:\\
\;\;\;\;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} - 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 -5e+83)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 155000000.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 <= -5e+83) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 155000000.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 <= -5e+83)
tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
elseif (F <= 155000000.0)
tmp = Float64(Float64(F * Float64((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, -5e+83], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 155000000.0], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $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 -5 \cdot 10^{+83}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 155000000:\\
\;\;\;\;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} - t_0\\
\end{array}
Alternatives Alternative 1 Accuracy 99.7% Cost 33160
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+83}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 155000000:\\
\;\;\;\;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} - t_0\\
\end{array}
\]
Alternative 2 Accuracy 99.3% Cost 33156
\[\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\frac{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}{\frac{1}{\sin B}}}\\
\end{array}
\]
Alternative 3 Accuracy 99.7% Cost 26696
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 50000000:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
Alternative 4 Accuracy 99.6% Cost 20744
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 135000000:\\
\;\;\;\;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 5 Accuracy 99.6% Cost 20744
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \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 6 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.45:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
Alternative 7 Accuracy 91.9% Cost 14216
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -1.95 \cdot 10^{-144}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.066:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
Alternative 8 Accuracy 68.3% Cost 14044
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \cos B \cdot \frac{-x}{\sin B}\\
\mathbf{if}\;F \leq -6.1 \cdot 10^{+147}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -4.4 \cdot 10^{-79}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 5.4 \cdot 10^{-165}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-95}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 0.0007:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{B \cdot F} - t_0\\
\end{array}
\]
Alternative 9 Accuracy 84.9% Cost 14040
\[\begin{array}{l}
t_0 := \cos B \cdot \frac{-x}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0044:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -1.2 \cdot 10^{-80}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 5.4 \cdot 10^{-165}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 8.4 \cdot 10^{-96}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-34}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\]
Alternative 10 Accuracy 84.9% Cost 14040
\[\begin{array}{l}
t_0 := \cos B \cdot \frac{-x}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0046:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-80}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 5.4 \cdot 10^{-165}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.95 \cdot 10^{-95}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-36}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-6}:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot F\right) \cdot 0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\]
Alternative 11 Accuracy 87.6% Cost 14040
\[\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
t_1 := \cos B \cdot \frac{-x}{\sin B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0065:\\
\;\;\;\;\frac{-1}{\sin B} - t_2\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{-207}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-165}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 10^{-95}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.02 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.06 \cdot 10^{-5}:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot F\right) \cdot 0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_2\\
\end{array}
\]
Alternative 12 Accuracy 77.1% Cost 13912
\[\begin{array}{l}
t_0 := \cos B \cdot \frac{-x}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0125:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -2.42 \cdot 10^{-79}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{elif}\;F \leq 5.4 \cdot 10^{-165}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 9.8 \cdot 10^{-96}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-33}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-5}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{B \cdot F} - t_1\\
\end{array}
\]
Alternative 13 Accuracy 60.5% Cost 13780
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{B} - t_0\\
\mathbf{if}\;F \leq -6 \cdot 10^{+146}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -0.0042:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-94}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{B \cdot F} - t_0\\
\end{array}
\]
Alternative 14 Accuracy 91.7% Cost 13772
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0102:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{-144}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.066:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\]
Alternative 15 Accuracy 55.9% Cost 7508
\[\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{-78}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.08 \cdot 10^{-259}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{-243}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}}\\
\mathbf{elif}\;x \leq 9.2 \cdot 10^{-238}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 16 Accuracy 54.5% Cost 7244
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.1 \cdot 10^{+147}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -2.45 \cdot 10^{-27}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-95}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\]
Alternative 17 Accuracy 60.2% Cost 7244
\[\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{+150}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -0.0042:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-93}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\]
Alternative 18 Accuracy 44.3% Cost 7120
\[\begin{array}{l}
\mathbf{if}\;F \leq -4.7 \cdot 10^{+188}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -2.45 \cdot 10^{-27}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-38}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{+167}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\]
Alternative 19 Accuracy 43.6% Cost 6856
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{+188}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -2.45 \cdot 10^{-27}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.52 \cdot 10^{-92}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\]
Alternative 20 Accuracy 43.5% Cost 1096
\[\begin{array}{l}
\mathbf{if}\;F \leq -3.4 \cdot 10^{-36}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-92}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\]
Alternative 21 Accuracy 43.5% Cost 1096
\[\begin{array}{l}
\mathbf{if}\;F \leq -2.55 \cdot 10^{-37}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.95 \cdot 10^{-92}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\]
Alternative 22 Accuracy 43.5% Cost 968
\[\begin{array}{l}
\mathbf{if}\;F \leq -4.4 \cdot 10^{-36}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.52 \cdot 10^{-92}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B} + x \cdot \left(B \cdot 0.3333333333333333\right)\\
\end{array}
\]
Alternative 23 Accuracy 43.6% Cost 584
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.25 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-49}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\]
Alternative 24 Accuracy 36.5% Cost 452
\[\begin{array}{l}
\mathbf{if}\;F \leq -2.95 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\]
Alternative 25 Accuracy 29.4% Cost 388
\[\begin{array}{l}
\mathbf{if}\;F \leq -1.5 \cdot 10^{+289}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\]
Alternative 26 Accuracy 10.3% Cost 192
\[\frac{-1}{B}
\]