Average Error: 13.9 → 0.2
Time: 1.2min
Precision: binary64
Cost: 33160
\[\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.4357031003339343 \cdot 10^{+37}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 430000000:\\ \;\;\;\;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} - \frac{x \cdot \cos B}{\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 -1.4357031003339343e+37)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 430000000.0)
       (- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
       (- (/ 1.0 (sin B)) (/ (* x (cos B)) (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 <= -1.4357031003339343e+37) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 430000000.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)) - ((x * cos(B)) / 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 <= -1.4357031003339343e+37)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 430000000.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)) - Float64(Float64(x * cos(B)) / 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, -1.4357031003339343e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 430000000.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] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / 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 -1.4357031003339343 \cdot 10^{+37}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{elif}\;F \leq 430000000:\\
\;\;\;\;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} - \frac{x \cdot \cos B}{\sin B}\\


\end{array}

Error

Derivation

  1. Split input into 3 regimes
  2. if F < -1.4357031003339343e37

    1. Initial program 27.7

      \[\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)} \]
    2. Simplified21.0

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    3. Applied egg-rr21.0

      \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    4. Taylor expanded in F around -inf 0.1

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]

    if -1.4357031003339343e37 < F < 4.3e8

    1. Initial program 0.4

      \[\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)} \]
    2. Simplified0.3

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]

    if 4.3e8 < F

    1. Initial program 26.2

      \[\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)} \]
    2. Simplified20.2

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    3. Taylor expanded in F around inf 0.2

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
    4. Applied egg-rr0.2

      \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{1}{\tan B} \cdot x} \]
    5. Taylor expanded in B around inf 0.2

      \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{\cos B \cdot x}{\sin B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.4357031003339343 \cdot 10^{+37}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 430000000:\\ \;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\ \end{array} \]

Alternatives

Alternative 1
Error0.5
Cost26696
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.945946785869894 \cdot 10^{+92}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1:\\ \;\;\;\;\frac{1}{\frac{\sin B}{F} \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 2
Error0.4
Cost26696
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.4357031003339343 \cdot 10^{+37}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1:\\ \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 3
Error0.4
Cost20616
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.945946785869894 \cdot 10^{+92}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 430000000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 4
Error5.4
Cost20304
\[\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 -18:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-39}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 10^{-118}:\\ \;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_1\\ \mathbf{elif}\;F \leq 430000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 5
Error0.7
Cost20040
\[\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 105:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 6
Error5.4
Cost14480
\[\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 -18:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-39}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 10^{-118}:\\ \;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_1\\ \mathbf{elif}\;F \leq 430000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 7
Error5.9
Cost14284
\[\begin{array}{l} t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.1 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq 10^{-118}:\\ \;\;\;\;\frac{F}{B} \cdot t_0 - t_1\\ \mathbf{elif}\;F \leq 0.28:\\ \;\;\;\;\frac{1}{\frac{\sin B}{F \cdot t_0}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 8
Error7.8
Cost14156
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.009:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -6 \cdot 10^{-122}:\\ \;\;\;\;F \cdot \left(\frac{1}{\sin B} \cdot \sqrt{0.5}\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-221}:\\ \;\;\;\;\frac{1}{\frac{\sin B}{F} \cdot \left(\frac{-1}{F} - F\right)} - t_0\\ \mathbf{elif}\;F \leq 0.28:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 9
Error15.8
Cost14040
\[\begin{array}{l} t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\ \mathbf{if}\;F \leq -1.4040280526121212 \cdot 10^{+70}:\\ \;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;F \leq -1.15 \cdot 10^{+21}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -1.4 \cdot 10^{-65}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -6 \cdot 10^{-122}:\\ \;\;\;\;F \cdot \left(t_0 \cdot \left(\frac{1}{B} + B \cdot 0.16666666666666666\right)\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.9 \cdot 10^{-116}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{-29}:\\ \;\;\;\;F \cdot \left(t_0 \cdot \frac{1}{B}\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 10
Error5.9
Cost14024
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.1 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{-119}:\\ \;\;\;\;\frac{1}{\sqrt{2 + x \cdot 2} \cdot \frac{B}{F}} - t_0\\ \mathbf{elif}\;F \leq 0.28:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 11
Error5.9
Cost14024
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.1 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{-119}:\\ \;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\ \mathbf{elif}\;F \leq 0.28:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 12
Error7.8
Cost13904
\[\begin{array}{l} t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -0.009:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -6 \cdot 10^{-122}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-221}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 0.28:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 13
Error7.8
Cost13904
\[\begin{array}{l} \mathbf{if}\;F \leq -0.009:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -6 \cdot 10^{-122}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-221}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 0.28:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 14
Error7.8
Cost13904
\[\begin{array}{l} \mathbf{if}\;F \leq -0.009:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -6 \cdot 10^{-122}:\\ \;\;\;\;F \cdot \left(\frac{1}{\sin B} \cdot \sqrt{0.5}\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-221}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 0.28:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 15
Error20.9
Cost13844
\[\begin{array}{l} t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.4040280526121212 \cdot 10^{+70}:\\ \;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;F \leq -1.15 \cdot 10^{+21}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -1.4 \cdot 10^{-65}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_1\\ \mathbf{elif}\;F \leq -6 \cdot 10^{-122}:\\ \;\;\;\;F \cdot \left(t_0 \cdot \left(\frac{1}{B} + B \cdot 0.16666666666666666\right)\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.9 \cdot 10^{-116}:\\ \;\;\;\;\left(-x\right) \cdot \frac{\cos B}{\sin B}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{-29}:\\ \;\;\;\;F \cdot \left(t_0 \cdot \frac{1}{B}\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.3314255078178852 \cdot 10^{+188}:\\ \;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t_1\\ \end{array} \]
Alternative 16
Error20.9
Cost13844
\[\begin{array}{l} t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.4040280526121212 \cdot 10^{+70}:\\ \;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;F \leq -1.15 \cdot 10^{+21}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -1.4 \cdot 10^{-65}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_1\\ \mathbf{elif}\;F \leq -6 \cdot 10^{-122}:\\ \;\;\;\;F \cdot \left(t_0 \cdot \left(\frac{1}{B} + B \cdot 0.16666666666666666\right)\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.9 \cdot 10^{-116}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{-29}:\\ \;\;\;\;F \cdot \left(t_0 \cdot \frac{1}{B}\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.3314255078178852 \cdot 10^{+188}:\\ \;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t_1\\ \end{array} \]
Alternative 17
Error11.1
Cost13644
\[\begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{-65}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4.9 \cdot 10^{-116}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{-29}:\\ \;\;\;\;F \cdot \left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{1}{B}\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 18
Error25.9
Cost8536
\[\begin{array}{l} t_0 := F \cdot \left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \left(\frac{1}{B} + B \cdot 0.16666666666666666\right)\right) - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{F}{B} \cdot \frac{-1}{F} - t_1\\ \mathbf{if}\;F \leq -1.4040280526121212 \cdot 10^{+70}:\\ \;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;F \leq -1.15 \cdot 10^{+21}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -1.4 \cdot 10^{-65}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -3.5 \cdot 10^{-143}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-221}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{-29}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.3314255078178852 \cdot 10^{+188}:\\ \;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t_1\\ \end{array} \]
Alternative 19
Error25.9
Cost8280
\[\begin{array}{l} t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{F}{B} \cdot \frac{-1}{F} - t_1\\ \mathbf{if}\;F \leq -1.4040280526121212 \cdot 10^{+70}:\\ \;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;F \leq -1.15 \cdot 10^{+21}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -1.4 \cdot 10^{-65}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -3.5 \cdot 10^{-143}:\\ \;\;\;\;\frac{F}{B} \cdot t_0 - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-221}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{-29}:\\ \;\;\;\;F \cdot \left(t_0 \cdot \frac{1}{B}\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.3314255078178852 \cdot 10^{+188}:\\ \;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t_1\\ \end{array} \]
Alternative 20
Error25.9
Cost8152
\[\begin{array}{l} t_0 := \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{F}{B} \cdot \frac{-1}{F} - t_1\\ \mathbf{if}\;F \leq -1.4040280526121212 \cdot 10^{+70}:\\ \;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;F \leq -1.15 \cdot 10^{+21}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -1.4 \cdot 10^{-65}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -3.5 \cdot 10^{-143}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-221}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{-29}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.3314255078178852 \cdot 10^{+188}:\\ \;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t_1\\ \end{array} \]
Alternative 21
Error31.8
Cost7768
\[\begin{array}{l} t_0 := \frac{1}{B} - \frac{x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ t_2 := \frac{-1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{if}\;x \leq -1.4371931162262393 \cdot 10^{-38}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -1.86804475378786 \cdot 10^{-103}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;x \leq -6.7790892762042 \cdot 10^{-171}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 8.315396930167398 \cdot 10^{-251}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.1159527754724599 \cdot 10^{-193}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.6664824042772734 \cdot 10^{-119}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 22
Error31.8
Cost7640
\[\begin{array}{l} t_0 := \frac{1}{B} - \frac{x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;x \leq -1.4371931162262393 \cdot 10^{-38}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -1.86804475378786 \cdot 10^{-103}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;x \leq -6.7790892762042 \cdot 10^{-171}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 8.315396930167398 \cdot 10^{-251}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.871084928751322 \cdot 10^{-211}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;x \leq 4.3812494107487065 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 23
Error27.4
Cost7632
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.4040280526121212 \cdot 10^{+70}:\\ \;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;F \leq -1.15 \cdot 10^{+21}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-68}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_0\\ \mathbf{elif}\;F \leq 1.3314255078178852 \cdot 10^{+188}:\\ \;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t_0\\ \end{array} \]
Alternative 24
Error37.6
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -3.2 \cdot 10^{-80}:\\ \;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) - \frac{x + 1}{B}\\ \mathbf{elif}\;F \leq 4.8 \cdot 10^{-68}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 25
Error40.3
Cost1224
\[\begin{array}{l} \mathbf{if}\;F \leq -3.2 \cdot 10^{-80}:\\ \;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) - \frac{x + 1}{B}\\ \mathbf{elif}\;F \leq 1.25 \cdot 10^{-48}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{B} + B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right)\right) - \frac{x}{B}\\ \end{array} \]
Alternative 26
Error40.2
Cost836
\[\begin{array}{l} \mathbf{if}\;F \leq -3.2 \cdot 10^{-80}:\\ \;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) - \frac{x + 1}{B}\\ \mathbf{elif}\;F \leq 1.25 \cdot 10^{-48}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{B}\\ \end{array} \]
Alternative 27
Error40.1
Cost712
\[\begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{-65}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.25 \cdot 10^{-48}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{B}\\ \end{array} \]
Alternative 28
Error40.1
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{-65}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.25 \cdot 10^{-48}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 29
Error49.0
Cost520
\[\begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;x \leq -1.86804475378786 \cdot 10^{-103}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 2.629483953045877 \cdot 10^{-115}:\\ \;\;\;\;\frac{1}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 30
Error42.6
Cost520
\[\begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{-65}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{-47}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 31
Error57.2
Cost192
\[\frac{1}{B} \]

Error

Reproduce

herbie shell --seed 2022217 
(FPCore (F B x)
  :name "VandenBroeck and Keller, Equation (23)"
  :precision binary64
  (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))