?

Average Error: 14.1 → 0.2
Time: 29.5s
Precision: binary64
Cost: 39496

?

\[\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} \mathbf{if}\;F \leq -48000000000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 215000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)\\ \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
 (if (<= F -48000000000.0)
   (- (/ -1.0 (sin B)) (/ x (tan B)))
   (if (<= F 215000000.0)
     (fma (/ F (sin B)) (pow (fma x 2.0 (fma F F 2.0)) -0.5) (/ (- x) (tan B)))
     (- (/ 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 tmp;
	if (F <= -48000000000.0) {
		tmp = (-1.0 / sin(B)) - (x / tan(B));
	} else if (F <= 215000000.0) {
		tmp = fma((F / sin(B)), pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5), (-x / tan(B)));
	} 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)
	tmp = 0.0
	if (F <= -48000000000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B)));
	elseif (F <= 215000000.0)
		tmp = fma(Float64(F / sin(B)), (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5), Float64(Float64(-x) / tan(B)));
	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_] := If[LessEqual[F, -48000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 215000000.0], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;F \leq -48000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\

\mathbf{elif}\;F \leq 215000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)\\

\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 < -4.8e10

    1. Initial program 26.6

      \[\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. Simplified26.6

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

      [Start]26.6

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

      +-commutative [=>]26.6

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

      unsub-neg [=>]26.6

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

      +-commutative [=>]26.6

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

      *-commutative [=>]26.6

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

      fma-def [=>]26.6

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

      fma-def [=>]26.6

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

      metadata-eval [=>]26.6

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

      metadata-eval [=>]26.6

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

      associate-*r/ [=>]26.6

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

      *-rgt-identity [=>]26.6

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

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

    if -4.8e10 < F < 2.15e8

    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}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
      Proof

      [Start]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)} \]

      +-commutative [=>]0.4

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

      fma-def [=>]0.4

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

      +-commutative [=>]0.4

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

      *-commutative [=>]0.4

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

      fma-def [=>]0.4

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

      fma-def [=>]0.4

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

      metadata-eval [=>]0.4

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

      metadata-eval [=>]0.4

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

      associate-*r/ [=>]0.3

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

      distribute-neg-frac [=>]0.3

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

      *-rgt-identity [=>]0.3

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

    if 2.15e8 < F

    1. Initial program 25.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. Taylor expanded in F around inf 0.2

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

      \[\leadsto \color{blue}{\frac{1}{\sin B} - \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 -48000000000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 215000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\ \end{array} \]

Alternatives

Alternative 1
Error0.3
Cost33160
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -100000000000:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 5:\\ \;\;\;\;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} \]
Alternative 2
Error0.2
Cost33160
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -132000000000:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 110000000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 3
Error0.2
Cost33160
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1000000000000:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 150000000:\\ \;\;\;\;\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 4
Error0.3
Cost20744
\[\begin{array}{l} \mathbf{if}\;F \leq -16000000000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 100000000:\\ \;\;\;\;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} - \frac{x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 5
Error0.7
Cost20552
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.45:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq 1.65:\\ \;\;\;\;F \cdot \left(t_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;t_0 - \frac{x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 6
Error0.6
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.45:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.46:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\ \end{array} \]
Alternative 7
Error0.6
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 1.4:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 8
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 1.4:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\ \end{array} \]
Alternative 9
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 1.38:\\ \;\;\;\;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 10
Error7.7
Cost14288
\[\begin{array}{l} t_0 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.37:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -1.7 \cdot 10^{-169}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{-176}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 0.0155:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \]
Alternative 11
Error7.7
Cost14288
\[\begin{array}{l} t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\ t_1 := \frac{1}{\sin B}\\ t_2 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.165:\\ \;\;\;\;\frac{-1}{\sin B} - t_2\\ \mathbf{elif}\;F \leq -2.55 \cdot 10^{-169}:\\ \;\;\;\;t_0 \cdot \left(F \cdot t_1\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.55 \cdot 10^{-175}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 0.00076:\\ \;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_1 - t_2\\ \end{array} \]
Alternative 12
Error7.5
Cost14288
\[\begin{array}{l} t_0 := \frac{F}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -16000000000:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -4.4 \cdot 10^{-169}:\\ \;\;\;\;t_0 \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{-176}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 0.212:\\ \;\;\;\;t_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \]
Alternative 13
Error24.2
Cost13712
\[\begin{array}{l} t_0 := \frac{1}{B} - \frac{x}{\tan B}\\ t_1 := \frac{-1}{\sin B}\\ \mathbf{if}\;F \leq -1.15 \cdot 10^{+144}:\\ \;\;\;\;-1 + \left(t_1 + 1\right)\\ \mathbf{elif}\;F \leq -2.4 \cdot 10^{+53}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -6.8 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.92 \cdot 10^{+28}:\\ \;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\ \mathbf{elif}\;F \leq 1.4 \cdot 10^{+143} \lor \neg \left(F \leq 9.2 \cdot 10^{+192}\right):\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 14
Error24.1
Cost13712
\[\begin{array}{l} t_0 := \frac{1}{B} - \frac{x}{\tan B}\\ t_1 := \frac{-1}{\sin B}\\ \mathbf{if}\;F \leq -2 \cdot 10^{+144}:\\ \;\;\;\;-1 + \left(t_1 + 1\right)\\ \mathbf{elif}\;F \leq -2.4 \cdot 10^{+53}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -6.8 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.92 \cdot 10^{+28}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{+140} \lor \neg \left(F \leq 1.3 \cdot 10^{+194}\right):\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 15
Error24.1
Cost13712
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ \mathbf{if}\;F \leq -1.15 \cdot 10^{+144}:\\ \;\;\;\;-1 + \left(t_0 + 1\right)\\ \mathbf{elif}\;F \leq -2.25 \cdot 10^{+53}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq -6.8 \cdot 10^{-22}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.92 \cdot 10^{+28}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 1.9 \cdot 10^{+138} \lor \neg \left(F \leq 1.85 \cdot 10^{+194}\right):\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
Alternative 16
Error10.9
Cost13512
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.98 \cdot 10^{-22}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.02 \cdot 10^{-28}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 17
Error16.0
Cost13448
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.4 \cdot 10^{-22}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.92 \cdot 10^{+28}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 6 \cdot 10^{+137} \lor \neg \left(F \leq 2.3 \cdot 10^{+193}\right):\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \]
Alternative 18
Error30.9
Cost7905
\[\begin{array}{l} t_0 := \frac{1}{B} - \frac{x}{\tan B}\\ t_1 := \frac{-1}{\sin B}\\ \mathbf{if}\;F \leq -1.45 \cdot 10^{+144}:\\ \;\;\;\;-1 + \left(t_1 + 1\right)\\ \mathbf{elif}\;F \leq -2.3 \cdot 10^{+53}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -6.8 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -6 \cdot 10^{-128}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -5.2 \cdot 10^{-279}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 8.4 \cdot 10^{+30} \lor \neg \left(F \leq 1.9 \cdot 10^{+142}\right) \land F \leq 3.5 \cdot 10^{+193}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
Alternative 19
Error30.9
Cost7905
\[\begin{array}{l} t_0 := \frac{1}{B} - \frac{x}{\tan B}\\ t_1 := \frac{-1}{\sin B}\\ \mathbf{if}\;F \leq -1.15 \cdot 10^{+144}:\\ \;\;\;\;-1 + \left(t_1 + 1\right)\\ \mathbf{elif}\;F \leq -9.4 \cdot 10^{+52}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -6.8 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -1.04 \cdot 10^{-129}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.9 \cdot 10^{-278}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 8.4 \cdot 10^{+30}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{+137} \lor \neg \left(F \leq 2.1 \cdot 10^{+194}\right):\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 20
Error31.0
Cost7640
\[\begin{array}{l} t_0 := \frac{-x}{B}\\ t_1 := \frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;x \leq -7.2 \cdot 10^{-18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.5 \cdot 10^{-47}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-81}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{-152}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{-93}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{elif}\;x \leq 1.22 \cdot 10^{-20}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 21
Error35.8
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -6.7 \cdot 10^{-62}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1.92 \cdot 10^{+28}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 22
Error37.6
Cost6724
\[\begin{array}{l} \mathbf{if}\;F \leq -6.7 \cdot 10^{-62}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.45 \cdot 10^{-23}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 23
Error42.3
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -7 \cdot 10^{-62}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{-27}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 24
Error45.0
Cost520
\[\begin{array}{l} \mathbf{if}\;F \leq -7 \cdot 10^{-62}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 1.92 \cdot 10^{+28}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 25
Error51.3
Cost324
\[\begin{array}{l} \mathbf{if}\;F \leq 7.6 \cdot 10^{-278}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 26
Error56.2
Cost192
\[\frac{-1}{B} \]

Error

Reproduce?

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