?

Average Error: 14.0 → 0.3
Time: 32.8s
Precision: binary64
Cost: 26568

?

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

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

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


\end{array}

Error?

Derivation?

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

    1. Initial program 26.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. Simplified26.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]26.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 [=>]26.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 [=>]26.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 [=>]26.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 [=>]26.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 [=>]26.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 [=>]26.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 [=>]26.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 [=>]26.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/ [=>]26.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 [=>]26.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 0.2

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

    if -7.9999999999999993e23 < F < 15000

    1. Initial program 0.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. Simplified0.4

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

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

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

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

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

      [Start]0.3

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

      pow-sqr [=>]0.3

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

      metadata-eval [=>]0.3

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

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

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

      [Start]0.4

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

      unpow2 [=>]0.4

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

      fma-udef [<=]0.4

      \[ \frac{F \cdot {\left(\sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}\right)}^{-1}}{\sin B} - \frac{x}{\tan B} \]
    8. Applied egg-rr22.4

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

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

      [Start]22.4

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

      expm1-def [=>]9.1

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

      expm1-log1p [=>]0.4

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

    if 15000 < F

    1. Initial program 26.3

      \[\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. Simplified26.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]26.3

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

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

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

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

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

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

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

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

      \[ \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/ [=>]26.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 [=>]26.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-rr19.9

      \[\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. Applied egg-rr20.0

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

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

      [Start]20.0

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

      pow-sqr [=>]19.9

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

      metadata-eval [=>]19.9

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

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

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

      [Start]19.9

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

      unpow2 [=>]19.9

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

      fma-udef [<=]19.9

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

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

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

      [Start]0.1

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

      unpow2 [=>]0.1

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

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

Alternatives

Alternative 1
Error0.6
Cost26568
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.5:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.35:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, 2\right)}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\ \end{array} \]
Alternative 2
Error0.6
Cost26568
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.5:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.4:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\ \end{array} \]
Alternative 3
Error0.3
Cost20744
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -8 \cdot 10^{+23}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 59000:\\ \;\;\;\;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 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\ \end{array} \]
Alternative 4
Error0.6
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.45:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.45:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\ \end{array} \]
Alternative 5
Error0.6
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.4:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.4:\\ \;\;\;\;\frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\frac{\sin B}{F}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\ \end{array} \]
Alternative 6
Error0.6
Cost20424
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.3:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.35:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\ \end{array} \]
Alternative 7
Error0.6
Cost20168
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.3:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.4:\\ \;\;\;\;\frac{F \cdot \frac{1}{\sqrt{2}}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\ \end{array} \]
Alternative 8
Error0.6
Cost20040
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.42:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1.4:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\ \end{array} \]
Alternative 9
Error5.5
Cost14476
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\ \mathbf{if}\;F \leq -7.4 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -2.05 \cdot 10^{-134}:\\ \;\;\;\;\frac{F}{\sin B} \cdot t_1 - \frac{x}{B}\\ \mathbf{elif}\;F \leq 96:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + t_1 \cdot \frac{F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\ \end{array} \]
Alternative 10
Error5.5
Cost14216
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -7.4 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -2.85 \cdot 10^{-129}:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.15:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\ \end{array} \]
Alternative 11
Error5.5
Cost14028
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -7.4 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -3.6 \cdot 10^{-134}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\ \end{array} \]
Alternative 12
Error22.4
Cost13977
\[\begin{array}{l} \mathbf{if}\;F \leq -7.5 \cdot 10^{+92}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -0.43:\\ \;\;\;\;\frac{F \cdot \frac{-1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -3.3 \cdot 10^{-134}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 2.75 \cdot 10^{-11} \lor \neg \left(F \leq 3.3 \cdot 10^{+140}\right) \land F \leq 8.5 \cdot 10^{+172}:\\ \;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 13
Error5.6
Cost13896
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 1:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\ \end{array} \]
Alternative 14
Error17.7
Cost13845
\[\begin{array}{l} \mathbf{if}\;F \leq -7.4 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.02 \cdot 10^{-131}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 1.4 \cdot 10^{-11} \lor \neg \left(F \leq 9.5 \cdot 10^{+140}\right) \land F \leq 8.5 \cdot 10^{+172}:\\ \;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 15
Error5.7
Cost13764
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1:\\ \;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 0.225:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 16
Error10.5
Cost13644
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -3.8 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq -1.1 \cdot 10^{-129}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 1.42 \cdot 10^{-11}:\\ \;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 17
Error5.7
Cost13640
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.215:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 0.39:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \]
Alternative 18
Error26.3
Cost7892
\[\begin{array}{l} t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -7.8 \cdot 10^{+92}:\\ \;\;\;\;\frac{-1}{B} - t_1\\ \mathbf{elif}\;F \leq -0.23:\\ \;\;\;\;\frac{F \cdot \frac{-1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -8.5 \cdot 10^{-130}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 6.9 \cdot 10^{-245}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_1\\ \mathbf{elif}\;F \leq 0.066:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 19
Error29.1
Cost7640
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.1 \cdot 10^{+96}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -0.195:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -5.2 \cdot 10^{-73}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq -1.78 \cdot 10^{-276}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 6.4 \cdot 10^{-260}:\\ \;\;\;\;\frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 2.75 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 20
Error28.5
Cost7632
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.15 \cdot 10^{+96}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq -0.32:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -1.9 \cdot 10^{-78}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 3 \cdot 10^{-11}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 21
Error28.0
Cost7632
\[\begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -7.8 \cdot 10^{+92}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq -0.008:\\ \;\;\;\;\frac{F \cdot \frac{-1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7.2 \cdot 10^{-78}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 3 \cdot 10^{-11}:\\ \;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 22
Error29.1
Cost7508
\[\begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.02 \cdot 10^{+97}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -1.9 \cdot 10^{+55}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -2.5 \cdot 10^{-277}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 6.9 \cdot 10^{-261}:\\ \;\;\;\;\frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 3 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 23
Error35.0
Cost7048
\[\begin{array}{l} \mathbf{if}\;F \leq -4.7 \cdot 10^{-14}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1.45 \cdot 10^{-89}:\\ \;\;\;\;\frac{x}{B} \cdot \left(-\cos B\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 24
Error33.9
Cost6920
\[\begin{array}{l} \mathbf{if}\;F \leq -1.5 \cdot 10^{-14}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-11}:\\ \;\;\;\;\frac{-x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 25
Error35.0
Cost6856
\[\begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{-14}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1.45 \cdot 10^{-89}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
Alternative 26
Error37.6
Cost6724
\[\begin{array}{l} \mathbf{if}\;F \leq -1.3 \cdot 10^{-14}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 6.6 \cdot 10^{-130}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 27
Error40.3
Cost584
\[\begin{array}{l} \mathbf{if}\;F \leq -1.6 \cdot 10^{-52}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 2.6 \cdot 10^{-128}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
Alternative 28
Error45.3
Cost452
\[\begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{-55}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \]
Alternative 29
Error47.6
Cost388
\[\begin{array}{l} \mathbf{if}\;F \leq -1 \cdot 10^{-13}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \]
Alternative 30
Error56.9
Cost192
\[\frac{-1}{B} \]

Error

Reproduce?

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