Average Error: 14.2 → 0.3
Time: 1.1min
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 -3.147328501440944 \cdot 10^{+40}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 15:\\ \;\;\;\;\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 + \frac{-1 - x}{F \cdot F}}{\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.147328501440944e+40)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 15.0)
       (- (/ F (/ (sin B) (pow (fma F F (fma 2.0 x 2.0)) -0.5))) t_0)
       (+
        (* x (/ -1.0 (tan B)))
        (/ (+ 1.0 (/ (- -1.0 x) (* F F))) (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.147328501440944e+40) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 15.0) {
		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 + ((-1.0 - x) / (F * F))) / 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.147328501440944e+40)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 15.0)
		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(Float64(1.0 + Float64(Float64(-1.0 - x) / Float64(F * F))) / 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.147328501440944e+40], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 15.0], 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[(N[(1.0 + N[(N[(-1.0 - x), $MachinePrecision] / N[(F * F), $MachinePrecision]), $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 -3.147328501440944 \cdot 10^{+40}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

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


\end{array}

Error

Derivation

  1. Split input into 3 regimes
  2. if F < -3.14732850144094412e40

    1. Initial program 29.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. Applied egg-rr29.7

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

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

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

    if -3.14732850144094412e40 < F < 15

    1. Initial program 0.5

      \[\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. Applied egg-rr0.4

      \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    3. Applied egg-rr0.3

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

    if 15 < F

    1. Initial program 24.8

      \[\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. Applied egg-rr18.8

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{1 + -0.5 \cdot \frac{2 \cdot x + 2}{{F}^{2}}}}{\sin B} \]
    4. Simplified0.4

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{1 + \frac{-1 - x}{F \cdot F}}}{\sin B} \]
      Proof
      (+.f64 1 (/.f64 (-.f64 -1 x) (*.f64 F F))): 0 points increase in error, 0 points decrease in error
      (+.f64 1 (/.f64 (Rewrite<= unsub-neg_binary64 (+.f64 -1 (neg.f64 x))) (*.f64 F F))): 0 points increase in error, 0 points decrease in error
      (+.f64 1 (/.f64 (+.f64 (Rewrite<= metadata-eval (*.f64 -1/2 2)) (neg.f64 x)) (*.f64 F F))): 0 points increase in error, 0 points decrease in error
      (+.f64 1 (/.f64 (+.f64 (*.f64 -1/2 2) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 x))) (*.f64 F F))): 0 points increase in error, 0 points decrease in error
      (+.f64 1 (/.f64 (+.f64 (*.f64 -1/2 2) (*.f64 (Rewrite<= metadata-eval (*.f64 -1/2 2)) x)) (*.f64 F F))): 0 points increase in error, 0 points decrease in error
      (+.f64 1 (/.f64 (+.f64 (*.f64 -1/2 2) (Rewrite<= associate-*r*_binary64 (*.f64 -1/2 (*.f64 2 x)))) (*.f64 F F))): 0 points increase in error, 0 points decrease in error
      (+.f64 1 (/.f64 (Rewrite<= distribute-lft-in_binary64 (*.f64 -1/2 (+.f64 2 (*.f64 2 x)))) (*.f64 F F))): 0 points increase in error, 0 points decrease in error
      (+.f64 1 (/.f64 (*.f64 -1/2 (Rewrite=> +-commutative_binary64 (+.f64 (*.f64 2 x) 2))) (*.f64 F F))): 0 points increase in error, 0 points decrease in error
      (+.f64 1 (/.f64 (*.f64 -1/2 (+.f64 (*.f64 2 x) 2)) (Rewrite<= unpow2_binary64 (pow.f64 F 2)))): 0 points increase in error, 0 points decrease in error
      (+.f64 1 (Rewrite<= associate-*r/_binary64 (*.f64 -1/2 (/.f64 (+.f64 (*.f64 2 x) 2) (pow.f64 F 2))))): 0 points increase in error, 0 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification0.3

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

Alternatives

Alternative 1
Error0.3
Cost20616
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.9085804288576213 \cdot 10^{+27}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 9.6 \cdot 10^{+19}:\\ \;\;\;\;\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
Error0.7
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.005:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 0.12:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B}\\ \end{array} \]
Alternative 3
Error7.5
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}\\ \mathbf{if}\;F \leq -27000000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.06 \cdot 10^{-128}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{-211}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 9.6 \cdot 10^{+19}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 4
Error5.2
Cost14480
\[\begin{array}{l} t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\ t_1 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\ t_2 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -27000000:\\ \;\;\;\;\frac{-1}{\sin B} - t_2\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-130}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 10^{-110}:\\ \;\;\;\;t_0 \cdot \frac{F}{B} - t_2\\ \mathbf{elif}\;F \leq 9.6 \cdot 10^{+19}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 5
Error5.2
Cost14480
\[\begin{array}{l} t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -27000000:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-130}:\\ \;\;\;\;t_0 \cdot \left(F \cdot t_2\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 10^{-110}:\\ \;\;\;\;t_0 \cdot \frac{F}{B} - t_1\\ \mathbf{elif}\;F \leq 9.6 \cdot 10^{+19}:\\ \;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + t_2\\ \end{array} \]
Alternative 6
Error9.6
Cost14288
\[\begin{array}{l} t_0 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\ \mathbf{if}\;F \leq -9.4 \cdot 10^{-76}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.06 \cdot 10^{-128}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{-211}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-18}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 7
Error10.7
Cost13772
\[\begin{array}{l} \mathbf{if}\;F \leq -9.5 \cdot 10^{-77}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-82}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 15:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\ \end{array} \]
Alternative 8
Error22.4
Cost13448
\[\begin{array}{l} t_0 := \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -1.4 \cdot 10^{-6}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-82}:\\ \;\;\;\;\left(-x\right) \cdot \frac{\cos B}{\sin B}\\ \mathbf{elif}\;F \leq 15:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.300253322507031 \cdot 10^{+94}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.1296333206450497 \cdot 10^{+170}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 9
Error22.4
Cost13448
\[\begin{array}{l} t_0 := \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -1.4 \cdot 10^{-6}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-82}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 15:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.300253322507031 \cdot 10^{+94}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.1296333206450497 \cdot 10^{+170}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 10
Error15.6
Cost13448
\[\begin{array}{l} t_0 := \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B} - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -9.5 \cdot 10^{-77}:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-82}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 15:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.300253322507031 \cdot 10^{+94}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.1296333206450497 \cdot 10^{+170}:\\ \;\;\;\;\frac{1}{B} - t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 11
Error28.1
Cost8332
\[\begin{array}{l} t_0 := \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -1.4 \cdot 10^{-6}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{-299}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{1}{F}}{\frac{B}{F}}\\ \mathbf{elif}\;F \leq 15:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.300253322507031 \cdot 10^{+94}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.1296333206450497 \cdot 10^{+170}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 12
Error29.1
Cost8152
\[\begin{array}{l} t_0 := \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -1.4 \cdot 10^{-6}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{-299}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{1}{F}}{\frac{B}{F}}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-170}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 14.5:\\ \;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;F \leq 3.300253322507031 \cdot 10^{+94}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.1296333206450497 \cdot 10^{+170}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 13
Error28.1
Cost8020
\[\begin{array}{l} t_0 := \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -1.4 \cdot 10^{-6}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{-299}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{1}{F}}{\frac{B}{F}}\\ \mathbf{elif}\;F \leq 15:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.300253322507031 \cdot 10^{+94}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.1296333206450497 \cdot 10^{+170}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 14
Error30.8
Cost7772
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-1}{\sin B}\\ t_2 := \frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;x \leq -2.6975116082396976 \cdot 10^{-58}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -6.637572555071356 \cdot 10^{-120}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -6.103977516044037 \cdot 10^{-192}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.0964795611971737 \cdot 10^{-260}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.2120149042996737 \cdot 10^{-139}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.075813121129917 \cdot 10^{-90}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.572321028543265 \cdot 10^{-11}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 15
Error38.1
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -9.5 \cdot 10^{-77}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 0.057:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 16
Error35.3
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -6.5 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 0.057:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 17
Error40.1
Cost1096
\[\begin{array}{l} \mathbf{if}\;F \leq -9.5 \cdot 10^{-77}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-23}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\right) - \frac{x}{B}\\ \end{array} \]
Alternative 18
Error40.0
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -9.5 \cdot 10^{-77}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 5.15 \cdot 10^{-23}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 19
Error45.2
Cost520
\[\begin{array}{l} \mathbf{if}\;F \leq -1.46 \cdot 10^{-6}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 1.4549648841079346 \cdot 10^{+23}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 20
Error42.9
Cost520
\[\begin{array}{l} \mathbf{if}\;F \leq -9.5 \cdot 10^{-77}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.4549648841079346 \cdot 10^{+23}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 21
Error52.3
Cost324
\[\begin{array}{l} \mathbf{if}\;F \leq 7.5 \cdot 10^{-23}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 22
Error57.3
Cost192
\[\frac{1}{B} \]

Error

Reproduce

herbie shell --seed 2022317 
(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))))))