Average Error: 14.0 → 2.2
Time: 40.6s
Precision: binary64
Cost: 26632
\[\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 -2.55 \cdot 10^{+187}:\\ \;\;\;\;\left(-F\right) \cdot \left(e^{\log \left(\frac{-1}{F}\right)} \cdot \frac{-1}{\sin B}\right) - t_0\\ \mathbf{elif}\;F \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{F \cdot {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\log \left(\frac{1}{F}\right)} \cdot F}{\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 -2.55e+187)
     (- (* (- F) (* (exp (log (/ -1.0 F))) (/ -1.0 (sin B)))) t_0)
     (if (<= F 1.35e+154)
       (- (/ (* F (pow (fma F F 2.0) -0.5)) (sin B)) t_0)
       (- (/ (* (exp (log (/ 1.0 F))) F) (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 <= -2.55e+187) {
		tmp = (-F * (exp(log((-1.0 / F))) * (-1.0 / sin(B)))) - t_0;
	} else if (F <= 1.35e+154) {
		tmp = ((F * pow(fma(F, F, 2.0), -0.5)) / sin(B)) - t_0;
	} else {
		tmp = ((exp(log((1.0 / F))) * F) / 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 <= -2.55e+187)
		tmp = Float64(Float64(Float64(-F) * Float64(exp(log(Float64(-1.0 / F))) * Float64(-1.0 / sin(B)))) - t_0);
	elseif (F <= 1.35e+154)
		tmp = Float64(Float64(Float64(F * (fma(F, F, 2.0) ^ -0.5)) / sin(B)) - t_0);
	else
		tmp = Float64(Float64(Float64(exp(log(Float64(1.0 / F))) * F) / 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, -2.55e+187], N[(N[((-F) * N[(N[Exp[N[Log[N[(-1.0 / F), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.35e+154], N[(N[(N[(F * N[Power[N[(F * F + 2.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(N[Exp[N[Log[N[(1.0 / F), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * F), $MachinePrecision] / 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 -2.55 \cdot 10^{+187}:\\
\;\;\;\;\left(-F\right) \cdot \left(e^{\log \left(\frac{-1}{F}\right)} \cdot \frac{-1}{\sin B}\right) - t_0\\

\mathbf{elif}\;F \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{F \cdot {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}{\sin B} - t_0\\

\mathbf{else}:\\
\;\;\;\;\frac{e^{\log \left(\frac{1}{F}\right)} \cdot F}{\sin B} - t_0\\


\end{array}

Error

Derivation

  1. Split input into 3 regimes
  2. if F < -2.55e187

    1. Initial program 43.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. Simplified43.6

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

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

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

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

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

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

      \[\leadsto \left(-F\right) \cdot \left(\color{blue}{e^{\log \left(\frac{-1}{F}\right)}} \cdot \frac{-1}{\sin B}\right) - \frac{x}{\tan B} \]

    if -2.55e187 < F < 1.35000000000000003e154

    1. Initial program 3.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. Simplified3.7

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

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

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

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

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

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

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

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

    if 1.35000000000000003e154 < F

    1. Initial program 41.3

      \[\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. Simplified41.2

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

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

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

      \[\leadsto \frac{\color{blue}{e^{\log \left(\frac{1}{F}\right)} \cdot F}}{\sin B} - \frac{x}{\tan B} \]
  3. Recombined 3 regimes into one program.

Alternatives

Alternative 1
Error2.2
Cost26632
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.55 \cdot 10^{+187}:\\ \;\;\;\;\frac{e^{\log \left(\frac{-1}{F}\right)} \cdot F}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}{\sin B} \cdot F - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\log \left(\frac{1}{F}\right)} \cdot F}{\sin B} - t_0\\ \end{array} \]
Alternative 2
Error2.2
Cost26632
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.55 \cdot 10^{+187}:\\ \;\;\;\;\frac{e^{\log \left(\frac{-1}{F}\right)} \cdot F}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{F \cdot {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\log \left(\frac{1}{F}\right)} \cdot F}{\sin B} - t_0\\ \end{array} \]
Alternative 3
Error2.4
Cost26568
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.7 \cdot 10^{+89}:\\ \;\;\;\;\frac{e^{\log \left(\frac{-1}{F}\right)} \cdot F}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.25 \cdot 10^{+134}:\\ \;\;\;\;\left(-t_0\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\log \left(\frac{1}{F}\right)} \cdot F}{\sin B} - t_0\\ \end{array} \]
Alternative 4
Error5.3
Cost26436
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := e^{\log \left(\frac{1}{F}\right)}\\ \mathbf{if}\;F \leq -3.3 \cdot 10^{+89}:\\ \;\;\;\;\frac{e^{\log \left(\frac{-1}{F}\right)} \cdot F}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 8.8 \cdot 10^{+133}:\\ \;\;\;\;\left(-t_0\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \begin{array}{l} \mathbf{if}\;F \ne 0:\\ \;\;\;\;\frac{1}{\frac{\frac{\sin B}{t_1}}{F}}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot t_1}{\sin B}\\ \end{array}\\ \end{array} \]
Alternative 5
Error13.7
Cost21016
\[\begin{array}{l} t_0 := {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}\\ t_1 := e^{\log \left(\frac{1}{F}\right)}\\ t_2 := \frac{x}{\tan B}\\ t_3 := \frac{F \cdot t_0}{B} - t_2\\ \mathbf{if}\;F \leq -6.5 \cdot 10^{+221}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq -2.55 \cdot 10^{+187}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot e^{\log \left(\frac{-1}{F}\right)}\\ \mathbf{elif}\;F \leq -6 \cdot 10^{+148}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq -3 \cdot 10^{-25}:\\ \;\;\;\;\left(-F\right) \cdot \left(t_0 \cdot \frac{-1}{\sin B}\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 10500000:\\ \;\;\;\;\frac{{2}^{-0.5} \cdot F}{\sin B} - t_2\\ \mathbf{else}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \begin{array}{l} \mathbf{if}\;F \ne 0:\\ \;\;\;\;\frac{1}{\frac{\frac{\sin B}{t_1}}{F}}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot t_1}{\sin B}\\ \end{array}\\ \end{array} \]
Alternative 6
Error13.7
Cost20884
\[\begin{array}{l} t_0 := {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{F \cdot t_0}{B} - t_1\\ \mathbf{if}\;F \leq -3.2 \cdot 10^{+226}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -1.85 \cdot 10^{+190}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot e^{\log \left(\frac{-1}{F}\right)}\\ \mathbf{elif}\;F \leq -1.4 \cdot 10^{+147}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -3 \cdot 10^{-25}:\\ \;\;\;\;\left(-F\right) \cdot \left(t_0 \cdot \frac{-1}{\sin B}\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 10500000:\\ \;\;\;\;\frac{{2}^{-0.5} \cdot F}{\sin B} - t_1\\ \mathbf{else}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \frac{1}{\sin B} \cdot \left(F \cdot e^{\log \left(\frac{1}{F}\right)}\right)\\ \end{array} \]
Alternative 7
Error10.6
Cost20872
\[\begin{array}{l} t_0 := e^{\log \left(\frac{1}{F}\right)}\\ \mathbf{if}\;F \leq -3.65 \cdot 10^{+264}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{-1}{F}\right)} \cdot F}{B}\\ \mathbf{elif}\;F \leq 1.55 \cdot 10^{+134}:\\ \;\;\;\;\left(-\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)}\\ \mathbf{else}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \begin{array}{l} \mathbf{if}\;F \ne 0:\\ \;\;\;\;\frac{1}{\frac{\frac{\sin B}{t_0}}{F}}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot t_0}{\sin B}\\ \end{array}\\ \end{array} \]
Alternative 8
Error15.5
Cost20760
\[\begin{array}{l} t_0 := {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}\\ t_1 := \frac{t_0 \cdot F}{\sin B} - \frac{x}{B}\\ t_2 := \frac{x}{\tan B}\\ t_3 := \frac{F \cdot t_0}{B} - t_2\\ \mathbf{if}\;F \leq -6 \cdot 10^{+224}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq -6.8 \cdot 10^{+196}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot e^{\log \left(\frac{-1}{F}\right)}\\ \mathbf{elif}\;F \leq -1 \cdot 10^{+149}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq -2.85 \cdot 10^{-5}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 10500000:\\ \;\;\;\;\frac{{2}^{-0.5} \cdot F}{\sin B} - t_2\\ \mathbf{elif}\;F \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{1}{F}\right)} \cdot F}{B}\\ \end{array} \]
Alternative 9
Error13.5
Cost20756
\[\begin{array}{l} t_0 := {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{F \cdot t_0}{B} - t_1\\ \mathbf{if}\;F \leq -1.45 \cdot 10^{+225}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -2.3 \cdot 10^{+188}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot e^{\log \left(\frac{-1}{F}\right)}\\ \mathbf{elif}\;F \leq -7.2 \cdot 10^{+146}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -2.3 \cdot 10^{-6}:\\ \;\;\;\;\frac{t_0 \cdot F}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 10500000:\\ \;\;\;\;\frac{{2}^{-0.5} \cdot F}{\sin B} - t_1\\ \mathbf{else}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \frac{e^{\log \left(\frac{1}{F}\right)}}{\sin B} \cdot F\\ \end{array} \]
Alternative 10
Error13.7
Cost20756
\[\begin{array}{l} t_0 := {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{F \cdot t_0}{B} - t_1\\ \mathbf{if}\;F \leq -5 \cdot 10^{+222}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -3.7 \cdot 10^{+193}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot e^{\log \left(\frac{-1}{F}\right)}\\ \mathbf{elif}\;F \leq -5.4 \cdot 10^{+147}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -3 \cdot 10^{-25}:\\ \;\;\;\;\left(-F\right) \cdot \left(t_0 \cdot \frac{-1}{\sin B}\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 10500000:\\ \;\;\;\;\frac{{2}^{-0.5} \cdot F}{\sin B} - t_1\\ \mathbf{else}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \frac{e^{\log \left(\frac{1}{F}\right)}}{\sin B} \cdot F\\ \end{array} \]
Alternative 11
Error16.6
Cost20500
\[\begin{array}{l} t_0 := -\frac{x}{B}\\ t_1 := \frac{F}{\sin B}\\ t_2 := \frac{x}{\tan B}\\ t_3 := \frac{F \cdot {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}{B} - t_2\\ \mathbf{if}\;F \leq -4 \cdot 10^{+226}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq -1.2 \cdot 10^{+190}:\\ \;\;\;\;t_0 + t_1 \cdot e^{\log \left(\frac{-1}{F}\right)}\\ \mathbf{elif}\;F \leq -1.4 \cdot 10^{+88}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq -3 \cdot 10^{-25}:\\ \;\;\;\;t_0 + t_1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{elif}\;F \leq 10500000:\\ \;\;\;\;\frac{{2}^{-0.5} \cdot F}{\sin B} - t_2\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{+176}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + t_1 \cdot \frac{1}{F}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{1}{F}\right)} \cdot F}{B}\\ \end{array} \]
Alternative 12
Error17.9
Cost20236
\[\begin{array}{l} t_0 := \frac{F}{\sin B}\\ \mathbf{if}\;F \leq -1.18 \cdot 10^{+198}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{-1}{F}\right)} \cdot F}{B}\\ \mathbf{elif}\;F \leq -3 \cdot 10^{-25}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + t_0 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{elif}\;F \leq 10500000:\\ \;\;\;\;\frac{{2}^{-0.5} \cdot F}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{+175}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + t_0 \cdot \frac{1}{F}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{1}{F}\right)} \cdot F}{B}\\ \end{array} \]
Alternative 13
Error17.6
Cost20236
\[\begin{array}{l} t_0 := \frac{F}{\sin B}\\ t_1 := e^{\log \left(\frac{-1}{F}\right)}\\ \mathbf{if}\;F \leq -2.6 \cdot 10^{+266}:\\ \;\;\;\;\frac{\left(-x\right) + t_1 \cdot F}{B}\\ \mathbf{elif}\;F \leq -6400:\\ \;\;\;\;\left(-\frac{x}{B}\right) + t_0 \cdot t_1\\ \mathbf{elif}\;F \leq 10500000:\\ \;\;\;\;\frac{{2}^{-0.5} \cdot F}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.05 \cdot 10^{+175}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + t_0 \cdot \frac{1}{F}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{1}{F}\right)} \cdot F}{B}\\ \end{array} \]
Alternative 14
Error27.7
Cost14472
\[\begin{array}{l} \mathbf{if}\;F \leq -1.18 \cdot 10^{+198}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{-1}{F}\right)} \cdot F}{B}\\ \mathbf{elif}\;F \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{1}{F}\right)} \cdot F}{B}\\ \end{array} \]
Alternative 15
Error30.0
Cost14024
\[\begin{array}{l} t_0 := \frac{F}{\sin B}\\ \mathbf{if}\;F \leq -3.1 \cdot 10^{+65}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{-1}{F}\right)} \cdot F}{B}\\ \mathbf{elif}\;F \leq 1.65:\\ \;\;\;\;\left(-\frac{x}{B}\right) + t_0 \cdot {\left(2 \cdot x + 2\right)}^{-0.5}\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{+175}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + t_0 \cdot \frac{1}{F}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{1}{F}\right)} \cdot F}{B}\\ \end{array} \]
Alternative 16
Error34.0
Cost13836
\[\begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{-25}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{-1}{F}\right)} \cdot F}{B}\\ \mathbf{elif}\;F \leq 95:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \left(0.16666666666666666 \cdot \left(F \cdot B\right) + \frac{F}{B}\right) \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{elif}\;F \leq 1.6 \cdot 10^{+176}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{1}{F}\right)} \cdot F}{B}\\ \end{array} \]
Alternative 17
Error34.0
Cost13836
\[\begin{array}{l} \mathbf{if}\;F \leq -1.18 \cdot 10^{+198}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{-1}{F}\right)} \cdot F}{B}\\ \mathbf{elif}\;F \leq 126:\\ \;\;\;\;\frac{\left(-x\right) + {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5} \cdot F}{B}\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{+175}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{1}{F}\right)} \cdot F}{B}\\ \end{array} \]
Alternative 18
Error34.1
Cost13572
\[\begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{-25}:\\ \;\;\;\;\frac{\left(-x\right) + e^{\log \left(\frac{-1}{F}\right)} \cdot F}{B}\\ \mathbf{elif}\;F \leq 62:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \left(0.16666666666666666 \cdot \left(F \cdot B\right) + \frac{F}{B}\right) \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F}\\ \end{array} \]
Alternative 19
Error36.7
Cost13380
\[\begin{array}{l} \mathbf{if}\;F \leq -4.4 \cdot 10^{+268}:\\ \;\;\;\;\frac{e^{\log \left(\frac{-1}{F}\right)} \cdot F}{B}\\ \mathbf{elif}\;F \leq 28:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F}\\ \end{array} \]
Alternative 20
Error36.6
Cost8456
\[\begin{array}{l} \mathbf{if}\;F \leq -1.32 \cdot 10^{+154}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 57:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \left(0.16666666666666666 \cdot \left(F \cdot B\right) + \frac{F}{B}\right) \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F}\\ \end{array} \]
Alternative 21
Error36.6
Cost8072
\[\begin{array}{l} \mathbf{if}\;F \leq -2.55 \cdot 10^{+187}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 19:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F}\\ \end{array} \]
Alternative 22
Error38.7
Cost7560
\[\begin{array}{l} \mathbf{if}\;F \leq -4.3 \cdot 10^{+70}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 0.019:\\ \;\;\;\;\frac{\left(-x\right) + {2}^{-0.5} \cdot F}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F}\\ \end{array} \]
Alternative 23
Error45.2
Cost7240
\[\begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;F \leq -5.5 \cdot 10^{+78}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 7.2 \cdot 10^{+21}:\\ \;\;\;\;\frac{\left(-x\right) + {2}^{-0.5} \cdot F}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 24
Error47.7
Cost7048
\[\begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;x \leq -1.85 \cdot 10^{-191}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 2.55 \cdot 10^{-135}:\\ \;\;\;\;\frac{{2}^{-0.5} \cdot F}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 25
Error50.1
Cost256
\[\frac{-x}{B} \]

Error

Reproduce

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