Average Error: 13.5 → 0.3
Time: 56.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 -2.05 \cdot 10^{+24}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 650000:\\ \;\;\;\;\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} \]
(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 -2.05e+24)
   (+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
   (if (<= F 650000.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 (tan 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 <= -2.05e+24) {
		tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
	} else if (F <= 650000.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 / tan(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 <= -2.05e+24)
		tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B)));
	elseif (F <= 650000.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(x / tan(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, -2.05e+24], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 650000.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[(x / N[Tan[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 -2.05 \cdot 10^{+24}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\

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

Error

Derivation

  1. Split input into 3 regimes
  2. if F < -2.05e24

    1. Initial program 26.1

      \[\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. Applied egg-rr26.1

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

      \[\leadsto \left(-\frac{1}{\frac{\tan B}{x}}\right) + \color{blue}{\frac{-1}{\sin B}} \]

    if -2.05e24 < F < 6.5e5

    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
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (fma.f64 x 2 (fma.f64 F F 2)) -1/2) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (fma.f64 x 2 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 F F) 2))) -1/2) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 x 2) (+.f64 (*.f64 F F) 2))) -1/2) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 2 x)) (+.f64 (*.f64 F F) 2)) -1/2) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (Rewrite<= +-commutative_binary64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x))) -1/2) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (Rewrite<= metadata-eval (neg.f64 1/2))) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (neg.f64 (Rewrite<= metadata-eval (/.f64 1 2)))) (/.f64 (neg.f64 x) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (neg.f64 (/.f64 1 2))) (/.f64 (Rewrite<= *-rgt-identity_binary64 (*.f64 (neg.f64 x) 1)) (tan.f64 B))): 0 points increase in error, 0 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (neg.f64 (/.f64 1 2))) (Rewrite<= associate-*r/_binary64 (*.f64 (neg.f64 x) (/.f64 1 (tan.f64 B))))): 20 points increase in error, 16 points decrease in error
      (fma.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (neg.f64 (/.f64 1 2))) (Rewrite<= distribute-lft-neg-in_binary64 (neg.f64 (*.f64 x (/.f64 1 (tan.f64 B)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (neg.f64 (/.f64 1 2)))) (neg.f64 (*.f64 x (/.f64 1 (tan.f64 B)))))): 1 points increase in error, 0 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 (neg.f64 (*.f64 x (/.f64 1 (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) 2) (*.f64 2 x)) (neg.f64 (/.f64 1 2)))))): 0 points increase in error, 0 points decrease in error

    if 6.5e5 < F

    1. Initial program 25.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. Applied egg-rr25.3

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

      \[\leadsto \left(-\frac{1}{\frac{\tan B}{x}}\right) + \color{blue}{\frac{1}{\sin B}} \]
    4. Applied egg-rr0.2

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.05 \cdot 10^{+24}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 650000:\\ \;\;\;\;\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.3
Cost20616
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.05 \cdot 10^{+24}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 650000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 2
Error0.7
Cost20296
\[\begin{array}{l} \mathbf{if}\;F \leq -0.0068:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-5}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B}\\ \end{array} \]
Alternative 3
Error0.7
Cost20168
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -0.0068:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1.8:\\ \;\;\;\;t_0 + \frac{F}{\sin B \cdot \sqrt{2}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B}\\ \end{array} \]
Alternative 4
Error0.7
Cost20168
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -0.0068:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1.8:\\ \;\;\;\;t_0 + F \cdot \frac{\sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B}\\ \end{array} \]
Alternative 5
Error6.0
Cost14548
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ t_1 := \sqrt{2 + x \cdot 2}\\ t_2 := t_0 + \frac{F}{B \cdot t_1}\\ \mathbf{if}\;F \leq -2.05 \cdot 10^{+24}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-13}:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-60}:\\ \;\;\;\;\frac{F}{\sin B \cdot t_1} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-5}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B}\\ \end{array} \]
Alternative 6
Error6.2
Cost14344
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -6.4 \cdot 10^{+18}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-5}:\\ \;\;\;\;t_0 + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B}\\ \end{array} \]
Alternative 7
Error8.3
Cost14160
\[\begin{array}{l} t_0 := \frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{B}\\ \mathbf{if}\;F \leq -0.0068:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -3.5 \cdot 10^{-221}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 6.3 \cdot 10^{-189}:\\ \;\;\;\;\left(-x\right) \cdot \frac{\cos B}{\sin B}\\ \mathbf{elif}\;F \leq 5.6 \cdot 10^{-20}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
Alternative 8
Error6.1
Cost14152
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -4.5 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-5}:\\ \;\;\;\;t_0 + \frac{F}{B \cdot \sqrt{2 + x \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B}\\ \end{array} \]
Alternative 9
Error6.0
Cost14024
\[\begin{array}{l} \mathbf{if}\;F \leq -4.5 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-5}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \sqrt{2 + x \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
Alternative 10
Error16.1
Cost13644
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.329588358786261 \cdot 10^{+98}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq -1.35 \cdot 10^{-14}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1.04 \cdot 10^{-22}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 11
Error21.4
Cost13580
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.329588358786261 \cdot 10^{+98}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq -1.35 \cdot 10^{-14}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-5}:\\ \;\;\;\;\left(-x\right) \cdot \frac{\cos B}{\sin B}\\ \mathbf{elif}\;F \leq 1.2966950821880948 \cdot 10^{+96}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \]
Alternative 12
Error21.4
Cost13580
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.329588358786261 \cdot 10^{+98}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq -1.35 \cdot 10^{-14}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-5}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 1.2966950821880948 \cdot 10^{+96}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \]
Alternative 13
Error10.9
Cost13512
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.2 \cdot 10^{-28}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.04 \cdot 10^{-22}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 14
Error26.5
Cost7756
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.329588358786261 \cdot 10^{+98}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq -4.5 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-5}:\\ \;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.2966950821880948 \cdot 10^{+96}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \]
Alternative 15
Error31.5
Cost7640
\[\begin{array}{l} t_0 := \frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -7.002236732383933 \cdot 10^{+149}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.35 \cdot 10^{-14}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-180}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-258}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{+25}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.2966950821880948 \cdot 10^{+96}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 16
Error28.4
Cost7640
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{-1}{B} - t_0\\ t_2 := \frac{1}{B} - t_0\\ \mathbf{if}\;F \leq -4.329588358786261 \cdot 10^{+98}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -2 \cdot 10^{+24}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-180}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-258}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{+25}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 1.2966950821880948 \cdot 10^{+96}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 17
Error26.5
Cost7376
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.329588358786261 \cdot 10^{+98}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq -4.5 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-5}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\ \mathbf{elif}\;F \leq 1.2966950821880948 \cdot 10^{+96}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \]
Alternative 18
Error26.5
Cost7376
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.329588358786261 \cdot 10^{+98}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq -4.5 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-5}:\\ \;\;\;\;\sqrt{0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.2966950821880948 \cdot 10^{+96}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \]
Alternative 19
Error37.3
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -1.7 \cdot 10^{-73}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3.5 \cdot 10^{-22}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 20
Error34.6
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -5.8 \cdot 10^{-26}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 3.5 \cdot 10^{-22}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 21
Error39.9
Cost1096
\[\begin{array}{l} \mathbf{if}\;F \leq -1.7 \cdot 10^{-73}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.8 \cdot 10^{-38}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\right) - \frac{x}{B}\\ \end{array} \]
Alternative 22
Error39.9
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -1.7 \cdot 10^{-73}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-38}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 23
Error44.7
Cost520
\[\begin{array}{l} \mathbf{if}\;F \leq -1.65 \cdot 10^{-24}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-12}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 24
Error42.3
Cost520
\[\begin{array}{l} \mathbf{if}\;F \leq -1.7 \cdot 10^{-73}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-12}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 25
Error51.9
Cost324
\[\begin{array}{l} \mathbf{if}\;F \leq 3.7 \cdot 10^{-187}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 26
Error57.0
Cost192
\[\frac{1}{B} \]

Error

Reproduce

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