?

Average Error: 13.8 → 0.2
Time: 38.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} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.25 \cdot 10^{+26}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 110000000:\\ \;\;\;\;\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 -1.25e+26)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 110000000.0)
       (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 <= -1.25e+26) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 110000000.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)) - 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 <= -1.25e+26)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 110000000.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)) - 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, -1.25e+26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 110000000.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] - 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 -1.25 \cdot 10^{+26}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{elif}\;F \leq 110000000:\\
\;\;\;\;\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 < -1.25e26

    1. Initial program 26.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. Simplified26.8

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

      +-commutative [=>]26.8

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

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

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

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

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

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

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

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

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

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

    if -1.25e26 < F < 1.1e8

    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 1.1e8 < F

    1. Initial program 25.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. Simplified25.4

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

      unsub-neg [=>]25.4

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

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

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

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

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

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

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

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

      \[ \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} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.25 \cdot 10^{+26}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 110000000:\\ \;\;\;\;\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 -2 \cdot 10^{+26}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 6.2 \cdot 10^{+29}:\\ \;\;\;\;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.2
Cost33160
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.25 \cdot 10^{+26}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 170000000:\\ \;\;\;\;\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
Error1.1
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.26 \cdot 10^{+17}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 2.35:\\ \;\;\;\;\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 4
Error5.4
Cost20168
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.023:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -2.7 \cdot 10^{-131}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, 2\right)}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 450:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 5
Error6.9
Cost14480
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.002:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -4.8 \cdot 10^{-142}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 10^{-159}:\\ \;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 320000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 6
Error5.4
Cost14476
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.43:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -2.5 \cdot 10^{-131}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8600:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 7
Error5.3
Cost14476
\[\begin{array}{l} t_0 := {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -2050000:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -2.3 \cdot 10^{-131}:\\ \;\;\;\;t_0 \cdot \left(F \cdot t_2\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3000:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;t_2 - t_1\\ \end{array} \]
Alternative 8
Error7.2
Cost14288
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.068:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -2.55 \cdot 10^{-144}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 6.6 \cdot 10^{-159}:\\ \;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 0.0105:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 9
Error7.2
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 -0.01:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -3.25 \cdot 10^{-143}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 6.2 \cdot 10^{-159}:\\ \;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 0.0016:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \]
Alternative 10
Error7.2
Cost13904
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.00108:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -2.2 \cdot 10^{-146}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 6 \cdot 10^{-159}:\\ \;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 0.0035:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 11
Error23.7
Cost13844
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ t_2 := -\cos B \cdot \frac{x}{\sin B}\\ \mathbf{if}\;F \leq -1.42 \cdot 10^{+221}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -1.26 \cdot 10^{+17}:\\ \;\;\;\;\frac{1}{\frac{\sin B}{F \cdot \frac{-1}{F}}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.9 \cdot 10^{-14}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 1.75 \cdot 10^{+105}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 4.7 \cdot 10^{+235}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{+254}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error23.7
Cost13844
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -8 \cdot 10^{+220}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -1.26 \cdot 10^{+17}:\\ \;\;\;\;\frac{1}{\frac{\sin B}{F \cdot \frac{-1}{F}}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.9 \cdot 10^{-14}:\\ \;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{+105}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 3 \cdot 10^{+235}:\\ \;\;\;\;-\cos B \cdot \frac{x}{\sin B}\\ \mathbf{elif}\;F \leq 1.06 \cdot 10^{+254}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error18.8
Cost13712
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.25 \cdot 10^{-56}:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq 1.9 \cdot 10^{-14}:\\ \;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 2.65 \cdot 10^{+106}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.25 \cdot 10^{+235}:\\ \;\;\;\;-\cos B \cdot \frac{x}{\sin B}\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{+254}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B} - t_1\\ \end{array} \]
Alternative 14
Error10.3
Cost13512
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.25 \cdot 10^{-56}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.1 \cdot 10^{-44}:\\ \;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 15
Error28.5
Cost8596
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ t_1 := {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5}\\ t_2 := \frac{F}{B} \cdot t_1 - \frac{x}{B}\\ \mathbf{if}\;x \leq -1.1 \cdot 10^{-29}:\\ \;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{-115}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -8.8 \cdot 10^{-126}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -1.1 \cdot 10^{-232}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;x \leq -6.6 \cdot 10^{-295}:\\ \;\;\;\;t_1 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-254}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{-26}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 16
Error28.4
Cost8476
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ t_1 := \frac{F}{B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{if}\;x \leq -5.2 \cdot 10^{-31}:\\ \;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{-115}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.36 \cdot 10^{-126}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -9.8 \cdot 10^{-234}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;x \leq -3.65 \cdot 10^{-295}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-253}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{-25}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 17
Error28.7
Cost8272
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{-1}{B} - t_0\\ \mathbf{if}\;F \leq -1.1 \cdot 10^{+225}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -4.8 \cdot 10^{+17}:\\ \;\;\;\;\frac{1}{\frac{\sin B}{F \cdot \frac{-1}{F}}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.4 \cdot 10^{-209}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_0\\ \mathbf{elif}\;F \leq 0.92:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.2 \cdot 10^{+117} \lor \neg \left(F \leq 2.2 \cdot 10^{+235}\right) \land F \leq 2.2 \cdot 10^{+254}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 18
Error31.7
Cost8170
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5.15 \cdot 10^{+210}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -4.3 \cdot 10^{+114}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1 \cdot 10^{+100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -8 \cdot 10^{+19}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -4.3 \cdot 10^{-209}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -6.6 \cdot 10^{-275}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{elif}\;F \leq 1.9 \cdot 10^{-14} \lor \neg \left(F \leq 4.5 \cdot 10^{+117} \lor \neg \left(F \leq 2.8 \cdot 10^{+235}\right) \land F \leq 2.6 \cdot 10^{+254}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 19
Error31.8
Cost8170
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.02 \cdot 10^{+211}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -9 \cdot 10^{+113}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.68 \cdot 10^{+100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -5.5 \cdot 10^{+17}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.48 \cdot 10^{-210}:\\ \;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;F \leq -2.85 \cdot 10^{-276}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{elif}\;F \leq 4.9 \cdot 10^{-14} \lor \neg \left(F \leq 4.5 \cdot 10^{+117} \lor \neg \left(F \leq 2.3 \cdot 10^{+235}\right) \land F \leq 2.1 \cdot 10^{+254}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 20
Error31.0
Cost8169
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{-1}{B} - t_1\\ \mathbf{if}\;F \leq -2.4 \cdot 10^{+211}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -2.05 \cdot 10^{+114}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -9.2 \cdot 10^{+97}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -7.5 \cdot 10^{+22}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -2.65 \cdot 10^{-201}:\\ \;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\ \mathbf{elif}\;F \leq -2.45 \cdot 10^{-277}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{elif}\;F \leq 4.9 \cdot 10^{-14}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_1\\ \mathbf{elif}\;F \leq 3 \cdot 10^{+116} \lor \neg \left(F \leq 8 \cdot 10^{+235}\right) \land F \leq 1.4 \cdot 10^{+252}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 21
Error31.0
Cost8169
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{-1}{B} - t_1\\ \mathbf{if}\;F \leq -7.4 \cdot 10^{+210}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -3.9 \cdot 10^{+114}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -7.8 \cdot 10^{+97}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -1.2 \cdot 10^{+23}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.2 \cdot 10^{-209}:\\ \;\;\;\;\frac{1}{\frac{1}{t_2}}\\ \mathbf{elif}\;F \leq -6.5 \cdot 10^{-275}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{elif}\;F \leq 4.9 \cdot 10^{-14}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_1\\ \mathbf{elif}\;F \leq 4.2 \cdot 10^{+117} \lor \neg \left(F \leq 2.45 \cdot 10^{+235}\right) \land F \leq 2.8 \cdot 10^{+254}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 22
Error29.8
Cost7905
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{-1}{B} - t_0\\ \mathbf{if}\;F \leq -7 \cdot 10^{+224}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -1.45 \cdot 10^{+17}:\\ \;\;\;\;\frac{1}{\frac{\sin B}{F \cdot \frac{-1}{F}}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -2.1 \cdot 10^{-208}:\\ \;\;\;\;\frac{1}{\frac{1}{t_1}}\\ \mathbf{elif}\;F \leq -2.45 \cdot 10^{-277}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{elif}\;F \leq 4.9 \cdot 10^{-14}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_0\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{+117} \lor \neg \left(F \leq 2.4 \cdot 10^{+235}\right) \land F \leq 6.5 \cdot 10^{+253}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 23
Error28.7
Cost7888
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{-1}{B} - t_0\\ \mathbf{if}\;F \leq -1.25 \cdot 10^{+225}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -2.9 \cdot 10^{+20}:\\ \;\;\;\;\frac{1}{\frac{\sin B}{F \cdot \frac{-1}{F}}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 7 \cdot 10^{-210}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_0\\ \mathbf{elif}\;F \leq 0.68:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 5.3 \cdot 10^{+116} \lor \neg \left(F \leq 3.8 \cdot 10^{+235}\right) \land F \leq 2.8 \cdot 10^{+254}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 24
Error28.7
Cost7773
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{-1}{B} - t_0\\ \mathbf{if}\;F \leq -1.6 \cdot 10^{+220}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -5.8 \cdot 10^{+17}:\\ \;\;\;\;\frac{1}{\frac{\sin B}{F \cdot \frac{-1}{F}}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-210}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_0\\ \mathbf{elif}\;F \leq 11:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{+117} \lor \neg \left(F \leq 3.3 \cdot 10^{+235}\right) \land F \leq 1.06 \cdot 10^{+254}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 25
Error34.4
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -1.25 \cdot 10^{-56}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-14}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 26
Error36.9
Cost6724
\[\begin{array}{l} \mathbf{if}\;F \leq -1.25 \cdot 10^{-56}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 4.9 \cdot 10^{-46}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 27
Error39.4
Cost836
\[\begin{array}{l} \mathbf{if}\;F \leq -4.5 \cdot 10^{-58}:\\ \;\;\;\;x \cdot \left(B \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 5.2 \cdot 10^{-46}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 28
Error44.6
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -5 \cdot 10^{-57}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 1.32 \cdot 10^{-12}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + 1}{B}\\ \end{array} \]
Alternative 29
Error42.0
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -6.5 \cdot 10^{-57}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-13}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + 1}{B}\\ \end{array} \]
Alternative 30
Error39.4
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -4.5 \cdot 10^{-58}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 7 \cdot 10^{-46}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 31
Error39.4
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -1.85 \cdot 10^{-57}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.1 \cdot 10^{-46}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 32
Error44.5
Cost520
\[\begin{array}{l} \mathbf{if}\;F \leq -1.25 \cdot 10^{-56}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 1.32 \cdot 10^{-12}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 33
Error52.0
Cost324
\[\begin{array}{l} \mathbf{if}\;F \leq 3.2 \cdot 10^{-181}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 34
Error57.1
Cost192
\[\frac{-1}{B} \]

Error

Reproduce?

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