?

Average Error: 13.5 → 0.2
Time: 26.7s
Precision: binary64
Cost: 26696

?

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

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

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


\end{array}

Error?

Derivation?

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

    1. Initial program 26.0

      \[\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. Simplified25.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]26.0

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

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

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

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

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

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

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

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

      \[ \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/ [=>]25.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 [=>]25.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 0.2

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

    if -3.5e18 < F < 1e5

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

      +-commutative [=>]0.4

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

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

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

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

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

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

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

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

      \[\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. Taylor expanded in x around 0 0.3

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

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

      [Start]0.3

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

      unpow2 [=>]0.3

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

      fma-udef [<=]0.3

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

    if 1e5 < F

    1. Initial program 24.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. Simplified24.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]24.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)} \]

      +-commutative [=>]24.4

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{\tan B} \]
    5. Taylor expanded in x around 0 18.7

      \[\leadsto \frac{1}{\sin B} \cdot \frac{F}{\color{blue}{\sqrt{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
    6. Simplified18.7

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

      [Start]18.7

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

      unpow2 [=>]18.7

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

      fma-udef [<=]18.7

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

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

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

Alternatives

Alternative 1
Error0.3
Cost26696
\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5 \cdot 10^{+156}:\\ \;\;\;\;\frac{-1}{\sin B} - t_1\\ \mathbf{elif}\;F \leq 10000:\\ \;\;\;\;t_0 \cdot \frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t_1\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \frac{F}{F + \frac{1}{F}} - t_1\\ \end{array} \]
Alternative 2
Error0.3
Cost20744
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -45000:\\ \;\;\;\;t_1 \cdot \left(-1 + \frac{1}{F \cdot F}\right) - t_0\\ \mathbf{elif}\;F \leq 10000:\\ \;\;\;\;\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}:\\ \;\;\;\;t_1 \cdot \frac{F}{F + \frac{1}{F}} - t_0\\ \end{array} \]
Alternative 3
Error0.3
Cost20744
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -16200:\\ \;\;\;\;t_1 \cdot \left(-1 + \frac{1}{F \cdot F}\right) - t_0\\ \mathbf{elif}\;F \leq 400000000:\\ \;\;\;\;\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}:\\ \;\;\;\;t_1 - t_0\\ \end{array} \]
Alternative 4
Error0.6
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -1.42:\\ \;\;\;\;t_1 \cdot \left(-1 + \frac{1}{F \cdot F}\right) - t_0\\ \mathbf{elif}\;F \leq 0.92:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{F}{F + \frac{1}{F}} - t_0\\ \end{array} \]
Alternative 5
Error0.6
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -1.42:\\ \;\;\;\;t_1 \cdot \left(-1 + \frac{1}{F \cdot F}\right) - t_0\\ \mathbf{elif}\;F \leq 0.92:\\ \;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{\frac{1}{2 + x \cdot 2}}}} - t_0\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{F}{F + \frac{1}{F}} - t_0\\ \end{array} \]
Alternative 6
Error0.6
Cost20168
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -1.4:\\ \;\;\;\;t_1 \cdot \left(-1 + \frac{1}{F \cdot F}\right) - t_0\\ \mathbf{elif}\;F \leq 0.9:\\ \;\;\;\;\frac{1}{\frac{\sqrt{2}}{\frac{F}{\sin B}}} - t_0\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{F}{F + \frac{1}{F}} - t_0\\ \end{array} \]
Alternative 7
Error0.6
Cost20040
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -1.42:\\ \;\;\;\;t_1 \cdot \left(-1 + \frac{1}{F \cdot F}\right) - t_0\\ \mathbf{elif}\;F \leq 0.92:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}} - t_0\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{F}{F + \frac{1}{F}} - t_0\\ \end{array} \]
Alternative 8
Error5.5
Cost14024
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -1.05:\\ \;\;\;\;t_1 \cdot \left(-1 + \frac{1}{F \cdot F}\right) - t_0\\ \mathbf{elif}\;F \leq 6.2 \cdot 10^{-23}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{F}{F + \frac{1}{F}} - t_0\\ \end{array} \]
Alternative 9
Error5.8
Cost14024
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -2.1 \cdot 10^{-26}:\\ \;\;\;\;t_1 \cdot \frac{F}{\frac{-1 - x}{F} - F} - t_0\\ \mathbf{elif}\;F \leq 6.2 \cdot 10^{-23}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{F}{F + \frac{1}{F}} - t_0\\ \end{array} \]
Alternative 10
Error10.7
Cost13892
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -1:\\ \;\;\;\;t_1 \cdot \left(-1 + \frac{1}{F \cdot F}\right) - t_0\\ \mathbf{elif}\;F \leq 6 \cdot 10^{-101}:\\ \;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 - t_0\\ \end{array} \]
Alternative 11
Error10.2
Cost13892
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -0.85:\\ \;\;\;\;t_1 \cdot \left(-1 + \frac{1}{F \cdot F}\right) - t_0\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{F}{F + \frac{1}{F}} - t_0\\ \end{array} \]
Alternative 12
Error10.7
Cost13512
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -6.2 \cdot 10^{-20}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 6 \cdot 10^{-101}:\\ \;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 13
Error19.9
Cost13448
\[\begin{array}{l} \mathbf{if}\;F \leq -1.3 \cdot 10^{-61}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.05 \cdot 10^{-43}:\\ \;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
Alternative 14
Error15.2
Cost13448
\[\begin{array}{l} \mathbf{if}\;F \leq -6.6 \cdot 10^{-21}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4.15 \cdot 10^{-44}:\\ \;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
Alternative 15
Error29.0
Cost7244
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.4 \cdot 10^{-187}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -4.05 \cdot 10^{-243}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 58000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 16
Error26.7
Cost7244
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.05 \cdot 10^{-183}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.4 \cdot 10^{-241}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 1.05 \cdot 10^{-43}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
Alternative 17
Error34.8
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -1.1 \cdot 10^{-61}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 58000000:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 18
Error37.4
Cost6724
\[\begin{array}{l} \mathbf{if}\;F \leq -1.32 \cdot 10^{-61}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1.95 \cdot 10^{-114}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 19
Error39.4
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -1.26 \cdot 10^{-61}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.85 \cdot 10^{-114}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 20
Error39.4
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -3.2 \cdot 10^{-62}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.85 \cdot 10^{-114}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 21
Error44.3
Cost452
\[\begin{array}{l} \mathbf{if}\;F \leq -5 \cdot 10^{-63}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \]
Alternative 22
Error46.9
Cost388
\[\begin{array}{l} \mathbf{if}\;F \leq -1.1 \cdot 10^{-61}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \]
Alternative 23
Error56.4
Cost192
\[\frac{-1}{B} \]

Error

Reproduce?

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