?

Average Error: 14.2 → 0.6
Time: 32.9s
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} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4 \cdot 10^{+56}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.18 \cdot 10^{+82}:\\ \;\;\;\;\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} - 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 -4e+56)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 1.18e+82)
       (fma
        (/ F (sin B))
        (pow (fma x 2.0 (fma F F 2.0)) -0.5)
        (/ (- x) (tan B)))
       (- (/ 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 <= -4e+56) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 1.18e+82) {
		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)) - 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 <= -4e+56)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 1.18e+82)
		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)) - 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, -4e+56], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.18e+82], 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] - 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 -4 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{elif}\;F \leq 1.18 \cdot 10^{+82}:\\
\;\;\;\;\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} - t_0\\


\end{array}

Error?

Derivation?

  1. Split input into 3 regimes
  2. if F < -4.00000000000000037e56

    1. Initial program 29.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. Simplified29.5

      \[\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]29.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 [=>]29.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 [=>]29.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 [=>]29.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 [=>]29.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 [=>]29.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 [=>]29.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 [=>]29.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 [=>]29.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/ [=>]29.5

      \[ \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 [=>]29.5

      \[ \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.00000000000000037e56 < F < 1.1800000000000001e82

    1. Initial program 1.0

      \[\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.9

      \[\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]1.0

      \[ \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 [=>]1.0

      \[ \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 [=>]1.0

      \[ \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 [=>]1.0

      \[ \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 [=>]1.0

      \[ \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 [=>]1.0

      \[ \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 [=>]1.0

      \[ \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 [=>]1.0

      \[ \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 [=>]1.0

      \[ \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.9

      \[ \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.9

      \[ \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.9

      \[ \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 1.1800000000000001e82 < F

    1. Initial program 32.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. Simplified32.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]32.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)} \]

      +-commutative [=>]32.7

      \[ \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 [=>]32.7

      \[ \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 [=>]32.7

      \[ \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 [=>]32.7

      \[ \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 [=>]32.7

      \[ \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 [=>]32.7

      \[ \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 [=>]32.7

      \[ \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 [=>]32.7

      \[ \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/ [=>]32.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 [=>]32.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.2

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{+56}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.18 \cdot 10^{+82}:\\ \;\;\;\;\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}{\tan B}\\ \end{array} \]

Alternatives

Alternative 1
Error0.2
Cost33160
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1 \cdot 10^{+18}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.18 \cdot 10^{+82}:\\ \;\;\;\;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
Error0.5
Cost33160
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5.2 \cdot 10^{+15}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.18 \cdot 10^{+82}:\\ \;\;\;\;\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} - t_0\\ \end{array} \]
Alternative 3
Error0.3
Cost20744
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.6 \cdot 10^{+15}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{+24}:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 4
Error0.5
Cost20744
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.6 \cdot 10^{+15}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.18 \cdot 10^{+82}:\\ \;\;\;\;\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 5
Error0.6
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.35:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 2.3:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 6
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.42:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 7
Error4.8
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 -4.6 \cdot 10^{+15}:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -5.2 \cdot 10^{-114}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.4 \cdot 10^{-41}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_1\\ \mathbf{elif}\;F \leq 26000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \]
Alternative 8
Error5.3
Cost14156
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.12 \cdot 10^{-8}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -5.8 \cdot 10^{-115}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 0.22:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 9
Error23.4
Cost14108
\[\begin{array}{l} t_0 := \cos B \cdot \frac{-x}{\sin B}\\ t_1 := \frac{1}{\sin B}\\ t_2 := \sqrt{\frac{1}{2 + x \cdot 2}}\\ t_3 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.5 \cdot 10^{-8}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq -7 \cdot 10^{-136}:\\ \;\;\;\;\frac{t_2 \cdot \frac{1}{B}}{\frac{1}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 6.8 \cdot 10^{-49}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 26000000:\\ \;\;\;\;t_2 \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{+38}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 4.8 \cdot 10^{+197}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{+253}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.66 \cdot 10^{+282} \lor \neg \left(F \leq 2.2 \cdot 10^{+300}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 10
Error23.4
Cost14108
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ t_1 := \cos B \cdot \frac{-x}{\sin B}\\ t_2 := \sqrt{\frac{1}{2 + x \cdot 2}}\\ t_3 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -2.5 \cdot 10^{-8}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -5.5 \cdot 10^{-130}:\\ \;\;\;\;\frac{t_2 \cdot \frac{1}{B}}{\frac{1}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-49}:\\ \;\;\;\;\frac{x}{\frac{-\sin B}{\cos B}}\\ \mathbf{elif}\;F \leq 26000000:\\ \;\;\;\;t_2 \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{+38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 4.8 \cdot 10^{+197}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{+253}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.75 \cdot 10^{+282} \lor \neg \left(F \leq 3.7 \cdot 10^{+301}\right):\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 11
Error18.7
Cost14108
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \sqrt{\frac{1}{2 + x \cdot 2}}\\ t_2 := \frac{x}{\tan B}\\ t_3 := \cos B \cdot \frac{-x}{\sin B}\\ \mathbf{if}\;F \leq -9.8 \cdot 10^{-8}:\\ \;\;\;\;\frac{-1}{\sin B} - t_2\\ \mathbf{elif}\;F \leq -9 \cdot 10^{-138}:\\ \;\;\;\;\frac{t_1 \cdot \frac{1}{B}}{\frac{1}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.15 \cdot 10^{-49}:\\ \;\;\;\;\frac{x}{\frac{-\sin B}{\cos B}}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{+19}:\\ \;\;\;\;t_1 \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{+38}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq 4.8 \cdot 10^{+197}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{+253}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq 1.75 \cdot 10^{+282} \lor \neg \left(F \leq 2.15 \cdot 10^{+300}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B} - t_2\\ \end{array} \]
Alternative 12
Error8.0
Cost13904
\[\begin{array}{l} t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}} - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -1.5 \cdot 10^{-175}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-50}:\\ \;\;\;\;\frac{x}{\frac{-\sin B}{\cos B}}\\ \mathbf{elif}\;F \leq 0.108:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \]
Alternative 13
Error8.0
Cost13904
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.6 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -3.5 \cdot 10^{-174}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.25 \cdot 10^{-49}:\\ \;\;\;\;\frac{x}{\frac{-\sin B}{\cos B}}\\ \mathbf{elif}\;F \leq 0.075:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 14
Error8.0
Cost13904
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -6.6 \cdot 10^{-174}:\\ \;\;\;\;\frac{t_0 \cdot \sqrt{0.5}}{\frac{1}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-50}:\\ \;\;\;\;\frac{x}{\frac{-\sin B}{\cos B}}\\ \mathbf{elif}\;F \leq 0.034:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0 - t_1\\ \end{array} \]
Alternative 15
Error10.5
Cost13644
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.8 \cdot 10^{-8}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -1.4 \cdot 10^{-133}:\\ \;\;\;\;\frac{\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{1}{B}}{\frac{1}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-48}:\\ \;\;\;\;\frac{x}{\frac{-\sin B}{\cos B}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 16
Error28.7
Cost7906
\[\begin{array}{l} t_0 := \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.6 \cdot 10^{-7}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.24 \cdot 10^{-135}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{-32}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.02:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 4.8 \cdot 10^{+197} \lor \neg \left(F \leq 2.1 \cdot 10^{+253}\right) \land \left(F \leq 1.75 \cdot 10^{+282} \lor \neg \left(F \leq 3.15 \cdot 10^{+300}\right)\right):\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error28.7
Cost7906
\[\begin{array}{l} t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.8 \cdot 10^{-7}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-136}:\\ \;\;\;\;\frac{t_0 \cdot \frac{1}{B}}{\frac{1}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 90:\\ \;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.3 \cdot 10^{+197} \lor \neg \left(F \leq 2.2 \cdot 10^{+253}\right) \land \left(F \leq 1.12 \cdot 10^{+282} \lor \neg \left(F \leq 2.15 \cdot 10^{+300}\right)\right):\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 18
Error30.7
Cost7774
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.45 \cdot 10^{-241}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-241}:\\ \;\;\;\;\frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 1.05 \cdot 10^{+39} \lor \neg \left(F \leq 4.7 \cdot 10^{+197}\right) \land \left(F \leq 6.2 \cdot 10^{+256} \lor \neg \left(F \leq 1.66 \cdot 10^{+282}\right) \land F \leq 2.2 \cdot 10^{+300}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 19
Error30.4
Cost7774
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{-1}{B} - t_0\\ \mathbf{if}\;F \leq -2.7 \cdot 10^{-240}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 6 \cdot 10^{-296}:\\ \;\;\;\;\frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 5 \cdot 10^{+40}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_0\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{+197} \lor \neg \left(F \leq 4 \cdot 10^{+256} \lor \neg \left(F \leq 1.14 \cdot 10^{+282}\right) \land F \leq 8.8 \cdot 10^{+300}\right):\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 20
Error34.6
Cost7185
\[\begin{array}{l} \mathbf{if}\;F \leq -0.0022:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.55 \cdot 10^{-7} \lor \neg \left(F \leq 1.75 \cdot 10^{+282}\right) \land F \leq 2.15 \cdot 10^{+300}:\\ \;\;\;\;\frac{-x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 21
Error35.0
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -1.4 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.7 \cdot 10^{-7}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 22
Error42.5
Cost6724
\[\begin{array}{l} \mathbf{if}\;F \leq -1.4 \cdot 10^{-18}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) - \frac{x}{B}\\ \end{array} \]
Alternative 23
Error44.9
Cost708
\[\begin{array}{l} \mathbf{if}\;F \leq -4.1 \cdot 10^{-18}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) - \frac{x}{B}\\ \end{array} \]
Alternative 24
Error44.8
Cost452
\[\begin{array}{l} \mathbf{if}\;F \leq -4.1 \cdot 10^{-18}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \]
Alternative 25
Error47.2
Cost388
\[\begin{array}{l} \mathbf{if}\;F \leq -1.4 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \]
Alternative 26
Error56.6
Cost192
\[\frac{-1}{B} \]

Error

Reproduce?

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