?

Average Error: 13.6 → 0.5
Time: 36.1s
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.2 \cdot 10^{+93}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 12.5:\\ \;\;\;\;\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 -4.2e+93)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 12.5)
       (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 <= -4.2e+93) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 12.5) {
		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 <= -4.2e+93)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 12.5)
		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, -4.2e+93], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 12.5], 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.2 \cdot 10^{+93}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{elif}\;F \leq 12.5:\\
\;\;\;\;\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.1999999999999996e93

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

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

      +-commutative [=>]32.3

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

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

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

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

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

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

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

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

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

      \[ \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 -4.1999999999999996e93 < F < 12.5

    1. Initial program 0.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. Simplified0.7

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

      fma-def [=>]0.8

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

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

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

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

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

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

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

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

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

      \[ \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 12.5 < F

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

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

      +-commutative [=>]24.3

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4.2 \cdot 10^{+93}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 12.5:\\ \;\;\;\;\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.5
Cost33160
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.2 \cdot 10^{+93}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 12.5:\\ \;\;\;\;\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 2
Error0.4
Cost26568
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5 \cdot 10^{+154}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 12.5:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 3
Error0.5
Cost20744
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -3.6 \cdot 10^{+68}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 12.5:\\ \;\;\;\;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} - t_0\\ \end{array} \]
Alternative 4
Error0.6
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.88:\\ \;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.4:\\ \;\;\;\;\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 5
Error0.6
Cost20040
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.92:\\ \;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\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 6
Error0.6
Cost20040
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.9:\\ \;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.5:\\ \;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 7
Error5.8
Cost14216
\[\begin{array}{l} t_0 := \frac{F}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.4 \cdot 10^{+46}:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -1.06 \cdot 10^{-124}:\\ \;\;\;\;t_0 \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.05 \cdot 10^{-111}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_1\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-18}:\\ \;\;\;\;\frac{1}{\frac{1}{t_0 \cdot \sqrt{0.5} - \frac{x}{B}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \]
Alternative 8
Error7.8
Cost14168
\[\begin{array}{l} t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ t_2 := -\cos B\\ \mathbf{if}\;F \leq -0.18:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -9.2 \cdot 10^{-139}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-227}:\\ \;\;\;\;\frac{x}{\sin B} \cdot t_2\\ \mathbf{elif}\;F \leq 4.3 \cdot 10^{-181}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.05 \cdot 10^{-112}:\\ \;\;\;\;\frac{t_2}{\frac{\sin B}{x}}\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-18}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \]
Alternative 9
Error5.4
Cost14160
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.0145:\\ \;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -1.75 \cdot 10^{-123}:\\ \;\;\;\;\frac{\frac{\sqrt{0.5}}{\frac{1}{F}}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 5 \cdot 10^{-112}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-18}:\\ \;\;\;\;\frac{1}{\frac{1}{\frac{F}{\sin B} \cdot \sqrt{0.5} - \frac{x}{B}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 10
Error24.7
Cost13912
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ t_1 := \frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{if}\;F \leq -3.2 \cdot 10^{+161}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -5.5 \cdot 10^{-5}:\\ \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -5.2 \cdot 10^{-81}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 3 \cdot 10^{-178}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.7 \cdot 10^{-113}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-18}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\ \end{array} \]
Alternative 11
Error24.6
Cost13912
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.9 \cdot 10^{+162}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -0.14:\\ \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -2.05 \cdot 10^{-80}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-178}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{-112}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-18}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\ \end{array} \]
Alternative 12
Error5.4
Cost13904
\[\begin{array}{l} t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.057:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -1.18 \cdot 10^{-123}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-112}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_1\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-18}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \]
Alternative 13
Error5.5
Cost13904
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.0205:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -1.75 \cdot 10^{-123}:\\ \;\;\;\;\frac{\frac{\sqrt{0.5}}{\frac{1}{F}}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-112}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-18}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 14
Error5.4
Cost13904
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.076:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -1.02 \cdot 10^{-123}:\\ \;\;\;\;\frac{\frac{\sqrt{0.5}}{\frac{1}{F}}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8 \cdot 10^{-113}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-18}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 15
Error5.4
Cost13904
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -5.9 \cdot 10^{-125}:\\ \;\;\;\;\frac{\frac{\sqrt{0.5}}{\frac{1}{F}}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-112}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\ \mathbf{elif}\;F \leq 3.65 \cdot 10^{-19}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 16
Error18.6
Cost13780
\[\begin{array}{l} \mathbf{if}\;F \leq -2.5 \cdot 10^{+161}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.35:\\ \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -6 \cdot 10^{-90}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 5.2 \cdot 10^{-113}:\\ \;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-18}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\ \end{array} \]
Alternative 17
Error18.6
Cost13780
\[\begin{array}{l} \mathbf{if}\;F \leq -2.7 \cdot 10^{+162}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -0.45:\\ \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -2.8 \cdot 10^{-89}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-113}:\\ \;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-18}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\ \end{array} \]
Alternative 18
Error9.0
Cost13776
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -2.45 \cdot 10^{-87}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 2.35 \cdot 10^{-113}:\\ \;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-18}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 19
Error14.2
Cost13648
\[\begin{array}{l} \mathbf{if}\;F \leq -5.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.95 \cdot 10^{-85}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 10^{-112}:\\ \;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\ \mathbf{elif}\;F \leq 1.52 \cdot 10^{-18}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\ \end{array} \]
Alternative 20
Error27.0
Cost8429
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\ t_2 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4 \cdot 10^{+135}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -1.2 \cdot 10^{+101}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -3.4 \cdot 10^{+84}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -0.8:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -2.35 \cdot 10^{-231}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\ \mathbf{elif}\;F \leq -2.35 \cdot 10^{-287}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 2.45 \cdot 10^{-178}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-97}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 2.75 \cdot 10^{-19}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{+49} \lor \neg \left(F \leq 9.8 \cdot 10^{+104}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 21
Error29.1
Cost8168
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ t_2 := \frac{F \cdot \sqrt{0.5} - x}{B}\\ \mathbf{if}\;F \leq -1.5 \cdot 10^{+136}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -7.8 \cdot 10^{+100}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.05 \cdot 10^{+84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -11.5:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -2.05 \cdot 10^{-231}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -3.2 \cdot 10^{-283}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{-179}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.38 \cdot 10^{-18}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 1.6 \cdot 10^{+25}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 22
Error29.1
Cost8168
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ t_2 := \frac{F \cdot \sqrt{0.5} - x}{B}\\ \mathbf{if}\;F \leq -2.3 \cdot 10^{+137}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -1.8 \cdot 10^{+101}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -2.6 \cdot 10^{+79}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -0.175:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -2.05 \cdot 10^{-231}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -1.55 \cdot 10^{-281}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 7.8 \cdot 10^{-178}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 2.25 \cdot 10^{-97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 3.65 \cdot 10^{-19}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.7 \cdot 10^{+25}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 23
Error29.0
Cost8168
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5.2 \cdot 10^{+135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -8.2 \cdot 10^{+100}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -5 \cdot 10^{+79}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -10.5:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -2.35 \cdot 10^{-231}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\ \mathbf{elif}\;F \leq -2.4 \cdot 10^{-291}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 5.1 \cdot 10^{-179}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{-97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.6 \cdot 10^{-18}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 7.2 \cdot 10^{+24}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 24
Error26.0
Cost8165
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -3 \cdot 10^{+161}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -0.0031:\\ \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -2 \cdot 10^{-231}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\ \mathbf{elif}\;F \leq -1.7 \cdot 10^{-283}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.7 \cdot 10^{-178}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.3 \cdot 10^{-97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 2.35 \cdot 10^{-20}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{+49} \lor \neg \left(F \leq 8.6 \cdot 10^{+103}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 25
Error30.2
Cost7508
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{1}{\sin B}\\ t_2 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;x \leq -3.7 \cdot 10^{-31}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.95 \cdot 10^{-192}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 4.7 \cdot 10^{-285}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.16 \cdot 10^{-163}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{-69}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 26
Error35.0
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -1.9 \cdot 10^{-14}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 4.45 \cdot 10^{-72}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 27
Error37.7
Cost6724
\[\begin{array}{l} \mathbf{if}\;F \leq -1.26 \cdot 10^{-14}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{+24}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\ \end{array} \]
Alternative 28
Error40.2
Cost1096
\[\begin{array}{l} \mathbf{if}\;F \leq -8.5 \cdot 10^{-67}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{+24}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\ \end{array} \]
Alternative 29
Error39.7
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -1.2 \cdot 10^{-66}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.15 \cdot 10^{-22}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 30
Error45.0
Cost520
\[\begin{array}{l} \mathbf{if}\;F \leq -8.5 \cdot 10^{-15}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{+24}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 31
Error42.4
Cost520
\[\begin{array}{l} \mathbf{if}\;F \leq -1.05 \cdot 10^{-66}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.56 \cdot 10^{+25}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 32
Error52.0
Cost324
\[\begin{array}{l} \mathbf{if}\;F \leq 1.25 \cdot 10^{-54}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 33
Error57.1
Cost192
\[\frac{-1}{B} \]

Error

Reproduce?

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