?

Average Error: 22.22% → 0.38%
Time: 25.5s
Precision: binary64
Cost: 39560

?

\[\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 -9.2 \cdot 10^{+154}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 50000000:\\ \;\;\;\;{\left(\frac{\sin B}{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}\right)}^{-1} - t_0\\ \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 -9.2e+154)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 50000000.0)
       (- (pow (/ (sin B) (/ F (sqrt (fma x 2.0 (fma F F 2.0))))) -1.0) t_0)
       (- (/ 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 <= -9.2e+154) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 50000000.0) {
		tmp = pow((sin(B) / (F / sqrt(fma(x, 2.0, fma(F, F, 2.0))))), -1.0) - t_0;
	} 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 <= -9.2e+154)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 50000000.0)
		tmp = Float64((Float64(sin(B) / Float64(F / sqrt(fma(x, 2.0, fma(F, F, 2.0))))) ^ -1.0) - t_0);
	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, -9.2e+154], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 50000000.0], N[(N[Power[N[(N[Sin[B], $MachinePrecision] / N[(F / N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision] - t$95$0), $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 -9.2 \cdot 10^{+154}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{elif}\;F \leq 50000000:\\
\;\;\;\;{\left(\frac{\sin B}{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}\right)}^{-1} - t_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\


\end{array}

Error?

Derivation?

  1. Split input into 3 regimes
  2. if F < -9.1999999999999999e154

    1. Initial program 65.56

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.1999999999999999e154 < F < 5e7

    1. Initial program 2.46

      \[\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. Simplified2.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]2.46

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

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

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

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

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

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

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

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

      \[ \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/ [=>]2.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 [=>]2.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. Applied egg-rr0.54

      \[\leadsto \color{blue}{\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    4. Applied egg-rr0.49

      \[\leadsto \color{blue}{{\left(\frac{\sin B}{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}\right)}^{-1}} - \frac{x}{\tan B} \]

    if 5e7 < F

    1. Initial program 40.98

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -9.2 \cdot 10^{+154}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 50000000:\\ \;\;\;\;{\left(\frac{\sin B}{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}\right)}^{-1} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]

Alternatives

Alternative 1
Error0.35%
Cost33160
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -112000000:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 50000000:\\ \;\;\;\;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.42%
Cost20744
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.7 \cdot 10^{+14}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 120000000:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 3
Error0.4%
Cost20744
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -100000000:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 50000000:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 4
Error1%
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.45:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.45:\\ \;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{\frac{1}{2 + x \cdot 2}}}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 5
Error0.99%
Cost20296
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.45:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.45:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 6
Error11.92%
Cost14480
\[\begin{array}{l} t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -3900000:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -1.16 \cdot 10^{-190}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-115}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 1.56 \cdot 10^{-9}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \]
Alternative 7
Error16.72%
Cost14220
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5.5 \cdot 10^{-59}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-113}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{-10}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\left(2 + x \cdot 2\right) + {F}^{2}}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 8
Error16.67%
Cost13644
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5.5 \cdot 10^{-52}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.9 \cdot 10^{-114}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 1.55 \cdot 10^{-9}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 9
Error36.3%
Cost13580
\[\begin{array}{l} \mathbf{if}\;F \leq -1.25 \cdot 10^{+45}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.35 \cdot 10^{-6}:\\ \;\;\;\;-1 + \left(\frac{-1}{\sin B} + 1\right)\\ \mathbf{elif}\;F \leq 2.7 \cdot 10^{-113}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+17}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 10
Error27.84%
Cost13448
\[\begin{array}{l} \mathbf{if}\;F \leq -1.02 \cdot 10^{-54}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-114}:\\ \;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+17}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 11
Error45.25%
Cost8152
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ t_1 := \sqrt{\frac{1}{2 + x \cdot 2}}\\ \mathbf{if}\;F \leq -4 \cdot 10^{+44}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -420:\\ \;\;\;\;-1 + \left(\frac{-1}{\sin B} + 1\right)\\ \mathbf{elif}\;F \leq -5 \cdot 10^{-133}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.45 \cdot 10^{-142}:\\ \;\;\;\;\frac{F \cdot t_1 - x}{B}\\ \mathbf{elif}\;F \leq 1.15 \cdot 10^{-113}:\\ \;\;\;\;\frac{-1}{B} - \frac{1}{\frac{\tan B}{x}}\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+17}:\\ \;\;\;\;t_1 \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 12
Error45.3%
Cost8024
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ t_1 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{if}\;F \leq -2.1 \cdot 10^{+42}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -100:\\ \;\;\;\;-1 + \left(\frac{-1}{\sin B} + 1\right)\\ \mathbf{elif}\;F \leq -5 \cdot 10^{-133}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.35 \cdot 10^{-141}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-115}:\\ \;\;\;\;\frac{-1}{B} - \frac{1}{\frac{\tan B}{x}}\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+17}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 13
Error47.19%
Cost7636
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -7.8 \cdot 10^{+43}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -3.4:\\ \;\;\;\;-1 + \left(\frac{-1}{\sin B} + 1\right)\\ \mathbf{elif}\;F \leq -4.6 \cdot 10^{-191}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-188}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+17}:\\ \;\;\;\;\frac{-1}{B} - \frac{1}{\frac{\tan B}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 14
Error47.19%
Cost7508
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -3 \cdot 10^{+43}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -390:\\ \;\;\;\;-1 + \left(\frac{-1}{\sin B} + 1\right)\\ \mathbf{elif}\;F \leq -4.6 \cdot 10^{-191}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 8 \cdot 10^{-185}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+17}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 15
Error54.48%
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -6.8 \cdot 10^{-12}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+17}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 16
Error57.73%
Cost6724
\[\begin{array}{l} \mathbf{if}\;F \leq -8 \cdot 10^{-8}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-93}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 17
Error75.98%
Cost585
\[\begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{-182} \lor \neg \left(x \leq 8 \cdot 10^{-59}\right):\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;-1 + \frac{-1}{B}\\ \end{array} \]
Alternative 18
Error62.09%
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -8.5 \cdot 10^{-66}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-93}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 19
Error76.63%
Cost521
\[\begin{array}{l} \mathbf{if}\;x \leq -8.6 \cdot 10^{-90} \lor \neg \left(x \leq 1.55 \cdot 10^{-80}\right):\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B}\\ \end{array} \]
Alternative 20
Error70.34%
Cost452
\[\begin{array}{l} \mathbf{if}\;F \leq -1 \cdot 10^{-65}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{B}\\ \end{array} \]
Alternative 21
Error89.12%
Cost192
\[\frac{-1}{B} \]

Error

Reproduce?

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