?

Average Error: 22.22% → 0.38%
Time: 32.7s
Precision: binary64
Cost: 33288

?

\[\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{-1}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -6.8 \cdot 10^{+23}:\\ \;\;\;\;t_0 - t_1\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}}{\frac{1}{F}} - t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \left(t_0 \cdot \cos B\right)\\ \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 (/ -1.0 (sin B))) (t_1 (/ x (tan B))))
   (if (<= F -6.8e+23)
     (- t_0 t_1)
     (if (<= F 2.5e+145)
       (- (/ (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B)) (/ 1.0 F)) t_1)
       (+ (/ 1.0 (sin B)) (* x (* t_0 (cos 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 t_0 = -1.0 / sin(B);
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -6.8e+23) {
		tmp = t_0 - t_1;
	} else if (F <= 2.5e+145) {
		tmp = ((pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B)) / (1.0 / F)) - t_1;
	} else {
		tmp = (1.0 / sin(B)) + (x * (t_0 * cos(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)
	t_0 = Float64(-1.0 / sin(B))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -6.8e+23)
		tmp = Float64(t_0 - t_1);
	elseif (F <= 2.5e+145)
		tmp = Float64(Float64(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B)) / Float64(1.0 / F)) - t_1);
	else
		tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(t_0 * cos(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_] := Block[{t$95$0 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.8e+23], N[(t$95$0 - t$95$1), $MachinePrecision], If[LessEqual[F, 2.5e+145], N[(N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(t$95$0 * N[Cos[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}
t_0 := \frac{-1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.8 \cdot 10^{+23}:\\
\;\;\;\;t_0 - t_1\\

\mathbf{elif}\;F \leq 2.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}}{\frac{1}{F}} - t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \left(t_0 \cdot \cos B\right)\\


\end{array}

Error?

Derivation?

  1. Split input into 3 regimes
  2. if F < -6.79999999999999983e23

    1. Initial program 43.09

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.79999999999999983e23 < F < 2.49999999999999983e145

    1. Initial program 2.25

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.49999999999999983e145 < F

    1. Initial program 63.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. Taylor expanded in F around inf 0.32

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.8 \cdot 10^{+23}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{+145}:\\ \;\;\;\;\frac{\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}}{\frac{1}{F}} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \left(\frac{-1}{\sin B} \cdot \cos B\right)\\ \end{array} \]

Alternatives

Alternative 1
Error0.37%
Cost33160
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -6.2 \cdot 10^{+23}:\\ \;\;\;\;t_0 - t_1\\ \mathbf{elif}\;F \leq 1.06 \cdot 10^{+144}:\\ \;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \left(t_0 \cdot \cos B\right)\\ \end{array} \]
Alternative 2
Error0.42%
Cost20744
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.9 \cdot 10^{+20}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 34000000:\\ \;\;\;\;\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.91%
Cost20744
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -31000000000000:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-7}:\\ \;\;\;\;\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.16%
Cost20552
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.65:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-7}:\\ \;\;\;\;\frac{\frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B}}{\frac{1}{F}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 5
Error1.17%
Cost20040
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.42:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-7}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 6
Error1.17%
Cost20040
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.42:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-7}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 7
Error1.17%
Cost20040
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.42:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-7}:\\ \;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 8
Error11.64%
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.088:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -1.85 \cdot 10^{-165}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 8.8 \cdot 10^{-188}:\\ \;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-7}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \]
Alternative 9
Error17.4%
Cost13776
\[\begin{array}{l} t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(0.16666666666666666 \cdot \left(F \cdot B\right) + \frac{F}{B}\right) - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.4 \cdot 10^{-24}:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -5.5 \cdot 10^{-166}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 3.4 \cdot 10^{-185}:\\ \;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\ \mathbf{elif}\;F \leq 4.4 \cdot 10^{-22}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \]
Alternative 10
Error8.75%
Cost13772
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.00012:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 7.2 \cdot 10^{-144}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-7}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 11
Error34.03%
Cost13712
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(0.16666666666666666 \cdot \left(F \cdot B\right) + \frac{F}{B}\right) - \frac{x}{B}\\ \mathbf{if}\;F \leq -7.4 \cdot 10^{+219}:\\ \;\;\;\;\frac{\frac{-1}{F \cdot \sin B}}{\frac{1}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -5.8 \cdot 10^{-49}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq -1.85 \cdot 10^{-165}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 3.4 \cdot 10^{-185}:\\ \;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\ \mathbf{elif}\;F \leq 5.2 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \]
Alternative 12
Error26.1%
Cost13580
\[\begin{array}{l} t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(0.16666666666666666 \cdot \left(F \cdot B\right) + \frac{F}{B}\right) - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -3.9 \cdot 10^{-24}:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -1.65 \cdot 10^{-165}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 3.4 \cdot 10^{-185}:\\ \;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\ \mathbf{elif}\;F \leq 2.9 \cdot 10^{-22}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_1\\ \end{array} \]
Alternative 13
Error40.93%
Cost8596
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{-1}{B} - t_0\\ t_2 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(0.16666666666666666 \cdot \left(F \cdot B\right) + \frac{F}{B}\right) - \frac{x}{B}\\ \mathbf{if}\;F \leq -3.1 \cdot 10^{+219}:\\ \;\;\;\;\frac{\frac{-1}{F \cdot \sin B}}{\frac{1}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -1.75 \cdot 10^{-48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-198}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 6.4 \cdot 10^{-186}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 2.7 \cdot 10^{-22}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \]
Alternative 14
Error40.72%
Cost7948
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{-1}{B} - t_0\\ \mathbf{if}\;F \leq -3.1 \cdot 10^{+219}:\\ \;\;\;\;\frac{\frac{-1}{F \cdot \sin B}}{\frac{1}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -5.8 \cdot 10^{-49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -4.5 \cdot 10^{-199}:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 5 \cdot 10^{-191}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.5 \cdot 10^{-11}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \]
Alternative 15
Error48.18%
Cost7508
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;x \leq -1.5 \cdot 10^{-150}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.65 \cdot 10^{-115}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{-66}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{-8}:\\ \;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error48.22%
Cost7508
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{-1}{B} - t_1\\ \mathbf{if}\;x \leq -1.9 \cdot 10^{-150}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-114}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{-74}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{-66}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-8}:\\ \;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_1\\ \end{array} \]
Alternative 17
Error40.74%
Cost7508
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{-1}{B} - t_0\\ t_2 := \frac{F \cdot \sqrt{0.5} - x}{B}\\ \mathbf{if}\;F \leq -4.8 \cdot 10^{+219}:\\ \;\;\;\;\frac{\frac{-1}{F \cdot \sin B}}{\frac{1}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -1.7 \cdot 10^{-49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -4.8 \cdot 10^{-199}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 7 \cdot 10^{-187}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 8 \cdot 10^{-11}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \]
Alternative 18
Error41.15%
Cost7376
\[\begin{array}{l} t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{-1}{B} - t_1\\ \mathbf{if}\;F \leq -7.5 \cdot 10^{-48}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -5.3 \cdot 10^{-198}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-190}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_1\\ \end{array} \]
Alternative 19
Error54.7%
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -0.000118:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-46}:\\ \;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 20
Error59.34%
Cost6724
\[\begin{array}{l} \mathbf{if}\;F \leq -2.8 \cdot 10^{-5}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.35 \cdot 10^{-141}:\\ \;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 21
Error63.23%
Cost840
\[\begin{array}{l} \mathbf{if}\;F \leq -3.6 \cdot 10^{-65}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{-142}:\\ \;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 22
Error77.26%
Cost785
\[\begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;x \leq -0.0076:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -1.25 \cdot 10^{-110}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;x \leq -6 \cdot 10^{-198} \lor \neg \left(x \leq 2.2 \cdot 10^{-89}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 23
Error67.08%
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -0.00012:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{-141}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 24
Error63.11%
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -2.9 \cdot 10^{-65}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 2 \cdot 10^{-141}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 25
Error81.16%
Cost324
\[\begin{array}{l} \mathbf{if}\;F \leq 1.7 \cdot 10^{-253}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 26
Error89%
Cost192
\[\frac{-1}{B} \]

Error

Reproduce?

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