Average Error: 13.7 → 0.3
Time: 1.2min
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.1 \cdot 10^{+22}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{\cos B \cdot x}{\sin B}\\ \mathbf{elif}\;F \leq 4000000:\\ \;\;\;\;\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} + x \cdot \frac{-1}{\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.1e+22)
   (- (/ -1.0 (sin B)) (/ (* (cos B) x) (sin B)))
   (if (<= F 4000000.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 (/ -1.0 (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.1e+22) {
		tmp = (-1.0 / sin(B)) - ((cos(B) * x) / sin(B));
	} else if (F <= 4000000.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 * (-1.0 / 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.1e+22)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(cos(B) * x) / sin(B)));
	elseif (F <= 4000000.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 * Float64(-1.0 / 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.1e+22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4000000.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[(-1.0 / N[Tan[B], $MachinePrecision]), $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.1 \cdot 10^{+22}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{\cos B \cdot x}{\sin B}\\

\mathbf{elif}\;F \leq 4000000:\\
\;\;\;\;\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} + x \cdot \frac{-1}{\tan B}\\


\end{array}

Error

Derivation

  1. Split input into 3 regimes
  2. if F < -2.0999999999999998e22

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

      \[\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))))): 22 points increase in error, 13 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, 1 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
    3. Taylor expanded in F around -inf 0.2

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

    if -2.0999999999999998e22 < F < 4e6

    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))))): 22 points increase in error, 13 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, 1 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 4e6 < 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-rr19.5

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

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

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

Alternatives

Alternative 1
Error0.3
Cost20616
\[\begin{array}{l} \mathbf{if}\;F \leq -6.369690246649111 \cdot 10^{+58}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{\cos B \cdot x}{\sin B}\\ \mathbf{elif}\;F \leq 4000000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \]
Alternative 2
Error0.7
Cost20040
\[\begin{array}{l} \mathbf{if}\;F \leq -28.5:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\ \mathbf{elif}\;F \leq 0.00235:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \]
Alternative 3
Error0.7
Cost20040
\[\begin{array}{l} \mathbf{if}\;F \leq -28.5:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{\cos B \cdot x}{\sin B}\\ \mathbf{elif}\;F \leq 0.00235:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \]
Alternative 4
Error5.9
Cost19908
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -4.2 \cdot 10^{-31}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\ \mathbf{elif}\;F \leq 10^{-50}:\\ \;\;\;\;t_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\ \mathbf{elif}\;F \leq 4000000:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(F \cdot t_1\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_1 + t_0\\ \end{array} \]
Alternative 5
Error5.9
Cost14476
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -4.2 \cdot 10^{-31}:\\ \;\;\;\;t_1 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 10^{-50}:\\ \;\;\;\;t_1 + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\ \mathbf{elif}\;F \leq 4000000:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(F \cdot t_0\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0 + t_1\\ \end{array} \]
Alternative 6
Error5.9
Cost14348
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -4.2 \cdot 10^{-31}:\\ \;\;\;\;t_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 10^{-50}:\\ \;\;\;\;t_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\ \mathbf{elif}\;F \leq 4000000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + t_0\\ \end{array} \]
Alternative 7
Error6.6
Cost14152
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -4.2 \cdot 10^{-31}:\\ \;\;\;\;t_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{-23}:\\ \;\;\;\;t_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + t_0\\ \end{array} \]
Alternative 8
Error7.8
Cost14024
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -1 \cdot 10^{-11}:\\ \;\;\;\;t_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -4 \cdot 10^{-139}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-120}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 0.00235:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + t_0\\ \end{array} \]
Alternative 9
Error16.9
Cost13904
\[\begin{array}{l} t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -16500000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -4 \cdot 10^{-139}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-120}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 0.00235:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
Alternative 10
Error12.6
Cost13904
\[\begin{array}{l} t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -16500000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -4 \cdot 10^{-139}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-120}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 0.00235:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \end{array} \]
Alternative 11
Error7.8
Cost13904
\[\begin{array}{l} t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ t_1 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -1 \cdot 10^{-11}:\\ \;\;\;\;t_1 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -4 \cdot 10^{-139}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-120}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 0.00235:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + t_1\\ \end{array} \]
Alternative 12
Error20.7
Cost13448
\[\begin{array}{l} \mathbf{if}\;F \leq -16500000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.7 \cdot 10^{-49}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
Alternative 13
Error27.5
Cost8200
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \mathbf{if}\;F \leq -4.2 \cdot 10^{-31}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -4 \cdot 10^{-139}:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7.9 \cdot 10^{-249}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.45 \cdot 10^{-290}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 1.7 \cdot 10^{-49}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
Alternative 14
Error27.4
Cost7636
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \mathbf{if}\;F \leq -3.05 \cdot 10^{-27}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -4 \cdot 10^{-139}:\\ \;\;\;\;\sqrt{0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7.9 \cdot 10^{-249}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.45 \cdot 10^{-290}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 1.7 \cdot 10^{-49}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
Alternative 15
Error25.5
Cost7240
\[\begin{array}{l} \mathbf{if}\;F \leq -3.05 \cdot 10^{-27}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{-23}:\\ \;\;\;\;\sqrt{0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
Alternative 16
Error30.5
Cost7112
\[\begin{array}{l} \mathbf{if}\;F \leq -9.2 \cdot 10^{-129}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.36 \cdot 10^{-101}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
Alternative 17
Error32.9
Cost6980
\[\begin{array}{l} \mathbf{if}\;F \leq -9.2 \cdot 10^{-129}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{-60}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 18
Error35.1
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -16500000:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{-60}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 19
Error37.8
Cost6724
\[\begin{array}{l} \mathbf{if}\;F \leq -16500000:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1.6 \cdot 10^{-109}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{B}\\ \end{array} \]
Alternative 20
Error40.7
Cost712
\[\begin{array}{l} \mathbf{if}\;F \leq -9.2 \cdot 10^{-129}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.6 \cdot 10^{-109}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{B}\\ \end{array} \]
Alternative 21
Error45.6
Cost580
\[\begin{array}{l} \mathbf{if}\;F \leq -9.2 \cdot 10^{-129}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \]
Alternative 22
Error47.8
Cost388
\[\begin{array}{l} \mathbf{if}\;F \leq -112000000000:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \]
Alternative 23
Error57.1
Cost192
\[\frac{-1}{B} \]

Error

Reproduce

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