Average Error: 13.4 → 0.2
Time: 27.3s
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{x}{\tan B}\\ \mathbf{if}\;F \leq -2 \cdot 10^{+86}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\ \mathbf{elif}\;F \leq 60000:\\ \;\;\;\;\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_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + -0.5 \cdot \frac{-2 + x \cdot -2}{F \cdot \left(-F\right)}}{\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 -2e+86)
     (- (/ -1.0 (sin B)) (* (/ x (sin B)) (cos B)))
     (if (<= F 60000.0)
       (- (/ (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B)) (/ 1.0 F)) t_0)
       (-
        (/ (+ 1.0 (* -0.5 (/ (+ -2.0 (* x -2.0)) (* F (- F))))) (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 <= -2e+86) {
		tmp = (-1.0 / sin(B)) - ((x / sin(B)) * cos(B));
	} else if (F <= 60000.0) {
		tmp = ((pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B)) / (1.0 / F)) - t_0;
	} else {
		tmp = ((1.0 + (-0.5 * ((-2.0 + (x * -2.0)) / (F * -F)))) / 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 <= -2e+86)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x / sin(B)) * cos(B)));
	elseif (F <= 60000.0)
		tmp = Float64(Float64(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B)) / Float64(1.0 / F)) - t_0);
	else
		tmp = Float64(Float64(Float64(1.0 + Float64(-0.5 * Float64(Float64(-2.0 + Float64(x * -2.0)) / Float64(F * Float64(-F))))) / 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, -2e+86], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 60000.0], 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$0), $MachinePrecision], N[(N[(N[(1.0 + N[(-0.5 * N[(N[(-2.0 + N[(x * -2.0), $MachinePrecision]), $MachinePrecision] / N[(F * (-F)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -2 \cdot 10^{+86}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\

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

\mathbf{else}:\\
\;\;\;\;\frac{1 + -0.5 \cdot \frac{-2 + x \cdot -2}{F \cdot \left(-F\right)}}{\sin B} - t_0\\


\end{array}

Error

Derivation

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

    1. Initial program 31.5

      \[\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. Simplified31.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e86 < F < 6e4

    1. Initial program 0.7

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 6e4 < F

    1. Initial program 24.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. Simplified24.0

      \[\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]24.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 [=>]24.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 [=>]24.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 [=>]24.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 [=>]24.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 [=>]24.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 [=>]24.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 [=>]24.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 [=>]24.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/ [=>]24.0

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

      \[ \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-rr18.6

      \[\leadsto \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} \]
    4. Taylor expanded in F around inf 0.2

      \[\leadsto \frac{\color{blue}{1 + -0.5 \cdot \frac{2 + 2 \cdot x}{{F}^{2}}}}{\sin B} - \frac{x}{\tan B} \]
    5. Simplified0.2

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

      [Start]0.2

      \[ \frac{1 + -0.5 \cdot \frac{2 + 2 \cdot x}{{F}^{2}}}{\sin B} - \frac{x}{\tan B} \]

      +-commutative [=>]0.2

      \[ \frac{1 + -0.5 \cdot \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}}{\sin B} - \frac{x}{\tan B} \]

      fma-def [=>]0.2

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

      unpow2 [=>]0.2

      \[ \frac{1 + -0.5 \cdot \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}}{\sin B} - \frac{x}{\tan B} \]
    6. Applied egg-rr0.2

      \[\leadsto \frac{1 + -0.5 \cdot \color{blue}{\left(\left(-2 - 2 \cdot x\right) \cdot \frac{1}{F \cdot \left(-F\right)}\right)}}{\sin B} - \frac{x}{\tan B} \]
    7. Simplified0.2

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

      [Start]0.2

      \[ \frac{1 + -0.5 \cdot \left(\left(-2 - 2 \cdot x\right) \cdot \frac{1}{F \cdot \left(-F\right)}\right)}{\sin B} - \frac{x}{\tan B} \]

      associate-*r/ [=>]0.2

      \[ \frac{1 + -0.5 \cdot \color{blue}{\frac{\left(-2 - 2 \cdot x\right) \cdot 1}{F \cdot \left(-F\right)}}}{\sin B} - \frac{x}{\tan B} \]

      *-rgt-identity [=>]0.2

      \[ \frac{1 + -0.5 \cdot \frac{\color{blue}{-2 - 2 \cdot x}}{F \cdot \left(-F\right)}}{\sin B} - \frac{x}{\tan B} \]

      cancel-sign-sub-inv [=>]0.2

      \[ \frac{1 + -0.5 \cdot \frac{\color{blue}{-2 + \left(-2\right) \cdot x}}{F \cdot \left(-F\right)}}{\sin B} - \frac{x}{\tan B} \]

      metadata-eval [=>]0.2

      \[ \frac{1 + -0.5 \cdot \frac{-2 + \color{blue}{-2} \cdot x}{F \cdot \left(-F\right)}}{\sin B} - \frac{x}{\tan B} \]

      *-commutative [=>]0.2

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2 \cdot 10^{+86}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\ \mathbf{elif}\;F \leq 60000:\\ \;\;\;\;\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 + -0.5 \cdot \frac{-2 + x \cdot -2}{F \cdot \left(-F\right)}}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]

Alternatives

Alternative 1
Error0.2
Cost33160
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1 \cdot 10^{+115}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\ \mathbf{elif}\;F \leq 60000:\\ \;\;\;\;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 + -0.5 \cdot \frac{-2 + x \cdot -2}{F \cdot \left(-F\right)}}{\sin B} - t_0\\ \end{array} \]
Alternative 2
Error0.2
Cost33160
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -8 \cdot 10^{+119}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\ \mathbf{elif}\;F \leq 10^{+18}:\\ \;\;\;\;\frac{F \cdot {\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 3
Error0.3
Cost20744
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -46:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 160000000:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \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
Error0.6
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -48:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 900:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + -0.5 \cdot \frac{-2 + x \cdot -2}{F \cdot \left(-F\right)}}{\sin B} - t_0\\ \end{array} \]
Alternative 5
Error0.6
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -48:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 900:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + -0.5 \cdot \frac{-2 + x \cdot -2}{F \cdot \left(-F\right)}}{\sin B} - t_0\\ \end{array} \]
Alternative 6
Error7.2
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 -1.25:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -1.9 \cdot 10^{-96}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{-109}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 880:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \]
Alternative 7
Error7.3
Cost14416
\[\begin{array}{l} t_0 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} + x \cdot \frac{-1}{B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.068:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq -2.1 \cdot 10^{-97}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 3 \cdot 10^{-112}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{elif}\;F \leq 0.27:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \]
Alternative 8
Error10.4
Cost13644
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.78:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -2.3 \cdot 10^{-94}:\\ \;\;\;\;x \cdot \frac{-1}{B} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 1.4 \cdot 10^{-43}:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 9
Error15.4
Cost13580
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{B}\\ \mathbf{if}\;F \leq -6.8:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -8.5 \cdot 10^{-96}:\\ \;\;\;\;t_0 + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 100000:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + t_0\\ \end{array} \]
Alternative 10
Error20.2
Cost13448
\[\begin{array}{l} \mathbf{if}\;F \leq -980000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 62000:\\ \;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{B}\\ \end{array} \]
Alternative 11
Error20.2
Cost13448
\[\begin{array}{l} \mathbf{if}\;F \leq -55:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 62000:\\ \;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{B}\\ \end{array} \]
Alternative 12
Error26.0
Cost8856
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{B}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ t_2 := t_0 + {\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)\\ \mathbf{if}\;F \leq -1050000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -1.5 \cdot 10^{-167}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -6.8 \cdot 10^{-291}:\\ \;\;\;\;\left(B \cdot x\right) \cdot \frac{-1}{B \cdot \tan B}\\ \mathbf{elif}\;F \leq 3.8 \cdot 10^{-239}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 2.25 \cdot 10^{-122}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.9 \cdot 10^{-40}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 62000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + t_0\\ \end{array} \]
Alternative 13
Error26.1
Cost8472
\[\begin{array}{l} t_0 := x \cdot \frac{-1}{B}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ t_2 := t_0 + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\ \mathbf{if}\;F \leq -650:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -2.65 \cdot 10^{-170}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -6.8 \cdot 10^{-291}:\\ \;\;\;\;\left(B \cdot x\right) \cdot \frac{-1}{B \cdot \tan B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-238}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 1.7 \cdot 10^{-103}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 5.4 \cdot 10^{-40}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 62000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + t_0\\ \end{array} \]
Alternative 14
Error30.8
Cost7905
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\ t_2 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;x \leq -1.9 \cdot 10^{-26}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -4.5 \cdot 10^{-227}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.65 \cdot 10^{-248}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-211}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.72 \cdot 10^{-161}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-121} \lor \neg \left(x \leq 1.75 \cdot 10^{-62}\right) \land x \leq 8.2 \cdot 10^{-33}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 15
Error31.9
Cost7641
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;x \leq -1.8 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-227}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{-291}:\\ \;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\ \mathbf{elif}\;x \leq 7.8 \cdot 10^{-121} \lor \neg \left(x \leq 1.22 \cdot 10^{-62}\right) \land x \leq 7 \cdot 10^{-34}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error29.2
Cost7640
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -115000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -1.16 \cdot 10^{-167}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{-238}:\\ \;\;\;\;\left(B \cdot x\right) \cdot \frac{-1}{B \cdot \tan B}\\ \mathbf{elif}\;F \leq 3 \cdot 10^{+56}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{+73}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 9.8 \cdot 10^{+85}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.7 \cdot 10^{+118}:\\ \;\;\;\;\frac{1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error25.8
Cost7504
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -380:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -5.6 \cdot 10^{-170}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 1.95 \cdot 10^{-237}:\\ \;\;\;\;\left(B \cdot x\right) \cdot \frac{-1}{B \cdot \tan B}\\ \mathbf{elif}\;F \leq 130000000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{B}\\ \end{array} \]
Alternative 18
Error45.3
Cost7120
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ \mathbf{if}\;B \leq -3.1:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq -2.45 \cdot 10^{-178}:\\ \;\;\;\;\frac{1 - x}{B} + B \cdot \left(0.16666666666666666 + \left(x \cdot -0.16666666666666666 + x \cdot 0.5\right)\right)\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-212}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;B \leq 5.8 \cdot 10^{+16}:\\ \;\;\;\;\left(\frac{1}{B} + B \cdot \left(\left(0.16666666666666666 + x \cdot -0.16666666666666666\right) + x \cdot 0.5\right)\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 19
Error49.9
Cost585
\[\begin{array}{l} \mathbf{if}\;F \leq -1.95 \cdot 10^{+157} \lor \neg \left(F \leq -2.15 \cdot 10^{+85}\right):\\ \;\;\;\;\frac{1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B}\\ \end{array} \]
Alternative 20
Error45.0
Cost452
\[\begin{array}{l} \mathbf{if}\;F \leq -5.2 \cdot 10^{-202}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 21
Error56.9
Cost192
\[\frac{-1}{B} \]

Error

Reproduce

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