?

Average Accuracy: 78.7% → 99.6%
Time: 33.4s
Precision: binary64
Cost: 33160

?

\[\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 -7.5 \cdot 10^{+39}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{1}{\tan B} \cdot x\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+41}:\\ \;\;\;\;\frac{F}{\frac{\sin B}{{\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} \]
(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 -7.5e+39)
     (- (/ -1.0 (sin B)) (* (/ 1.0 (tan B)) x))
     (if (<= F 2e+41)
       (- (/ F (/ (sin B) (pow (fma x 2.0 (fma F F 2.0)) -0.5))) 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 <= -7.5e+39) {
		tmp = (-1.0 / sin(B)) - ((1.0 / tan(B)) * x);
	} else if (F <= 2e+41) {
		tmp = (F / (sin(B) / pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5))) - 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 <= -7.5e+39)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(1.0 / tan(B)) * x));
	elseif (F <= 2e+41)
		tmp = Float64(Float64(F / Float64(sin(B) / (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5))) - 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, -7.5e+39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e+41], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $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 -7.5 \cdot 10^{+39}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{1}{\tan B} \cdot x\\

\mathbf{elif}\;F \leq 2 \cdot 10^{+41}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{{\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}

Error?

Derivation?

  1. Split input into 3 regimes
  2. if F < -7.5000000000000005e39

    1. Initial program 56.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. Simplified56.1%

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

      +-commutative [=>]56.1

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

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

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

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

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

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

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

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

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

      \[ \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 99.8%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    4. Applied egg-rr99.7%

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

      [Start]99.8

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

      div-inv [=>]99.7

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

      *-commutative [=>]99.7

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

    if -7.5000000000000005e39 < F < 2.00000000000000001e41

    1. Initial program 99.2%

      \[\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. Simplified99.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]99.2

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

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

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

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

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

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

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

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

      \[ \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/ [=>]99.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 [=>]99.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-rr99.6%

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

      [Start]99.3

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

      associate-*l/ [=>]99.6

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

      associate-/l* [=>]99.6

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

    if 2.00000000000000001e41 < F

    1. Initial program 56.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. Simplified56.9%

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

      unsub-neg [=>]56.8

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

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

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

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

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

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

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

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

      \[ \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 99.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.5 \cdot 10^{+39}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{1}{\tan B} \cdot x\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+41}:\\ \;\;\;\;\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}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy99.6%
Cost33160
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.4 \cdot 10^{+52}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{1}{\tan B} \cdot x\\ \mathbf{elif}\;F \leq 4.8 \cdot 10^{+91}:\\ \;\;\;\;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
Accuracy99.4%
Cost20744
\[\begin{array}{l} \mathbf{if}\;F \leq -2 \cdot 10^{+40}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{1}{\tan B} \cdot x\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+41}:\\ \;\;\;\;\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} - \frac{x}{\tan B}\\ \end{array} \]
Alternative 3
Accuracy98.9%
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.5:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{1}{\tan B} \cdot x\\ \mathbf{elif}\;F \leq 1.45:\\ \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 4
Accuracy98.9%
Cost20296
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.48:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{1}{\tan B} \cdot x\\ \mathbf{elif}\;F \leq 1.6:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 5
Accuracy88.9%
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}\\ \mathbf{if}\;F \leq -1.2 \cdot 10^{+28}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{1}{\tan B} \cdot x\\ \mathbf{elif}\;F \leq -2.7 \cdot 10^{-122}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 3 \cdot 10^{-128}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 420000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
Alternative 6
Accuracy67.7%
Cost13712
\[\begin{array}{l} t_0 := \frac{F}{\frac{\sin B}{\frac{-1}{F}}} - \frac{x}{B}\\ \mathbf{if}\;F \leq -5.8 \cdot 10^{+143}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -2.9 \cdot 10^{+94}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.8 \cdot 10^{-15}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 3.5 \cdot 10^{+19}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(F \cdot \sin B\right) \cdot \frac{1}{F}} - \frac{x}{B}\\ \end{array} \]
Alternative 7
Accuracy82.9%
Cost13512
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -6.4 \cdot 10^{-28}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 2.7 \cdot 10^{-18}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 8
Accuracy82.9%
Cost13512
\[\begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{-32}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{1}{\tan B} \cdot x\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-18}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
Alternative 9
Accuracy75.4%
Cost13448
\[\begin{array}{l} \mathbf{if}\;F \leq -2.9 \cdot 10^{-31}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.5 \cdot 10^{+19}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(F \cdot \sin B\right) \cdot \frac{1}{F}} - \frac{x}{B}\\ \end{array} \]
Alternative 10
Accuracy58.3%
Cost8552
\[\begin{array}{l} t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{-1}{B} - t_1\\ t_3 := \frac{-1}{B} + x \cdot \frac{-1}{\tan B}\\ t_4 := \frac{F}{\frac{\sin B}{\frac{-1}{F}}} - \frac{x}{B}\\ \mathbf{if}\;F \leq -4.2 \cdot 10^{+147}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;F \leq -3.3 \cdot 10^{+94}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -145000:\\ \;\;\;\;t_4\\ \mathbf{elif}\;F \leq -1.1 \cdot 10^{-254}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-305}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.6 \cdot 10^{-251}:\\ \;\;\;\;\frac{1}{F} \cdot \frac{F}{B} - t_1\\ \mathbf{elif}\;F \leq 6.2 \cdot 10^{-219}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.2 \cdot 10^{-136}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq 1.06 \cdot 10^{-82}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 3.5 \cdot 10^{+19}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(F \cdot \sin B\right) \cdot \frac{1}{F}} - \frac{x}{B}\\ \end{array} \]
Alternative 11
Accuracy57.9%
Cost8288
\[\begin{array}{l} t_0 := \frac{-x}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{-1}{B} - t_1\\ t_3 := \frac{F}{\frac{\sin B}{\frac{-1}{F}}} - \frac{x}{B}\\ \mathbf{if}\;F \leq -1.55 \cdot 10^{+146}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq -9.6 \cdot 10^{+92}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -18.5:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq -3.7 \cdot 10^{-257}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 1.7 \cdot 10^{-307}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{-246}:\\ \;\;\;\;\frac{1}{F} \cdot \frac{F}{B} - t_1\\ \mathbf{elif}\;F \leq 1.6 \cdot 10^{-200}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 3.5 \cdot 10^{+19}:\\ \;\;\;\;\frac{-1}{B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(F \cdot \sin B\right) \cdot \frac{1}{F}} - \frac{x}{B}\\ \end{array} \]
Alternative 12
Accuracy52.5%
Cost8164
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{-x}{\sin B}\\ t_2 := \frac{-1}{B} + x \cdot \frac{-1}{\tan B}\\ t_3 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.2 \cdot 10^{+199}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -2.55 \cdot 10^{+153}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -2.1 \cdot 10^{+90}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq -23000000:\\ \;\;\;\;1 + \left(-1 + t_0\right)\\ \mathbf{elif}\;F \leq -2.5 \cdot 10^{-258}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq 1.12 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{-253}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq 6.2 \cdot 10^{-216}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 7.8 \cdot 10^{+39}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 13
Accuracy52.8%
Cost8164
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{-x}{\sin B}\\ t_2 := \frac{x}{\tan B}\\ t_3 := \frac{-1}{B} + x \cdot \frac{-1}{\tan B}\\ t_4 := \frac{-1}{B} - t_2\\ \mathbf{if}\;F \leq -4.2 \cdot 10^{+198}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq -2 \cdot 10^{+148}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.96 \cdot 10^{+90}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;F \leq -62000000:\\ \;\;\;\;1 + \left(-1 + t_0\right)\\ \mathbf{elif}\;F \leq -5.8 \cdot 10^{-260}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;F \leq 5.2 \cdot 10^{-306}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 5 \cdot 10^{-253}:\\ \;\;\;\;\frac{1}{F} \cdot \frac{F}{B} - t_2\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-225}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{+38}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 14
Accuracy52.6%
Cost8036
\[\begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{-x}{\sin B}\\ t_2 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -7.2 \cdot 10^{+198}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -2.2 \cdot 10^{+150}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.95 \cdot 10^{+90}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -3800000:\\ \;\;\;\;1 + \left(-1 + t_0\right)\\ \mathbf{elif}\;F \leq -6.2 \cdot 10^{-258}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 1.1 \cdot 10^{-307}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{-248}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{-217}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 7 \cdot 10^{+38}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 15
Accuracy53.7%
Cost8032
\[\begin{array}{l} t_0 := \frac{-x}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ t_2 := \frac{-1}{B} - t_1\\ t_3 := \frac{F}{\frac{\sin B}{\frac{-1}{F}}} - \frac{x}{B}\\ \mathbf{if}\;F \leq -5 \cdot 10^{+150}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{+94}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -210:\\ \;\;\;\;t_3\\ \mathbf{elif}\;F \leq -2.6 \cdot 10^{-259}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 1.4 \cdot 10^{-307}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-246}:\\ \;\;\;\;\frac{1}{F} \cdot \frac{F}{B} - t_1\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-226}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{+38}:\\ \;\;\;\;\frac{-1}{B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 16
Accuracy46.2%
Cost6920
\[\begin{array}{l} \mathbf{if}\;F \leq -1.12 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 3.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{-x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 17
Accuracy45.0%
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -1.45 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 3.1 \cdot 10^{-18}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 18
Accuracy41.2%
Cost6724
\[\begin{array}{l} \mathbf{if}\;F \leq -1.4 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-18}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 19
Accuracy33.4%
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -1.6 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 2.75 \cdot 10^{-18}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 20
Accuracy37.3%
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-67}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.7 \cdot 10^{-18}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 21
Accuracy28.8%
Cost520
\[\begin{array}{l} \mathbf{if}\;F \leq -2.6 \cdot 10^{-11}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 4.2 \cdot 10^{+47}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 22
Accuracy17.2%
Cost324
\[\begin{array}{l} \mathbf{if}\;F \leq 4.2 \cdot 10^{+47}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
Alternative 23
Accuracy11.1%
Cost192
\[\frac{-1}{B} \]

Error

Reproduce?

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