VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.5% → 99.4%
Time: 24.2s
Alternatives: 27
Speedup: 1.5×

Specification

?
\[\begin{array}{l} \\ \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)} \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))))))
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)));
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
	return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x):
	return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
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 tmp = code(F, B, x)
	tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0)));
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]
\begin{array}{l}

\\
\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)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 27 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 76.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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)} \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))))))
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)));
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
	return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x):
	return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
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 tmp = code(F, B, x)
	tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0)));
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]
\begin{array}{l}

\\
\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)}
\end{array}

Alternative 1: 99.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -6.9 \cdot 10^{+34}:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 140000:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -6.9e+34)
     (+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
     (if (<= F 140000.0)
       (- (/ (/ F (sin B)) (hypot F (sqrt (fma 2.0 x 2.0)))) t_0)
       (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -6.9e+34) {
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	} else if (F <= 140000.0) {
		tmp = ((F / sin(B)) / hypot(F, sqrt(fma(2.0, x, 2.0)))) - t_0;
	} else {
		tmp = (1.0 / sin(B)) - t_0;
	}
	return tmp;
}
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -6.9e+34)
		tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
	elseif (F <= 140000.0)
		tmp = Float64(Float64(Float64(F / sin(B)) / hypot(F, sqrt(fma(2.0, x, 2.0)))) - t_0);
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_0);
	end
	return tmp
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.9e+34], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 140000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[F ^ 2 + N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.9 \cdot 10^{+34}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -6.90000000000000037e34

    1. Initial program 54.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. Taylor expanded in F around -inf 99.7%

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

    if -6.90000000000000037e34 < F < 1.4e5

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.4%

        \[\leadsto \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)} \]
      2. unsub-neg99.4%

        \[\leadsto \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}} \]
      3. associate-*l/99.5%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.5%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.5%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.6%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def99.6%

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

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

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.6%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow299.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative99.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.6%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative99.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow299.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def99.6%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Step-by-step derivation
      1. expm1-log1p-u88.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(F \cdot \frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}\right)\right)} - \frac{x}{\tan B} \]
      2. expm1-udef65.5%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(F \cdot \frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}\right)} - 1\right)} - \frac{x}{\tan B} \]
      3. un-div-inv65.5%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}}\right)} - 1\right) - \frac{x}{\tan B} \]
      4. div-inv65.5%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\frac{F}{\color{blue}{\sin B \cdot \frac{1}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}}\right)} - 1\right) - \frac{x}{\tan B} \]
      5. pow-flip65.5%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\frac{F}{\sin B \cdot \color{blue}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\left(--0.5\right)}}}\right)} - 1\right) - \frac{x}{\tan B} \]
      6. metadata-eval65.5%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\frac{F}{\sin B \cdot {\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\color{blue}{0.5}}}\right)} - 1\right) - \frac{x}{\tan B} \]
      7. pow1/265.5%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\frac{F}{\sin B \cdot \color{blue}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}\right)} - 1\right) - \frac{x}{\tan B} \]
      8. fma-udef65.5%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\frac{F}{\sin B \cdot \sqrt{\color{blue}{F \cdot F + \mathsf{fma}\left(2, x, 2\right)}}}\right)} - 1\right) - \frac{x}{\tan B} \]
      9. add-sqr-sqrt65.5%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\frac{F}{\sin B \cdot \sqrt{F \cdot F + \color{blue}{\sqrt{\mathsf{fma}\left(2, x, 2\right)} \cdot \sqrt{\mathsf{fma}\left(2, x, 2\right)}}}}\right)} - 1\right) - \frac{x}{\tan B} \]
      10. hypot-def65.5%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\frac{F}{\sin B \cdot \color{blue}{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}}\right)} - 1\right) - \frac{x}{\tan B} \]
    9. Applied egg-rr65.5%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{F}{\sin B \cdot \mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}\right)} - 1\right)} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. expm1-def89.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{F}{\sin B \cdot \mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}\right)\right)} - \frac{x}{\tan B} \]
      2. expm1-log1p99.6%

        \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}} - \frac{x}{\tan B} \]
      3. associate-/r*99.7%

        \[\leadsto \color{blue}{\frac{\frac{F}{\sin B}}{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}} - \frac{x}{\tan B} \]
    11. Simplified99.7%

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

    if 1.4e5 < F

    1. Initial program 56.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. Step-by-step derivation
      1. +-commutative56.4%

        \[\leadsto \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)} \]
      2. unsub-neg56.4%

        \[\leadsto \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}} \]
      3. associate-*l/78.7%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/78.6%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative78.6%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num78.7%

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

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

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

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr78.7%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-178.7%

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

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

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+78.7%

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. 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.7%

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

Alternative 2: 99.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;x \leq -1:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{\frac{1}{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}}{\sin B} - t_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= x -1.0)
     (- (/ -1.0 (sin B)) t_0)
     (- (* F (/ (/ 1.0 (hypot F (sqrt (fma 2.0 x 2.0)))) (sin B))) t_0))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (x <= -1.0) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else {
		tmp = (F * ((1.0 / hypot(F, sqrt(fma(2.0, x, 2.0)))) / sin(B))) - t_0;
	}
	return tmp;
}
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (x <= -1.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	else
		tmp = Float64(Float64(F * Float64(Float64(1.0 / hypot(F, sqrt(fma(2.0, x, 2.0)))) / sin(B))) - t_0);
	end
	return tmp
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[(N[(1.0 / N[Sqrt[F ^ 2 + N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}}{\sin B} - t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1

    1. Initial program 56.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. Step-by-step derivation
      1. +-commutative56.3%

        \[\leadsto \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)} \]
      2. unsub-neg56.3%

        \[\leadsto \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}} \]
      3. associate-*l/96.3%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/96.3%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative96.3%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num96.4%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative96.4%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def96.4%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr96.4%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-196.4%

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

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative96.4%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+96.4%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative96.4%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow296.4%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def96.4%

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

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

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

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

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

    if -1 < x

    1. Initial program 75.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. Step-by-step derivation
      1. +-commutative75.3%

        \[\leadsto \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)} \]
      2. unsub-neg75.3%

        \[\leadsto \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}} \]
      3. associate-*l/81.9%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/81.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative81.8%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num81.9%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative81.9%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def81.9%

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

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

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-181.9%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow281.9%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative81.9%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+81.9%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative81.9%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def81.9%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Step-by-step derivation
      1. inv-pow81.9%

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

        \[\leadsto F \cdot {\color{blue}{\left(\sin B \cdot \frac{1}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}\right)}}^{-1} - \frac{x}{\tan B} \]
      3. unpow-prod-down81.9%

        \[\leadsto F \cdot \color{blue}{\left({\sin B}^{-1} \cdot {\left(\frac{1}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}\right)} - \frac{x}{\tan B} \]
      4. inv-pow81.9%

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

        \[\leadsto F \cdot \left(\frac{1}{\sin B} \cdot {\color{blue}{\left({\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\left(--0.5\right)}\right)}}^{-1}\right) - \frac{x}{\tan B} \]
      6. metadata-eval81.9%

        \[\leadsto F \cdot \left(\frac{1}{\sin B} \cdot {\left({\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{\color{blue}{0.5}}\right)}^{-1}\right) - \frac{x}{\tan B} \]
      7. pow1/281.9%

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

        \[\leadsto F \cdot \left(\frac{1}{\sin B} \cdot {\left(\sqrt{\color{blue}{F \cdot F + \mathsf{fma}\left(2, x, 2\right)}}\right)}^{-1}\right) - \frac{x}{\tan B} \]
      9. add-sqr-sqrt81.9%

        \[\leadsto F \cdot \left(\frac{1}{\sin B} \cdot {\left(\sqrt{F \cdot F + \color{blue}{\sqrt{\mathsf{fma}\left(2, x, 2\right)} \cdot \sqrt{\mathsf{fma}\left(2, x, 2\right)}}}\right)}^{-1}\right) - \frac{x}{\tan B} \]
      10. hypot-def99.6%

        \[\leadsto F \cdot \left(\frac{1}{\sin B} \cdot {\color{blue}{\left(\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)\right)}}^{-1}\right) - \frac{x}{\tan B} \]
    9. Applied egg-rr99.6%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot {\left(\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)\right)}^{-1}\right)} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. associate-*l/99.6%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot {\left(\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)\right)}^{-1}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity99.6%

        \[\leadsto F \cdot \frac{\color{blue}{{\left(\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)\right)}^{-1}}}{\sin B} - \frac{x}{\tan B} \]
      3. unpow-199.6%

        \[\leadsto F \cdot \frac{\color{blue}{\frac{1}{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}}}{\sin B} - \frac{x}{\tan B} \]
    11. Simplified99.6%

      \[\leadsto F \cdot \color{blue}{\frac{\frac{1}{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}}{\sin B}} - \frac{x}{\tan B} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.6%

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

Alternative 3: 99.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -5.8 \cdot 10^{+16}:\\ \;\;\;\;\frac{-1}{\sin B} + t_0\\ \mathbf{elif}\;F \leq 140000:\\ \;\;\;\;t_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (* x (/ -1.0 (tan B)))))
   (if (<= F -5.8e+16)
     (+ (/ -1.0 (sin B)) t_0)
     (if (<= F 140000.0)
       (+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
       (- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
	double t_0 = x * (-1.0 / tan(B));
	double tmp;
	if (F <= -5.8e+16) {
		tmp = (-1.0 / sin(B)) + t_0;
	} else if (F <= 140000.0) {
		tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
	} else {
		tmp = (1.0 / sin(B)) - (x / tan(B));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x * ((-1.0d0) / tan(b))
    if (f <= (-5.8d+16)) then
        tmp = ((-1.0d0) / sin(b)) + t_0
    else if (f <= 140000.0d0) then
        tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
    else
        tmp = (1.0d0 / sin(b)) - (x / tan(b))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x * (-1.0 / Math.tan(B));
	double tmp;
	if (F <= -5.8e+16) {
		tmp = (-1.0 / Math.sin(B)) + t_0;
	} else if (F <= 140000.0) {
		tmp = t_0 + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
	} else {
		tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x * (-1.0 / math.tan(B))
	tmp = 0
	if F <= -5.8e+16:
		tmp = (-1.0 / math.sin(B)) + t_0
	elif F <= 140000.0:
		tmp = t_0 + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5))
	else:
		tmp = (1.0 / math.sin(B)) - (x / math.tan(B))
	return tmp
function code(F, B, x)
	t_0 = Float64(x * Float64(-1.0 / tan(B)))
	tmp = 0.0
	if (F <= -5.8e+16)
		tmp = Float64(Float64(-1.0 / sin(B)) + t_0);
	elseif (F <= 140000.0)
		tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)));
	else
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B)));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x * (-1.0 / tan(B));
	tmp = 0.0;
	if (F <= -5.8e+16)
		tmp = (-1.0 / sin(B)) + t_0;
	elseif (F <= 140000.0)
		tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5));
	else
		tmp = (1.0 / sin(B)) - (x / tan(B));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[F, 140000.0], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} + t_0\\

\mathbf{elif}\;F \leq 140000:\\
\;\;\;\;t_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -5.8e16

    1. Initial program 55.6%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Taylor expanded in F around -inf 99.7%

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

    if -5.8e16 < F < 1.4e5

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

    if 1.4e5 < F

    1. Initial program 56.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. Step-by-step derivation
      1. +-commutative56.4%

        \[\leadsto \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)} \]
      2. unsub-neg56.4%

        \[\leadsto \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}} \]
      3. associate-*l/78.7%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/78.6%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative78.6%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num78.7%

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

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

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

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr78.7%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-178.7%

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

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

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+78.7%

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. 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 -5.8 \cdot 10^{+16}:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 140000:\\ \;\;\;\;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} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 4: 99.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.4 \cdot 10^{+17}:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 140000:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -1.4e+17)
   (+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
   (if (<= F 140000.0)
     (+
      (/ -1.0 (/ (tan B) x))
      (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
     (- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.4e+17) {
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	} else if (F <= 140000.0) {
		tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
	} else {
		tmp = (1.0 / sin(B)) - (x / tan(B));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-1.4d+17)) then
        tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
    else if (f <= 140000.0d0) then
        tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
    else
        tmp = (1.0d0 / sin(b)) - (x / tan(b))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.4e+17) {
		tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
	} else if (F <= 140000.0) {
		tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
	} else {
		tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -1.4e+17:
		tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B)))
	elif F <= 140000.0:
		tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5))
	else:
		tmp = (1.0 / math.sin(B)) - (x / math.tan(B))
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -1.4e+17)
		tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
	elseif (F <= 140000.0)
		tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)));
	else
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B)));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -1.4e+17)
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	elseif (F <= 140000.0)
		tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5));
	else
		tmp = (1.0 / sin(B)) - (x / tan(B));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -1.4e+17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 140000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4 \cdot 10^{+17}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq 140000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -1.4e17

    1. Initial program 55.6%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Taylor expanded in F around -inf 99.7%

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

    if -1.4e17 < F < 1.4e5

    1. Initial program 99.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. Step-by-step derivation
      1. div-inv77.0%

        \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. clear-num76.9%

        \[\leadsto \left(-\color{blue}{\frac{1}{\frac{\tan B}{x}}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    3. Applied egg-rr99.5%

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

    if 1.4e5 < F

    1. Initial program 56.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. Step-by-step derivation
      1. +-commutative56.4%

        \[\leadsto \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)} \]
      2. unsub-neg56.4%

        \[\leadsto \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}} \]
      3. associate-*l/78.7%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/78.6%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative78.6%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num78.7%

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

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

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

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr78.7%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-178.7%

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

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

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+78.7%

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. 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 -1.4 \cdot 10^{+17}:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 140000:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 5: 99.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.45:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.42:\\ \;\;\;\;F \cdot \left(t_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;t_0 - t_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
   (if (<= F -1.45)
     (+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
     (if (<= F 1.42)
       (- (* F (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_1)
       (- t_0 t_1)))))
double code(double F, double B, double x) {
	double t_0 = 1.0 / sin(B);
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -1.45) {
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	} else if (F <= 1.42) {
		tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
	} else {
		tmp = t_0 - t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = 1.0d0 / sin(b)
    t_1 = x / tan(b)
    if (f <= (-1.45d0)) then
        tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
    else if (f <= 1.42d0) then
        tmp = (f * (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_1
    else
        tmp = t_0 - t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = 1.0 / Math.sin(B);
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -1.45) {
		tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
	} else if (F <= 1.42) {
		tmp = (F * (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
	} else {
		tmp = t_0 - t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = 1.0 / math.sin(B)
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -1.45:
		tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B)))
	elif F <= 1.42:
		tmp = (F * (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1
	else:
		tmp = t_0 - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(1.0 / sin(B))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -1.45)
		tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
	elseif (F <= 1.42)
		tmp = Float64(Float64(F * Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_1);
	else
		tmp = Float64(t_0 - t_1);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = 1.0 / sin(B);
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -1.45)
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	elseif (F <= 1.42)
		tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
	else
		tmp = t_0 - t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t$95$0 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \left(t_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t_1\\

\mathbf{else}:\\
\;\;\;\;t_0 - t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -1.44999999999999996

    1. Initial program 58.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. Taylor expanded in F around -inf 99.0%

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

    if -1.44999999999999996 < F < 1.4199999999999999

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.4%

        \[\leadsto \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)} \]
      2. unsub-neg99.4%

        \[\leadsto \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}} \]
      3. associate-*l/99.5%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.4%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.4%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\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 0 99.0%

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

    if 1.4199999999999999 < F

    1. Initial program 56.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. Step-by-step derivation
      1. +-commutative56.4%

        \[\leadsto \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)} \]
      2. unsub-neg56.4%

        \[\leadsto \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}} \]
      3. associate-*l/78.7%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/78.6%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative78.6%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num78.7%

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

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

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

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr78.7%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-178.7%

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

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

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+78.7%

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. 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.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.45:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.42:\\ \;\;\;\;F \cdot \left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 6: 99.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.4:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.42:\\ \;\;\;\;F \cdot \frac{1}{\sin B \cdot \sqrt{2}} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -1.4)
     (+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
     (if (<= F 1.42)
       (- (* F (/ 1.0 (* (sin B) (sqrt 2.0)))) t_0)
       (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -1.4) {
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	} else if (F <= 1.42) {
		tmp = (F * (1.0 / (sin(B) * sqrt(2.0)))) - t_0;
	} else {
		tmp = (1.0 / sin(B)) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-1.4d0)) then
        tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
    else if (f <= 1.42d0) then
        tmp = (f * (1.0d0 / (sin(b) * sqrt(2.0d0)))) - t_0
    else
        tmp = (1.0d0 / sin(b)) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -1.4) {
		tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
	} else if (F <= 1.42) {
		tmp = (F * (1.0 / (Math.sin(B) * Math.sqrt(2.0)))) - t_0;
	} else {
		tmp = (1.0 / Math.sin(B)) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -1.4:
		tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B)))
	elif F <= 1.42:
		tmp = (F * (1.0 / (math.sin(B) * math.sqrt(2.0)))) - t_0
	else:
		tmp = (1.0 / math.sin(B)) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -1.4)
		tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
	elseif (F <= 1.42)
		tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) * sqrt(2.0)))) - t_0);
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -1.4)
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	elseif (F <= 1.42)
		tmp = (F * (1.0 / (sin(B) * sqrt(2.0)))) - t_0;
	else
		tmp = (1.0 / sin(B)) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \frac{1}{\sin B \cdot \sqrt{2}} - t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -1.3999999999999999

    1. Initial program 58.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. Taylor expanded in F around -inf 99.0%

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

    if -1.3999999999999999 < F < 1.4199999999999999

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.4%

        \[\leadsto \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)} \]
      2. unsub-neg99.4%

        \[\leadsto \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}} \]
      3. associate-*l/99.5%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.4%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.4%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.6%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def99.6%

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

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

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.6%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow299.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative99.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.6%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative99.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow299.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def99.6%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around 0 99.0%

      \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{2 \cdot x + 2}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in x around 0 99.0%

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

    if 1.4199999999999999 < F

    1. Initial program 56.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. Step-by-step derivation
      1. +-commutative56.4%

        \[\leadsto \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)} \]
      2. unsub-neg56.4%

        \[\leadsto \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}} \]
      3. associate-*l/78.7%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/78.6%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative78.6%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num78.7%

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

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

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

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr78.7%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-178.7%

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

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

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+78.7%

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. 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.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.4:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.42:\\ \;\;\;\;F \cdot \frac{1}{\sin B \cdot \sqrt{2}} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 7: 99.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.4:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.42:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -1.4)
     (+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
     (if (<= F 1.42)
       (- (* F (/ (sqrt 0.5) (sin B))) t_0)
       (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -1.4) {
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	} else if (F <= 1.42) {
		tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
	} else {
		tmp = (1.0 / sin(B)) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-1.4d0)) then
        tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
    else if (f <= 1.42d0) then
        tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
    else
        tmp = (1.0d0 / sin(b)) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -1.4) {
		tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
	} else if (F <= 1.42) {
		tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
	} else {
		tmp = (1.0 / Math.sin(B)) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -1.4:
		tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B)))
	elif F <= 1.42:
		tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0
	else:
		tmp = (1.0 / math.sin(B)) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -1.4)
		tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
	elseif (F <= 1.42)
		tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0);
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -1.4)
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	elseif (F <= 1.42)
		tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
	else
		tmp = (1.0 / sin(B)) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -1.3999999999999999

    1. Initial program 58.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. Taylor expanded in F around -inf 99.0%

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

    if -1.3999999999999999 < F < 1.4199999999999999

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.4%

        \[\leadsto \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)} \]
      2. unsub-neg99.4%

        \[\leadsto \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}} \]
      3. associate-*l/99.5%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.4%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.4%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.6%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def99.6%

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

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

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.6%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow299.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative99.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.6%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative99.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow299.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def99.6%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around 0 99.0%

      \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{2 \cdot x + 2}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in x around 0 99.0%

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

    if 1.4199999999999999 < F

    1. Initial program 56.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. Step-by-step derivation
      1. +-commutative56.4%

        \[\leadsto \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)} \]
      2. unsub-neg56.4%

        \[\leadsto \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}} \]
      3. associate-*l/78.7%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/78.6%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative78.6%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num78.7%

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

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

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

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr78.7%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-178.7%

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

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

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+78.7%

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. 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.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.4:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.42:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 8: 89.1% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \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 -5.8 \cdot 10^{+16}:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq -1.25 \cdot 10^{-42}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq -6.4 \cdot 10^{-74}:\\ \;\;\;\;\frac{-1}{B} - t_1\\ \mathbf{elif}\;F \leq -2.9 \cdot 10^{-174}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \leq 6.6 \cdot 10^{-140}:\\ \;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\ \mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0
         (-
          (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
          (/ x B)))
        (t_1 (/ x (tan B))))
   (if (<= F -5.8e+16)
     (+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
     (if (<= F -1.25e-42)
       t_0
       (if (<= F -6.4e-74)
         (- (/ -1.0 B) t_1)
         (if (<= F -2.9e-174)
           t_0
           (if (<= F 6.6e-140)
             (/ (- (cos B)) (/ (sin B) x))
             (if (<= F 4.7e-20) t_0 (- (/ 1.0 (sin B)) t_1)))))))))
double code(double F, double B, double x) {
	double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -5.8e+16) {
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	} else if (F <= -1.25e-42) {
		tmp = t_0;
	} else if (F <= -6.4e-74) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -2.9e-174) {
		tmp = t_0;
	} else if (F <= 6.6e-140) {
		tmp = -cos(B) / (sin(B) / x);
	} else if (F <= 4.7e-20) {
		tmp = t_0;
	} else {
		tmp = (1.0 / sin(B)) - t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
    t_1 = x / tan(b)
    if (f <= (-5.8d+16)) then
        tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
    else if (f <= (-1.25d-42)) then
        tmp = t_0
    else if (f <= (-6.4d-74)) then
        tmp = ((-1.0d0) / b) - t_1
    else if (f <= (-2.9d-174)) then
        tmp = t_0
    else if (f <= 6.6d-140) then
        tmp = -cos(b) / (sin(b) / x)
    else if (f <= 4.7d-20) then
        tmp = t_0
    else
        tmp = (1.0d0 / sin(b)) - t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -5.8e+16) {
		tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
	} else if (F <= -1.25e-42) {
		tmp = t_0;
	} else if (F <= -6.4e-74) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -2.9e-174) {
		tmp = t_0;
	} else if (F <= 6.6e-140) {
		tmp = -Math.cos(B) / (Math.sin(B) / x);
	} else if (F <= 4.7e-20) {
		tmp = t_0;
	} else {
		tmp = (1.0 / Math.sin(B)) - t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B)
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -5.8e+16:
		tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B)))
	elif F <= -1.25e-42:
		tmp = t_0
	elif F <= -6.4e-74:
		tmp = (-1.0 / B) - t_1
	elif F <= -2.9e-174:
		tmp = t_0
	elif F <= 6.6e-140:
		tmp = -math.cos(B) / (math.sin(B) / x)
	elif F <= 4.7e-20:
		tmp = t_0
	else:
		tmp = (1.0 / math.sin(B)) - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -5.8e+16)
		tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
	elseif (F <= -1.25e-42)
		tmp = t_0;
	elseif (F <= -6.4e-74)
		tmp = Float64(Float64(-1.0 / B) - t_1);
	elseif (F <= -2.9e-174)
		tmp = t_0;
	elseif (F <= 6.6e-140)
		tmp = Float64(Float64(-cos(B)) / Float64(sin(B) / x));
	elseif (F <= 4.7e-20)
		tmp = t_0;
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_1);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B);
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -5.8e+16)
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	elseif (F <= -1.25e-42)
		tmp = t_0;
	elseif (F <= -6.4e-74)
		tmp = (-1.0 / B) - t_1;
	elseif (F <= -2.9e-174)
		tmp = t_0;
	elseif (F <= 6.6e-140)
		tmp = -cos(B) / (sin(B) / x);
	elseif (F <= 4.7e-20)
		tmp = t_0;
	else
		tmp = (1.0 / sin(B)) - t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.25e-42], t$95$0, If[LessEqual[F, -6.4e-74], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.9e-174], t$95$0, If[LessEqual[F, 6.6e-140], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.7e-20], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\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 -5.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq -1.25 \cdot 10^{-42}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;F \leq -6.4 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1}{B} - t_1\\

\mathbf{elif}\;F \leq -2.9 \cdot 10^{-174}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;F \leq 6.6 \cdot 10^{-140}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\

\mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if F < -5.8e16

    1. Initial program 55.6%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Taylor expanded in F around -inf 99.7%

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

    if -5.8e16 < F < -1.25000000000000001e-42 or -6.3999999999999997e-74 < F < -2.9000000000000001e-174 or 6.59999999999999975e-140 < F < 4.70000000000000015e-20

    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. Taylor expanded in B around 0 83.3%

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

    if -1.25000000000000001e-42 < F < -6.3999999999999997e-74

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.3%

        \[\leadsto \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)} \]
      2. unsub-neg99.3%

        \[\leadsto \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}} \]
      3. associate-*l/99.3%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.3%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.3%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{F \cdot \frac{{\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 86.6%

      \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 97.2%

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

    if -2.9000000000000001e-174 < F < 6.59999999999999975e-140

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.5%

        \[\leadsto \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)} \]
      2. unsub-neg99.5%

        \[\leadsto \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}} \]
      3. associate-*l/99.5%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.5%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.5%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr99.7%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.7%

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

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

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.7%

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around 0 99.8%

      \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{2 \cdot x + 2}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around 0 88.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{\cos B \cdot x}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-neg88.8%

        \[\leadsto \color{blue}{-\frac{\cos B \cdot x}{\sin B}} \]
      2. associate-/l*88.8%

        \[\leadsto -\color{blue}{\frac{\cos B}{\frac{\sin B}{x}}} \]
      3. distribute-neg-frac88.8%

        \[\leadsto \color{blue}{\frac{-\cos B}{\frac{\sin B}{x}}} \]
    11. Simplified88.8%

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

    if 4.70000000000000015e-20 < F

    1. Initial program 58.9%

      \[\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. Step-by-step derivation
      1. +-commutative58.9%

        \[\leadsto \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)} \]
      2. unsub-neg58.9%

        \[\leadsto \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}} \]
      3. associate-*l/79.9%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.8%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num80.0%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative80.0%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def80.0%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr80.0%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-180.0%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow280.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative80.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+80.0%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative80.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow280.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def80.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -5.8 \cdot 10^{+16}:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq -1.25 \cdot 10^{-42}:\\ \;\;\;\;\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 -6.4 \cdot 10^{-74}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.9 \cdot 10^{-174}:\\ \;\;\;\;\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 6.6 \cdot 10^{-140}:\\ \;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\ \mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 9: 91.0% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\ t_1 := x \cdot \frac{-1}{\tan B}\\ t_2 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\ t_3 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5.8 \cdot 10^{+16}:\\ \;\;\;\;\frac{-1}{\sin B} + t_1\\ \mathbf{elif}\;F \leq -7.5 \cdot 10^{-45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq -6.4 \cdot 10^{-74}:\\ \;\;\;\;\frac{-1}{B} - t_3\\ \mathbf{elif}\;F \leq -1.7 \cdot 10^{-174}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-141}:\\ \;\;\;\;t_1 + t_0 \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_3\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
        (t_1 (* x (/ -1.0 (tan B))))
        (t_2 (- (* (/ F (sin B)) t_0) (/ x B)))
        (t_3 (/ x (tan B))))
   (if (<= F -5.8e+16)
     (+ (/ -1.0 (sin B)) t_1)
     (if (<= F -7.5e-45)
       t_2
       (if (<= F -6.4e-74)
         (- (/ -1.0 B) t_3)
         (if (<= F -1.7e-174)
           t_2
           (if (<= F 1.2e-141)
             (+ t_1 (* t_0 (/ F B)))
             (if (<= F 4.7e-20) t_2 (- (/ 1.0 (sin B)) t_3)))))))))
double code(double F, double B, double x) {
	double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
	double t_1 = x * (-1.0 / tan(B));
	double t_2 = ((F / sin(B)) * t_0) - (x / B);
	double t_3 = x / tan(B);
	double tmp;
	if (F <= -5.8e+16) {
		tmp = (-1.0 / sin(B)) + t_1;
	} else if (F <= -7.5e-45) {
		tmp = t_2;
	} else if (F <= -6.4e-74) {
		tmp = (-1.0 / B) - t_3;
	} else if (F <= -1.7e-174) {
		tmp = t_2;
	} else if (F <= 1.2e-141) {
		tmp = t_1 + (t_0 * (F / B));
	} else if (F <= 4.7e-20) {
		tmp = t_2;
	} else {
		tmp = (1.0 / sin(B)) - t_3;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
    t_1 = x * ((-1.0d0) / tan(b))
    t_2 = ((f / sin(b)) * t_0) - (x / b)
    t_3 = x / tan(b)
    if (f <= (-5.8d+16)) then
        tmp = ((-1.0d0) / sin(b)) + t_1
    else if (f <= (-7.5d-45)) then
        tmp = t_2
    else if (f <= (-6.4d-74)) then
        tmp = ((-1.0d0) / b) - t_3
    else if (f <= (-1.7d-174)) then
        tmp = t_2
    else if (f <= 1.2d-141) then
        tmp = t_1 + (t_0 * (f / b))
    else if (f <= 4.7d-20) then
        tmp = t_2
    else
        tmp = (1.0d0 / sin(b)) - t_3
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
	double t_1 = x * (-1.0 / Math.tan(B));
	double t_2 = ((F / Math.sin(B)) * t_0) - (x / B);
	double t_3 = x / Math.tan(B);
	double tmp;
	if (F <= -5.8e+16) {
		tmp = (-1.0 / Math.sin(B)) + t_1;
	} else if (F <= -7.5e-45) {
		tmp = t_2;
	} else if (F <= -6.4e-74) {
		tmp = (-1.0 / B) - t_3;
	} else if (F <= -1.7e-174) {
		tmp = t_2;
	} else if (F <= 1.2e-141) {
		tmp = t_1 + (t_0 * (F / B));
	} else if (F <= 4.7e-20) {
		tmp = t_2;
	} else {
		tmp = (1.0 / Math.sin(B)) - t_3;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)
	t_1 = x * (-1.0 / math.tan(B))
	t_2 = ((F / math.sin(B)) * t_0) - (x / B)
	t_3 = x / math.tan(B)
	tmp = 0
	if F <= -5.8e+16:
		tmp = (-1.0 / math.sin(B)) + t_1
	elif F <= -7.5e-45:
		tmp = t_2
	elif F <= -6.4e-74:
		tmp = (-1.0 / B) - t_3
	elif F <= -1.7e-174:
		tmp = t_2
	elif F <= 1.2e-141:
		tmp = t_1 + (t_0 * (F / B))
	elif F <= 4.7e-20:
		tmp = t_2
	else:
		tmp = (1.0 / math.sin(B)) - t_3
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5
	t_1 = Float64(x * Float64(-1.0 / tan(B)))
	t_2 = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B))
	t_3 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -5.8e+16)
		tmp = Float64(Float64(-1.0 / sin(B)) + t_1);
	elseif (F <= -7.5e-45)
		tmp = t_2;
	elseif (F <= -6.4e-74)
		tmp = Float64(Float64(-1.0 / B) - t_3);
	elseif (F <= -1.7e-174)
		tmp = t_2;
	elseif (F <= 1.2e-141)
		tmp = Float64(t_1 + Float64(t_0 * Float64(F / B)));
	elseif (F <= 4.7e-20)
		tmp = t_2;
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_3);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5;
	t_1 = x * (-1.0 / tan(B));
	t_2 = ((F / sin(B)) * t_0) - (x / B);
	t_3 = x / tan(B);
	tmp = 0.0;
	if (F <= -5.8e+16)
		tmp = (-1.0 / sin(B)) + t_1;
	elseif (F <= -7.5e-45)
		tmp = t_2;
	elseif (F <= -6.4e-74)
		tmp = (-1.0 / B) - t_3;
	elseif (F <= -1.7e-174)
		tmp = t_2;
	elseif (F <= 1.2e-141)
		tmp = t_1 + (t_0 * (F / B));
	elseif (F <= 4.7e-20)
		tmp = t_2;
	else
		tmp = (1.0 / sin(B)) - t_3;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[F, -7.5e-45], t$95$2, If[LessEqual[F, -6.4e-74], N[(N[(-1.0 / B), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[F, -1.7e-174], t$95$2, If[LessEqual[F, 1.2e-141], N[(t$95$1 + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.7e-20], t$95$2, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
t_2 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
t_3 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} + t_1\\

\mathbf{elif}\;F \leq -7.5 \cdot 10^{-45}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;F \leq -6.4 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1}{B} - t_3\\

\mathbf{elif}\;F \leq -1.7 \cdot 10^{-174}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;F \leq 1.2 \cdot 10^{-141}:\\
\;\;\;\;t_1 + t_0 \cdot \frac{F}{B}\\

\mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if F < -5.8e16

    1. Initial program 55.6%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Taylor expanded in F around -inf 99.7%

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

    if -5.8e16 < F < -7.5000000000000006e-45 or -6.3999999999999997e-74 < F < -1.7000000000000001e-174 or 1.2e-141 < F < 4.70000000000000015e-20

    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. Taylor expanded in B around 0 83.3%

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

    if -7.5000000000000006e-45 < F < -6.3999999999999997e-74

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.3%

        \[\leadsto \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)} \]
      2. unsub-neg99.3%

        \[\leadsto \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}} \]
      3. associate-*l/99.3%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.3%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.3%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{F \cdot \frac{{\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 86.6%

      \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 97.2%

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

    if -1.7000000000000001e-174 < F < 1.2e-141

    1. Initial program 99.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. Taylor expanded in B around 0 93.3%

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

    if 4.70000000000000015e-20 < F

    1. Initial program 58.9%

      \[\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. Step-by-step derivation
      1. +-commutative58.9%

        \[\leadsto \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)} \]
      2. unsub-neg58.9%

        \[\leadsto \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}} \]
      3. associate-*l/79.9%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.8%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num80.0%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative80.0%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def80.0%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr80.0%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-180.0%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow280.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative80.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+80.0%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative80.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow280.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def80.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -5.8 \cdot 10^{+16}:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq -7.5 \cdot 10^{-45}:\\ \;\;\;\;\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 -6.4 \cdot 10^{-74}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.7 \cdot 10^{-174}:\\ \;\;\;\;\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.2 \cdot 10^{-141}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 10: 91.0% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\ t_1 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\ t_2 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5.8 \cdot 10^{+16}:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq -7.5 \cdot 10^{-45}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq -6.4 \cdot 10^{-74}:\\ \;\;\;\;\frac{-1}{B} - t_2\\ \mathbf{elif}\;F \leq -2.8 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 3 \cdot 10^{-137}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t_0 \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 3.3 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_2\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
        (t_1 (- (* (/ F (sin B)) t_0) (/ x B)))
        (t_2 (/ x (tan B))))
   (if (<= F -5.8e+16)
     (+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
     (if (<= F -7.5e-45)
       t_1
       (if (<= F -6.4e-74)
         (- (/ -1.0 B) t_2)
         (if (<= F -2.8e-174)
           t_1
           (if (<= F 3e-137)
             (+ (/ -1.0 (/ (tan B) x)) (* t_0 (/ F B)))
             (if (<= F 3.3e-20) t_1 (- (/ 1.0 (sin B)) t_2)))))))))
double code(double F, double B, double x) {
	double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
	double t_1 = ((F / sin(B)) * t_0) - (x / B);
	double t_2 = x / tan(B);
	double tmp;
	if (F <= -5.8e+16) {
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	} else if (F <= -7.5e-45) {
		tmp = t_1;
	} else if (F <= -6.4e-74) {
		tmp = (-1.0 / B) - t_2;
	} else if (F <= -2.8e-174) {
		tmp = t_1;
	} else if (F <= 3e-137) {
		tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
	} else if (F <= 3.3e-20) {
		tmp = t_1;
	} else {
		tmp = (1.0 / sin(B)) - t_2;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
    t_1 = ((f / sin(b)) * t_0) - (x / b)
    t_2 = x / tan(b)
    if (f <= (-5.8d+16)) then
        tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
    else if (f <= (-7.5d-45)) then
        tmp = t_1
    else if (f <= (-6.4d-74)) then
        tmp = ((-1.0d0) / b) - t_2
    else if (f <= (-2.8d-174)) then
        tmp = t_1
    else if (f <= 3d-137) then
        tmp = ((-1.0d0) / (tan(b) / x)) + (t_0 * (f / b))
    else if (f <= 3.3d-20) then
        tmp = t_1
    else
        tmp = (1.0d0 / sin(b)) - t_2
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
	double t_1 = ((F / Math.sin(B)) * t_0) - (x / B);
	double t_2 = x / Math.tan(B);
	double tmp;
	if (F <= -5.8e+16) {
		tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
	} else if (F <= -7.5e-45) {
		tmp = t_1;
	} else if (F <= -6.4e-74) {
		tmp = (-1.0 / B) - t_2;
	} else if (F <= -2.8e-174) {
		tmp = t_1;
	} else if (F <= 3e-137) {
		tmp = (-1.0 / (Math.tan(B) / x)) + (t_0 * (F / B));
	} else if (F <= 3.3e-20) {
		tmp = t_1;
	} else {
		tmp = (1.0 / Math.sin(B)) - t_2;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)
	t_1 = ((F / math.sin(B)) * t_0) - (x / B)
	t_2 = x / math.tan(B)
	tmp = 0
	if F <= -5.8e+16:
		tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B)))
	elif F <= -7.5e-45:
		tmp = t_1
	elif F <= -6.4e-74:
		tmp = (-1.0 / B) - t_2
	elif F <= -2.8e-174:
		tmp = t_1
	elif F <= 3e-137:
		tmp = (-1.0 / (math.tan(B) / x)) + (t_0 * (F / B))
	elif F <= 3.3e-20:
		tmp = t_1
	else:
		tmp = (1.0 / math.sin(B)) - t_2
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5
	t_1 = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B))
	t_2 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -5.8e+16)
		tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
	elseif (F <= -7.5e-45)
		tmp = t_1;
	elseif (F <= -6.4e-74)
		tmp = Float64(Float64(-1.0 / B) - t_2);
	elseif (F <= -2.8e-174)
		tmp = t_1;
	elseif (F <= 3e-137)
		tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(t_0 * Float64(F / B)));
	elseif (F <= 3.3e-20)
		tmp = t_1;
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_2);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5;
	t_1 = ((F / sin(B)) * t_0) - (x / B);
	t_2 = x / tan(B);
	tmp = 0.0;
	if (F <= -5.8e+16)
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	elseif (F <= -7.5e-45)
		tmp = t_1;
	elseif (F <= -6.4e-74)
		tmp = (-1.0 / B) - t_2;
	elseif (F <= -2.8e-174)
		tmp = t_1;
	elseif (F <= 3e-137)
		tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
	elseif (F <= 3.3e-20)
		tmp = t_1;
	else
		tmp = (1.0 / sin(B)) - t_2;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.5e-45], t$95$1, If[LessEqual[F, -6.4e-74], N[(N[(-1.0 / B), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -2.8e-174], t$95$1, If[LessEqual[F, 3e-137], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.3e-20], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq -7.5 \cdot 10^{-45}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;F \leq -6.4 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1}{B} - t_2\\

\mathbf{elif}\;F \leq -2.8 \cdot 10^{-174}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;F \leq 3 \cdot 10^{-137}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t_0 \cdot \frac{F}{B}\\

\mathbf{elif}\;F \leq 3.3 \cdot 10^{-20}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if F < -5.8e16

    1. Initial program 55.6%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Taylor expanded in F around -inf 99.7%

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

    if -5.8e16 < F < -7.5000000000000006e-45 or -6.3999999999999997e-74 < F < -2.79999999999999999e-174 or 2.9999999999999998e-137 < F < 3.3e-20

    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. Taylor expanded in B around 0 83.3%

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

    if -7.5000000000000006e-45 < F < -6.3999999999999997e-74

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.3%

        \[\leadsto \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)} \]
      2. unsub-neg99.3%

        \[\leadsto \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}} \]
      3. associate-*l/99.3%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.3%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.3%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{F \cdot \frac{{\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 86.6%

      \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 97.2%

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

    if -2.79999999999999999e-174 < F < 2.9999999999999998e-137

    1. Initial program 99.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. Taylor expanded in B around 0 93.3%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    3. Step-by-step derivation
      1. div-inv93.5%

        \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. clear-num93.3%

        \[\leadsto \left(-\color{blue}{\frac{1}{\frac{\tan B}{x}}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Applied egg-rr93.3%

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

    if 3.3e-20 < F

    1. Initial program 58.9%

      \[\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. Step-by-step derivation
      1. +-commutative58.9%

        \[\leadsto \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)} \]
      2. unsub-neg58.9%

        \[\leadsto \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}} \]
      3. associate-*l/79.9%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.8%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num80.0%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative80.0%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def80.0%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr80.0%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-180.0%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow280.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative80.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+80.0%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative80.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow280.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def80.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -5.8 \cdot 10^{+16}:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq -7.5 \cdot 10^{-45}:\\ \;\;\;\;\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 -6.4 \cdot 10^{-74}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.8 \cdot 10^{-174}:\\ \;\;\;\;\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 3 \cdot 10^{-137}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 3.3 \cdot 10^{-20}:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 11: 91.2% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\ t_1 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\ t_2 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -850000:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq -7.5 \cdot 10^{-45}:\\ \;\;\;\;t_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -6.4 \cdot 10^{-74}:\\ \;\;\;\;\frac{-1}{B} - t_2\\ \mathbf{elif}\;F \leq -2.9 \cdot 10^{-174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \leq 1.7 \cdot 10^{-138}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t_0 \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_2\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
        (t_1 (- (* (/ F (sin B)) t_0) (/ x B)))
        (t_2 (/ x (tan B))))
   (if (<= F -850000.0)
     (+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
     (if (<= F -7.5e-45)
       (- (* t_0 (/ 1.0 (/ (sin B) F))) (/ x B))
       (if (<= F -6.4e-74)
         (- (/ -1.0 B) t_2)
         (if (<= F -2.9e-174)
           t_1
           (if (<= F 1.7e-138)
             (+ (/ -1.0 (/ (tan B) x)) (* t_0 (/ F B)))
             (if (<= F 4.7e-20) t_1 (- (/ 1.0 (sin B)) t_2)))))))))
double code(double F, double B, double x) {
	double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
	double t_1 = ((F / sin(B)) * t_0) - (x / B);
	double t_2 = x / tan(B);
	double tmp;
	if (F <= -850000.0) {
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	} else if (F <= -7.5e-45) {
		tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B);
	} else if (F <= -6.4e-74) {
		tmp = (-1.0 / B) - t_2;
	} else if (F <= -2.9e-174) {
		tmp = t_1;
	} else if (F <= 1.7e-138) {
		tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
	} else if (F <= 4.7e-20) {
		tmp = t_1;
	} else {
		tmp = (1.0 / sin(B)) - t_2;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
    t_1 = ((f / sin(b)) * t_0) - (x / b)
    t_2 = x / tan(b)
    if (f <= (-850000.0d0)) then
        tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
    else if (f <= (-7.5d-45)) then
        tmp = (t_0 * (1.0d0 / (sin(b) / f))) - (x / b)
    else if (f <= (-6.4d-74)) then
        tmp = ((-1.0d0) / b) - t_2
    else if (f <= (-2.9d-174)) then
        tmp = t_1
    else if (f <= 1.7d-138) then
        tmp = ((-1.0d0) / (tan(b) / x)) + (t_0 * (f / b))
    else if (f <= 4.7d-20) then
        tmp = t_1
    else
        tmp = (1.0d0 / sin(b)) - t_2
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
	double t_1 = ((F / Math.sin(B)) * t_0) - (x / B);
	double t_2 = x / Math.tan(B);
	double tmp;
	if (F <= -850000.0) {
		tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
	} else if (F <= -7.5e-45) {
		tmp = (t_0 * (1.0 / (Math.sin(B) / F))) - (x / B);
	} else if (F <= -6.4e-74) {
		tmp = (-1.0 / B) - t_2;
	} else if (F <= -2.9e-174) {
		tmp = t_1;
	} else if (F <= 1.7e-138) {
		tmp = (-1.0 / (Math.tan(B) / x)) + (t_0 * (F / B));
	} else if (F <= 4.7e-20) {
		tmp = t_1;
	} else {
		tmp = (1.0 / Math.sin(B)) - t_2;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)
	t_1 = ((F / math.sin(B)) * t_0) - (x / B)
	t_2 = x / math.tan(B)
	tmp = 0
	if F <= -850000.0:
		tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B)))
	elif F <= -7.5e-45:
		tmp = (t_0 * (1.0 / (math.sin(B) / F))) - (x / B)
	elif F <= -6.4e-74:
		tmp = (-1.0 / B) - t_2
	elif F <= -2.9e-174:
		tmp = t_1
	elif F <= 1.7e-138:
		tmp = (-1.0 / (math.tan(B) / x)) + (t_0 * (F / B))
	elif F <= 4.7e-20:
		tmp = t_1
	else:
		tmp = (1.0 / math.sin(B)) - t_2
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5
	t_1 = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B))
	t_2 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -850000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
	elseif (F <= -7.5e-45)
		tmp = Float64(Float64(t_0 * Float64(1.0 / Float64(sin(B) / F))) - Float64(x / B));
	elseif (F <= -6.4e-74)
		tmp = Float64(Float64(-1.0 / B) - t_2);
	elseif (F <= -2.9e-174)
		tmp = t_1;
	elseif (F <= 1.7e-138)
		tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(t_0 * Float64(F / B)));
	elseif (F <= 4.7e-20)
		tmp = t_1;
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_2);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5;
	t_1 = ((F / sin(B)) * t_0) - (x / B);
	t_2 = x / tan(B);
	tmp = 0.0;
	if (F <= -850000.0)
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	elseif (F <= -7.5e-45)
		tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B);
	elseif (F <= -6.4e-74)
		tmp = (-1.0 / B) - t_2;
	elseif (F <= -2.9e-174)
		tmp = t_1;
	elseif (F <= 1.7e-138)
		tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
	elseif (F <= 4.7e-20)
		tmp = t_1;
	else
		tmp = (1.0 / sin(B)) - t_2;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -850000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.5e-45], N[(N[(t$95$0 * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.4e-74], N[(N[(-1.0 / B), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -2.9e-174], t$95$1, If[LessEqual[F, 1.7e-138], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.7e-20], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -850000:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq -7.5 \cdot 10^{-45}:\\
\;\;\;\;t_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\

\mathbf{elif}\;F \leq -6.4 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1}{B} - t_2\\

\mathbf{elif}\;F \leq -2.9 \cdot 10^{-174}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;F \leq 1.7 \cdot 10^{-138}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t_0 \cdot \frac{F}{B}\\

\mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if F < -8.5e5

    1. Initial program 56.9%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Taylor expanded in F around -inf 99.7%

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

    if -8.5e5 < F < -7.5000000000000006e-45

    1. Initial program 99.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. Step-by-step derivation
      1. clear-num99.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. inv-pow99.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{{\left(\frac{\sin B}{F}\right)}^{-1}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    3. Applied egg-rr99.3%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{{\left(\frac{\sin B}{F}\right)}^{-1}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Step-by-step derivation
      1. unpow-199.3%

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    5. Simplified99.3%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    6. Taylor expanded in B around 0 90.0%

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

    if -7.5000000000000006e-45 < F < -6.3999999999999997e-74

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.3%

        \[\leadsto \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)} \]
      2. unsub-neg99.3%

        \[\leadsto \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}} \]
      3. associate-*l/99.3%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.3%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.3%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{F \cdot \frac{{\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 86.6%

      \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 97.2%

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

    if -6.3999999999999997e-74 < F < -2.9000000000000001e-174 or 1.7000000000000001e-138 < F < 4.70000000000000015e-20

    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. Taylor expanded in B around 0 80.5%

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

    if -2.9000000000000001e-174 < F < 1.7000000000000001e-138

    1. Initial program 99.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. Taylor expanded in B around 0 93.3%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    3. Step-by-step derivation
      1. div-inv93.5%

        \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. clear-num93.3%

        \[\leadsto \left(-\color{blue}{\frac{1}{\frac{\tan B}{x}}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Applied egg-rr93.3%

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

    if 4.70000000000000015e-20 < F

    1. Initial program 58.9%

      \[\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. Step-by-step derivation
      1. +-commutative58.9%

        \[\leadsto \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)} \]
      2. unsub-neg58.9%

        \[\leadsto \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}} \]
      3. associate-*l/79.9%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.8%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num80.0%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative80.0%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def80.0%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr80.0%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-180.0%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow280.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative80.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+80.0%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative80.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow280.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def80.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -850000:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq -7.5 \cdot 10^{-45}:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -6.4 \cdot 10^{-74}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.9 \cdot 10^{-174}:\\ \;\;\;\;\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.7 \cdot 10^{-138}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 12: 85.0% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -6.2 \cdot 10^{-39}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 3.6 \cdot 10^{-133}:\\ \;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 2.66 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -6.2e-39)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 3.6e-133)
       (/ (- (* x (cos B))) (sin B))
       (if (<= F 2.66e-20)
         (/ (* F (sqrt 0.5)) (sin B))
         (- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -6.2e-39) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 3.6e-133) {
		tmp = -(x * cos(B)) / sin(B);
	} else if (F <= 2.66e-20) {
		tmp = (F * sqrt(0.5)) / sin(B);
	} else {
		tmp = (1.0 / sin(B)) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-6.2d-39)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 3.6d-133) then
        tmp = -(x * cos(b)) / sin(b)
    else if (f <= 2.66d-20) then
        tmp = (f * sqrt(0.5d0)) / sin(b)
    else
        tmp = (1.0d0 / sin(b)) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -6.2e-39) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 3.6e-133) {
		tmp = -(x * Math.cos(B)) / Math.sin(B);
	} else if (F <= 2.66e-20) {
		tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
	} else {
		tmp = (1.0 / Math.sin(B)) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -6.2e-39:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 3.6e-133:
		tmp = -(x * math.cos(B)) / math.sin(B)
	elif F <= 2.66e-20:
		tmp = (F * math.sqrt(0.5)) / math.sin(B)
	else:
		tmp = (1.0 / math.sin(B)) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -6.2e-39)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 3.6e-133)
		tmp = Float64(Float64(-Float64(x * cos(B))) / sin(B));
	elseif (F <= 2.66e-20)
		tmp = Float64(Float64(F * sqrt(0.5)) / sin(B));
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -6.2e-39)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 3.6e-133)
		tmp = -(x * cos(B)) / sin(B);
	elseif (F <= 2.66e-20)
		tmp = (F * sqrt(0.5)) / sin(B);
	else
		tmp = (1.0 / sin(B)) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.2e-39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.6e-133], N[((-N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.66e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.2 \cdot 10^{-39}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{elif}\;F \leq 3.6 \cdot 10^{-133}:\\
\;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\

\mathbf{elif}\;F \leq 2.66 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -6.1999999999999994e-39

    1. Initial program 61.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. Step-by-step derivation
      1. +-commutative61.2%

        \[\leadsto \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)} \]
      2. unsub-neg61.2%

        \[\leadsto \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}} \]
      3. associate-*l/67.6%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/67.6%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative67.6%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified67.6%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num67.6%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative67.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def67.6%

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

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

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-167.6%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow267.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative67.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+67.6%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative67.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow267.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def67.6%

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

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

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

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

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

    if -6.1999999999999994e-39 < F < 3.6000000000000004e-133

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.5%

        \[\leadsto \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)} \]
      2. fma-def99.5%

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      4. *-commutative99.5%

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      6. fma-def99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      7. metadata-eval99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      8. metadata-eval99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      9. distribute-lft-neg-in99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}}\right) \]
      10. associate-*r/99.7%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.7%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Taylor expanded in F around 0 80.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{\cos B \cdot x}{\sin B}} \]
    5. Step-by-step derivation
      1. associate-*r/80.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(\cos B \cdot x\right)}{\sin B}} \]
      2. *-commutative80.7%

        \[\leadsto \frac{-1 \cdot \color{blue}{\left(x \cdot \cos B\right)}}{\sin B} \]
      3. associate-*r*80.7%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot x\right) \cdot \cos B}}{\sin B} \]
      4. mul-1-neg80.7%

        \[\leadsto \frac{\color{blue}{\left(-x\right)} \cdot \cos B}{\sin B} \]
    6. Simplified80.7%

      \[\leadsto \color{blue}{\frac{\left(-x\right) \cdot \cos B}{\sin B}} \]

    if 3.6000000000000004e-133 < F < 2.66000000000000013e-20

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.1%

        \[\leadsto \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)} \]
      2. unsub-neg99.1%

        \[\leadsto \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}} \]
      3. associate-*l/99.4%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.3%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.3%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.5%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def99.5%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr99.5%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.5%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow299.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative99.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow299.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def99.5%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around 0 99.4%

      \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{2 \cdot x + 2}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in x around 0 65.0%

      \[\leadsto \color{blue}{\frac{\sqrt{0.5} \cdot F}{\sin B}} \]

    if 2.66000000000000013e-20 < F

    1. Initial program 58.9%

      \[\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. Step-by-step derivation
      1. +-commutative58.9%

        \[\leadsto \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)} \]
      2. unsub-neg58.9%

        \[\leadsto \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}} \]
      3. associate-*l/79.9%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.8%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num80.0%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative80.0%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def80.0%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr80.0%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-180.0%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow280.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative80.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+80.0%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative80.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow280.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def80.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.2 \cdot 10^{-39}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.6 \cdot 10^{-133}:\\ \;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 2.66 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 13: 85.0% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.9 \cdot 10^{-37}:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{-134}:\\ \;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -1.9e-37)
   (+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
   (if (<= F 3.7e-134)
     (/ (- (* x (cos B))) (sin B))
     (if (<= F 4.7e-20)
       (/ (* F (sqrt 0.5)) (sin B))
       (- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.9e-37) {
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	} else if (F <= 3.7e-134) {
		tmp = -(x * cos(B)) / sin(B);
	} else if (F <= 4.7e-20) {
		tmp = (F * sqrt(0.5)) / sin(B);
	} else {
		tmp = (1.0 / sin(B)) - (x / tan(B));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-1.9d-37)) then
        tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
    else if (f <= 3.7d-134) then
        tmp = -(x * cos(b)) / sin(b)
    else if (f <= 4.7d-20) then
        tmp = (f * sqrt(0.5d0)) / sin(b)
    else
        tmp = (1.0d0 / sin(b)) - (x / tan(b))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.9e-37) {
		tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
	} else if (F <= 3.7e-134) {
		tmp = -(x * Math.cos(B)) / Math.sin(B);
	} else if (F <= 4.7e-20) {
		tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
	} else {
		tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -1.9e-37:
		tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B)))
	elif F <= 3.7e-134:
		tmp = -(x * math.cos(B)) / math.sin(B)
	elif F <= 4.7e-20:
		tmp = (F * math.sqrt(0.5)) / math.sin(B)
	else:
		tmp = (1.0 / math.sin(B)) - (x / math.tan(B))
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -1.9e-37)
		tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B))));
	elseif (F <= 3.7e-134)
		tmp = Float64(Float64(-Float64(x * cos(B))) / sin(B));
	elseif (F <= 4.7e-20)
		tmp = Float64(Float64(F * sqrt(0.5)) / sin(B));
	else
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B)));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -1.9e-37)
		tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
	elseif (F <= 3.7e-134)
		tmp = -(x * cos(B)) / sin(B);
	elseif (F <= 4.7e-20)
		tmp = (F * sqrt(0.5)) / sin(B);
	else
		tmp = (1.0 / sin(B)) - (x / tan(B));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -1.9e-37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.7e-134], N[((-N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.7e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.9 \cdot 10^{-37}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq 3.7 \cdot 10^{-134}:\\
\;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\

\mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -1.9000000000000002e-37

    1. Initial program 61.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. Taylor expanded in F around -inf 94.5%

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

    if -1.9000000000000002e-37 < F < 3.7e-134

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.5%

        \[\leadsto \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)} \]
      2. fma-def99.5%

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      4. *-commutative99.5%

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      6. fma-def99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      7. metadata-eval99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      8. metadata-eval99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      9. distribute-lft-neg-in99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}}\right) \]
      10. associate-*r/99.7%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.7%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Taylor expanded in F around 0 80.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{\cos B \cdot x}{\sin B}} \]
    5. Step-by-step derivation
      1. associate-*r/80.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(\cos B \cdot x\right)}{\sin B}} \]
      2. *-commutative80.7%

        \[\leadsto \frac{-1 \cdot \color{blue}{\left(x \cdot \cos B\right)}}{\sin B} \]
      3. associate-*r*80.7%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot x\right) \cdot \cos B}}{\sin B} \]
      4. mul-1-neg80.7%

        \[\leadsto \frac{\color{blue}{\left(-x\right)} \cdot \cos B}{\sin B} \]
    6. Simplified80.7%

      \[\leadsto \color{blue}{\frac{\left(-x\right) \cdot \cos B}{\sin B}} \]

    if 3.7e-134 < F < 4.70000000000000015e-20

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.1%

        \[\leadsto \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)} \]
      2. unsub-neg99.1%

        \[\leadsto \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}} \]
      3. associate-*l/99.4%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.3%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.3%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.5%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def99.5%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr99.5%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.5%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow299.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative99.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow299.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def99.5%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around 0 99.4%

      \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{2 \cdot x + 2}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in x around 0 65.0%

      \[\leadsto \color{blue}{\frac{\sqrt{0.5} \cdot F}{\sin B}} \]

    if 4.70000000000000015e-20 < F

    1. Initial program 58.9%

      \[\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. Step-by-step derivation
      1. +-commutative58.9%

        \[\leadsto \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)} \]
      2. unsub-neg58.9%

        \[\leadsto \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}} \]
      3. associate-*l/79.9%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.8%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num80.0%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative80.0%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def80.0%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr80.0%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-180.0%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow280.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative80.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+80.0%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative80.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow280.0%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def80.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.9 \cdot 10^{-37}:\\ \;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{-134}:\\ \;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 14: 62.1% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5.6 \cdot 10^{-273}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-147}:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(x \cdot B\right)\right)\\ \mathbf{elif}\;F \leq 4.4 \cdot 10^{-20}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -5.6e-273)
     (- (/ -1.0 B) t_0)
     (if (<= F 4e-147)
       (-
        (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
        (+ (/ x B) (* -0.3333333333333333 (* x B))))
       (if (<= F 4.4e-20) (/ (sqrt 0.5) (/ (sin B) F)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -5.6e-273) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 4e-147) {
		tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B)));
	} else if (F <= 4.4e-20) {
		tmp = sqrt(0.5) / (sin(B) / F);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-5.6d-273)) then
        tmp = ((-1.0d0) / b) - t_0
    else if (f <= 4d-147) then
        tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - ((x / b) + ((-0.3333333333333333d0) * (x * b)))
    else if (f <= 4.4d-20) then
        tmp = sqrt(0.5d0) / (sin(b) / f)
    else
        tmp = (1.0d0 / b) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -5.6e-273) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 4e-147) {
		tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B)));
	} else if (F <= 4.4e-20) {
		tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -5.6e-273:
		tmp = (-1.0 / B) - t_0
	elif F <= 4e-147:
		tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B)))
	elif F <= 4.4e-20:
		tmp = math.sqrt(0.5) / (math.sin(B) / F)
	else:
		tmp = (1.0 / B) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -5.6e-273)
		tmp = Float64(Float64(-1.0 / B) - t_0);
	elseif (F <= 4e-147)
		tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(x * B))));
	elseif (F <= 4.4e-20)
		tmp = Float64(sqrt(0.5) / Float64(sin(B) / F));
	else
		tmp = Float64(Float64(1.0 / B) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -5.6e-273)
		tmp = (-1.0 / B) - t_0;
	elseif (F <= 4e-147)
		tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B)));
	elseif (F <= 4.4e-20)
		tmp = sqrt(0.5) / (sin(B) / F);
	else
		tmp = (1.0 / B) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.6e-273], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4e-147], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.4e-20], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.6 \cdot 10^{-273}:\\
\;\;\;\;\frac{-1}{B} - t_0\\

\mathbf{elif}\;F \leq 4 \cdot 10^{-147}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(x \cdot B\right)\right)\\

\mathbf{elif}\;F \leq 4.4 \cdot 10^{-20}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -5.59999999999999971e-273

    1. Initial program 75.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. Step-by-step derivation
      1. +-commutative75.0%

        \[\leadsto \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)} \]
      2. unsub-neg75.0%

        \[\leadsto \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}} \]
      3. associate-*l/79.2%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.1%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.1%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified79.2%

      \[\leadsto \color{blue}{F \cdot \frac{{\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 74.4%

      \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 61.3%

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

    if -5.59999999999999971e-273 < F < 3.9999999999999999e-147

    1. Initial program 99.6%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Taylor expanded in B around 0 99.6%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    3. Taylor expanded in B around 0 67.2%

      \[\leadsto \left(-\color{blue}{\left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Step-by-step derivation
      1. *-commutative67.2%

        \[\leadsto \left(-\left(\frac{x}{B} + -0.3333333333333333 \cdot \color{blue}{\left(x \cdot B\right)}\right)\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    5. Simplified67.2%

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

    if 3.9999999999999999e-147 < F < 4.39999999999999982e-20

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.1%

        \[\leadsto \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)} \]
      2. unsub-neg99.1%

        \[\leadsto \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}} \]
      3. associate-*l/99.4%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.4%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.4%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.5%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def99.5%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr99.5%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.5%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow299.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative99.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow299.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def99.5%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around 0 99.4%

      \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{2 \cdot x + 2}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in x around 0 62.4%

      \[\leadsto \color{blue}{\frac{\sqrt{0.5} \cdot F}{\sin B}} \]
    10. Step-by-step derivation
      1. associate-/l*62.3%

        \[\leadsto \color{blue}{\frac{\sqrt{0.5}}{\frac{\sin B}{F}}} \]
    11. Simplified62.3%

      \[\leadsto \color{blue}{\frac{\sqrt{0.5}}{\frac{\sin B}{F}}} \]

    if 4.39999999999999982e-20 < F

    1. Initial program 58.9%

      \[\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. Step-by-step derivation
      1. +-commutative58.9%

        \[\leadsto \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)} \]
      2. unsub-neg58.9%

        \[\leadsto \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}} \]
      3. associate-*l/79.9%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.8%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\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 97.6%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 75.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -5.6 \cdot 10^{-273}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-147}:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(x \cdot B\right)\right)\\ \mathbf{elif}\;F \leq 4.4 \cdot 10^{-20}:\\ \;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 15: 62.1% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -6.3 \cdot 10^{-273}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{-144}:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(x \cdot B\right)\right)\\ \mathbf{elif}\;F \leq 2.32 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -6.3e-273)
     (- (/ -1.0 B) t_0)
     (if (<= F 9.5e-144)
       (-
        (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
        (+ (/ x B) (* -0.3333333333333333 (* x B))))
       (if (<= F 2.32e-20) (/ (* F (sqrt 0.5)) (sin B)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -6.3e-273) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 9.5e-144) {
		tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B)));
	} else if (F <= 2.32e-20) {
		tmp = (F * sqrt(0.5)) / sin(B);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-6.3d-273)) then
        tmp = ((-1.0d0) / b) - t_0
    else if (f <= 9.5d-144) then
        tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - ((x / b) + ((-0.3333333333333333d0) * (x * b)))
    else if (f <= 2.32d-20) then
        tmp = (f * sqrt(0.5d0)) / sin(b)
    else
        tmp = (1.0d0 / b) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -6.3e-273) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 9.5e-144) {
		tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B)));
	} else if (F <= 2.32e-20) {
		tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -6.3e-273:
		tmp = (-1.0 / B) - t_0
	elif F <= 9.5e-144:
		tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B)))
	elif F <= 2.32e-20:
		tmp = (F * math.sqrt(0.5)) / math.sin(B)
	else:
		tmp = (1.0 / B) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -6.3e-273)
		tmp = Float64(Float64(-1.0 / B) - t_0);
	elseif (F <= 9.5e-144)
		tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(x * B))));
	elseif (F <= 2.32e-20)
		tmp = Float64(Float64(F * sqrt(0.5)) / sin(B));
	else
		tmp = Float64(Float64(1.0 / B) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -6.3e-273)
		tmp = (-1.0 / B) - t_0;
	elseif (F <= 9.5e-144)
		tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B)));
	elseif (F <= 2.32e-20)
		tmp = (F * sqrt(0.5)) / sin(B);
	else
		tmp = (1.0 / B) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.3e-273], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 9.5e-144], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.32e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.3 \cdot 10^{-273}:\\
\;\;\;\;\frac{-1}{B} - t_0\\

\mathbf{elif}\;F \leq 9.5 \cdot 10^{-144}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(x \cdot B\right)\right)\\

\mathbf{elif}\;F \leq 2.32 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -6.29999999999999977e-273

    1. Initial program 75.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. Step-by-step derivation
      1. +-commutative75.0%

        \[\leadsto \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)} \]
      2. unsub-neg75.0%

        \[\leadsto \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}} \]
      3. associate-*l/79.2%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.1%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.1%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified79.2%

      \[\leadsto \color{blue}{F \cdot \frac{{\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 74.4%

      \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 61.3%

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

    if -6.29999999999999977e-273 < F < 9.49999999999999953e-144

    1. Initial program 99.6%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Taylor expanded in B around 0 99.6%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    3. Taylor expanded in B around 0 67.2%

      \[\leadsto \left(-\color{blue}{\left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Step-by-step derivation
      1. *-commutative67.2%

        \[\leadsto \left(-\left(\frac{x}{B} + -0.3333333333333333 \cdot \color{blue}{\left(x \cdot B\right)}\right)\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    5. Simplified67.2%

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

    if 9.49999999999999953e-144 < F < 2.32e-20

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.1%

        \[\leadsto \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)} \]
      2. unsub-neg99.1%

        \[\leadsto \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}} \]
      3. associate-*l/99.4%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.4%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.4%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.5%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def99.5%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr99.5%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.5%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow299.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative99.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow299.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def99.5%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around 0 99.4%

      \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{2 \cdot x + 2}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in x around 0 62.4%

      \[\leadsto \color{blue}{\frac{\sqrt{0.5} \cdot F}{\sin B}} \]

    if 2.32e-20 < F

    1. Initial program 58.9%

      \[\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. Step-by-step derivation
      1. +-commutative58.9%

        \[\leadsto \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)} \]
      2. unsub-neg58.9%

        \[\leadsto \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}} \]
      3. associate-*l/79.9%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.8%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\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 97.6%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 75.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.3 \cdot 10^{-273}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{-144}:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(x \cdot B\right)\right)\\ \mathbf{elif}\;F \leq 2.32 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 16: 70.9% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -4.2 \cdot 10^{-33}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq 8 \cdot 10^{-133}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 3.3 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -4.2e-33)
     (- (/ -1.0 B) t_0)
     (if (<= F 8e-133)
       (* (cos B) (/ (- x) (sin B)))
       (if (<= F 3.3e-20) (/ (* F (sqrt 0.5)) (sin B)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -4.2e-33) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 8e-133) {
		tmp = cos(B) * (-x / sin(B));
	} else if (F <= 3.3e-20) {
		tmp = (F * sqrt(0.5)) / sin(B);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-4.2d-33)) then
        tmp = ((-1.0d0) / b) - t_0
    else if (f <= 8d-133) then
        tmp = cos(b) * (-x / sin(b))
    else if (f <= 3.3d-20) then
        tmp = (f * sqrt(0.5d0)) / sin(b)
    else
        tmp = (1.0d0 / b) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -4.2e-33) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 8e-133) {
		tmp = Math.cos(B) * (-x / Math.sin(B));
	} else if (F <= 3.3e-20) {
		tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -4.2e-33:
		tmp = (-1.0 / B) - t_0
	elif F <= 8e-133:
		tmp = math.cos(B) * (-x / math.sin(B))
	elif F <= 3.3e-20:
		tmp = (F * math.sqrt(0.5)) / math.sin(B)
	else:
		tmp = (1.0 / B) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -4.2e-33)
		tmp = Float64(Float64(-1.0 / B) - t_0);
	elseif (F <= 8e-133)
		tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B)));
	elseif (F <= 3.3e-20)
		tmp = Float64(Float64(F * sqrt(0.5)) / sin(B));
	else
		tmp = Float64(Float64(1.0 / B) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -4.2e-33)
		tmp = (-1.0 / B) - t_0;
	elseif (F <= 8e-133)
		tmp = cos(B) * (-x / sin(B));
	elseif (F <= 3.3e-20)
		tmp = (F * sqrt(0.5)) / sin(B);
	else
		tmp = (1.0 / B) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.2e-33], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8e-133], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.3e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.2 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{B} - t_0\\

\mathbf{elif}\;F \leq 8 \cdot 10^{-133}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\

\mathbf{elif}\;F \leq 3.3 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -4.2e-33

    1. Initial program 60.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. Step-by-step derivation
      1. +-commutative60.7%

        \[\leadsto \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)} \]
      2. unsub-neg60.7%

        \[\leadsto \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}} \]
      3. associate-*l/67.2%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/67.2%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative67.2%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified67.2%

      \[\leadsto \color{blue}{F \cdot \frac{{\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 95.4%

      \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 62.4%

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

    if -4.2e-33 < F < 8.0000000000000005e-133

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.4%

        \[\leadsto \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)} \]
      2. fma-def99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
      3. +-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      4. *-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      5. fma-def99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      6. fma-def99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      7. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      8. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      9. distribute-lft-neg-in99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}}\right) \]
      10. associate-*r/99.7%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.7%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Taylor expanded in F around 0 79.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{\cos B \cdot x}{\sin B}} \]
    5. Step-by-step derivation
      1. mul-1-neg79.7%

        \[\leadsto \color{blue}{-\frac{\cos B \cdot x}{\sin B}} \]
      2. *-commutative79.7%

        \[\leadsto -\frac{\color{blue}{x \cdot \cos B}}{\sin B} \]
      3. associate-*l/79.6%

        \[\leadsto -\color{blue}{\frac{x}{\sin B} \cdot \cos B} \]
      4. *-commutative79.6%

        \[\leadsto -\color{blue}{\cos B \cdot \frac{x}{\sin B}} \]
    6. Simplified79.6%

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

    if 8.0000000000000005e-133 < F < 3.3e-20

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.1%

        \[\leadsto \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)} \]
      2. unsub-neg99.1%

        \[\leadsto \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}} \]
      3. associate-*l/99.4%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.3%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.3%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.5%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def99.5%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr99.5%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.5%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow299.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative99.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow299.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def99.5%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around 0 99.4%

      \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{2 \cdot x + 2}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in x around 0 65.0%

      \[\leadsto \color{blue}{\frac{\sqrt{0.5} \cdot F}{\sin B}} \]

    if 3.3e-20 < F

    1. Initial program 58.9%

      \[\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. Step-by-step derivation
      1. +-commutative58.9%

        \[\leadsto \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)} \]
      2. unsub-neg58.9%

        \[\leadsto \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}} \]
      3. associate-*l/79.9%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.8%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\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 97.6%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 75.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4.2 \cdot 10^{-33}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 8 \cdot 10^{-133}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 3.3 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 17: 70.8% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.7 \cdot 10^{-31}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq 8 \cdot 10^{-133}:\\ \;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\ \mathbf{elif}\;F \leq 1.12 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -2.7e-31)
     (- (/ -1.0 B) t_0)
     (if (<= F 8e-133)
       (/ (- (cos B)) (/ (sin B) x))
       (if (<= F 1.12e-20) (/ (* F (sqrt 0.5)) (sin B)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -2.7e-31) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 8e-133) {
		tmp = -cos(B) / (sin(B) / x);
	} else if (F <= 1.12e-20) {
		tmp = (F * sqrt(0.5)) / sin(B);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-2.7d-31)) then
        tmp = ((-1.0d0) / b) - t_0
    else if (f <= 8d-133) then
        tmp = -cos(b) / (sin(b) / x)
    else if (f <= 1.12d-20) then
        tmp = (f * sqrt(0.5d0)) / sin(b)
    else
        tmp = (1.0d0 / b) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -2.7e-31) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 8e-133) {
		tmp = -Math.cos(B) / (Math.sin(B) / x);
	} else if (F <= 1.12e-20) {
		tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -2.7e-31:
		tmp = (-1.0 / B) - t_0
	elif F <= 8e-133:
		tmp = -math.cos(B) / (math.sin(B) / x)
	elif F <= 1.12e-20:
		tmp = (F * math.sqrt(0.5)) / math.sin(B)
	else:
		tmp = (1.0 / B) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -2.7e-31)
		tmp = Float64(Float64(-1.0 / B) - t_0);
	elseif (F <= 8e-133)
		tmp = Float64(Float64(-cos(B)) / Float64(sin(B) / x));
	elseif (F <= 1.12e-20)
		tmp = Float64(Float64(F * sqrt(0.5)) / sin(B));
	else
		tmp = Float64(Float64(1.0 / B) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -2.7e-31)
		tmp = (-1.0 / B) - t_0;
	elseif (F <= 8e-133)
		tmp = -cos(B) / (sin(B) / x);
	elseif (F <= 1.12e-20)
		tmp = (F * sqrt(0.5)) / sin(B);
	else
		tmp = (1.0 / B) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.7e-31], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8e-133], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.12e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.7 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1}{B} - t_0\\

\mathbf{elif}\;F \leq 8 \cdot 10^{-133}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\

\mathbf{elif}\;F \leq 1.12 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -2.70000000000000014e-31

    1. Initial program 60.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. Step-by-step derivation
      1. +-commutative60.7%

        \[\leadsto \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)} \]
      2. unsub-neg60.7%

        \[\leadsto \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}} \]
      3. associate-*l/67.2%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/67.2%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative67.2%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified67.2%

      \[\leadsto \color{blue}{F \cdot \frac{{\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 95.4%

      \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 62.4%

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

    if -2.70000000000000014e-31 < F < 8.0000000000000005e-133

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.4%

        \[\leadsto \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)} \]
      2. unsub-neg99.4%

        \[\leadsto \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}} \]
      3. associate-*l/99.5%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.5%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.5%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.6%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def99.6%

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

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

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.6%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow299.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative99.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.6%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative99.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow299.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def99.6%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around 0 99.8%

      \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{2 \cdot x + 2}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around 0 79.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{\cos B \cdot x}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-neg79.7%

        \[\leadsto \color{blue}{-\frac{\cos B \cdot x}{\sin B}} \]
      2. associate-/l*79.6%

        \[\leadsto -\color{blue}{\frac{\cos B}{\frac{\sin B}{x}}} \]
      3. distribute-neg-frac79.6%

        \[\leadsto \color{blue}{\frac{-\cos B}{\frac{\sin B}{x}}} \]
    11. Simplified79.6%

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

    if 8.0000000000000005e-133 < F < 1.12000000000000002e-20

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.1%

        \[\leadsto \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)} \]
      2. unsub-neg99.1%

        \[\leadsto \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}} \]
      3. associate-*l/99.4%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.3%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.3%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.5%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def99.5%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr99.5%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.5%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow299.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative99.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow299.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def99.5%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around 0 99.4%

      \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{2 \cdot x + 2}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in x around 0 65.0%

      \[\leadsto \color{blue}{\frac{\sqrt{0.5} \cdot F}{\sin B}} \]

    if 1.12000000000000002e-20 < F

    1. Initial program 58.9%

      \[\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. Step-by-step derivation
      1. +-commutative58.9%

        \[\leadsto \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)} \]
      2. unsub-neg58.9%

        \[\leadsto \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}} \]
      3. associate-*l/79.9%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.8%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\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 97.6%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 75.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.7 \cdot 10^{-31}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 8 \cdot 10^{-133}:\\ \;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\ \mathbf{elif}\;F \leq 1.12 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 18: 70.8% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -6.8 \cdot 10^{-32}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq 1.15 \cdot 10^{-133}:\\ \;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 4.55 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -6.8e-32)
     (- (/ -1.0 B) t_0)
     (if (<= F 1.15e-133)
       (/ (- (* x (cos B))) (sin B))
       (if (<= F 4.55e-20) (/ (* F (sqrt 0.5)) (sin B)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -6.8e-32) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 1.15e-133) {
		tmp = -(x * cos(B)) / sin(B);
	} else if (F <= 4.55e-20) {
		tmp = (F * sqrt(0.5)) / sin(B);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-6.8d-32)) then
        tmp = ((-1.0d0) / b) - t_0
    else if (f <= 1.15d-133) then
        tmp = -(x * cos(b)) / sin(b)
    else if (f <= 4.55d-20) then
        tmp = (f * sqrt(0.5d0)) / sin(b)
    else
        tmp = (1.0d0 / b) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -6.8e-32) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 1.15e-133) {
		tmp = -(x * Math.cos(B)) / Math.sin(B);
	} else if (F <= 4.55e-20) {
		tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -6.8e-32:
		tmp = (-1.0 / B) - t_0
	elif F <= 1.15e-133:
		tmp = -(x * math.cos(B)) / math.sin(B)
	elif F <= 4.55e-20:
		tmp = (F * math.sqrt(0.5)) / math.sin(B)
	else:
		tmp = (1.0 / B) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -6.8e-32)
		tmp = Float64(Float64(-1.0 / B) - t_0);
	elseif (F <= 1.15e-133)
		tmp = Float64(Float64(-Float64(x * cos(B))) / sin(B));
	elseif (F <= 4.55e-20)
		tmp = Float64(Float64(F * sqrt(0.5)) / sin(B));
	else
		tmp = Float64(Float64(1.0 / B) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -6.8e-32)
		tmp = (-1.0 / B) - t_0;
	elseif (F <= 1.15e-133)
		tmp = -(x * cos(B)) / sin(B);
	elseif (F <= 4.55e-20)
		tmp = (F * sqrt(0.5)) / sin(B);
	else
		tmp = (1.0 / B) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.8e-32], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.15e-133], N[((-N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.55e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.8 \cdot 10^{-32}:\\
\;\;\;\;\frac{-1}{B} - t_0\\

\mathbf{elif}\;F \leq 1.15 \cdot 10^{-133}:\\
\;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\

\mathbf{elif}\;F \leq 4.55 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -6.79999999999999956e-32

    1. Initial program 60.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. Step-by-step derivation
      1. +-commutative60.7%

        \[\leadsto \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)} \]
      2. unsub-neg60.7%

        \[\leadsto \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}} \]
      3. associate-*l/67.2%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/67.2%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative67.2%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified67.2%

      \[\leadsto \color{blue}{F \cdot \frac{{\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 95.4%

      \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 62.4%

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

    if -6.79999999999999956e-32 < F < 1.15e-133

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.4%

        \[\leadsto \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)} \]
      2. fma-def99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
      3. +-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      4. *-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      5. fma-def99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      6. fma-def99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      7. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      8. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      9. distribute-lft-neg-in99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}}\right) \]
      10. associate-*r/99.7%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.7%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Taylor expanded in F around 0 79.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{\cos B \cdot x}{\sin B}} \]
    5. Step-by-step derivation
      1. associate-*r/79.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(\cos B \cdot x\right)}{\sin B}} \]
      2. *-commutative79.7%

        \[\leadsto \frac{-1 \cdot \color{blue}{\left(x \cdot \cos B\right)}}{\sin B} \]
      3. associate-*r*79.7%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot x\right) \cdot \cos B}}{\sin B} \]
      4. mul-1-neg79.7%

        \[\leadsto \frac{\color{blue}{\left(-x\right)} \cdot \cos B}{\sin B} \]
    6. Simplified79.7%

      \[\leadsto \color{blue}{\frac{\left(-x\right) \cdot \cos B}{\sin B}} \]

    if 1.15e-133 < F < 4.54999999999999998e-20

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.1%

        \[\leadsto \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)} \]
      2. unsub-neg99.1%

        \[\leadsto \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}} \]
      3. associate-*l/99.4%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.3%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.3%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.5%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def99.5%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr99.5%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.5%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow299.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative99.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow299.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def99.5%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around 0 99.4%

      \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{2 \cdot x + 2}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in x around 0 65.0%

      \[\leadsto \color{blue}{\frac{\sqrt{0.5} \cdot F}{\sin B}} \]

    if 4.54999999999999998e-20 < F

    1. Initial program 58.9%

      \[\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. Step-by-step derivation
      1. +-commutative58.9%

        \[\leadsto \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)} \]
      2. unsub-neg58.9%

        \[\leadsto \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}} \]
      3. associate-*l/79.9%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.8%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\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 97.6%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 75.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.8 \cdot 10^{-32}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.15 \cdot 10^{-133}:\\ \;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 4.55 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 19: 78.3% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.05 \cdot 10^{-38}:\\ \;\;\;\;\frac{-1}{\sin B} - t_0\\ \mathbf{elif}\;F \leq 8 \cdot 10^{-133}:\\ \;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 3 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -2.05e-38)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 8e-133)
       (/ (- (* x (cos B))) (sin B))
       (if (<= F 3e-20) (/ (* F (sqrt 0.5)) (sin B)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -2.05e-38) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 8e-133) {
		tmp = -(x * cos(B)) / sin(B);
	} else if (F <= 3e-20) {
		tmp = (F * sqrt(0.5)) / sin(B);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-2.05d-38)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 8d-133) then
        tmp = -(x * cos(b)) / sin(b)
    else if (f <= 3d-20) then
        tmp = (f * sqrt(0.5d0)) / sin(b)
    else
        tmp = (1.0d0 / b) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -2.05e-38) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 8e-133) {
		tmp = -(x * Math.cos(B)) / Math.sin(B);
	} else if (F <= 3e-20) {
		tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -2.05e-38:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 8e-133:
		tmp = -(x * math.cos(B)) / math.sin(B)
	elif F <= 3e-20:
		tmp = (F * math.sqrt(0.5)) / math.sin(B)
	else:
		tmp = (1.0 / B) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -2.05e-38)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 8e-133)
		tmp = Float64(Float64(-Float64(x * cos(B))) / sin(B));
	elseif (F <= 3e-20)
		tmp = Float64(Float64(F * sqrt(0.5)) / sin(B));
	else
		tmp = Float64(Float64(1.0 / B) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -2.05e-38)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 8e-133)
		tmp = -(x * cos(B)) / sin(B);
	elseif (F <= 3e-20)
		tmp = (F * sqrt(0.5)) / sin(B);
	else
		tmp = (1.0 / B) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.05e-38], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8e-133], N[((-N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.05 \cdot 10^{-38}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\

\mathbf{elif}\;F \leq 8 \cdot 10^{-133}:\\
\;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\

\mathbf{elif}\;F \leq 3 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -2.0499999999999999e-38

    1. Initial program 61.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. Step-by-step derivation
      1. +-commutative61.2%

        \[\leadsto \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)} \]
      2. unsub-neg61.2%

        \[\leadsto \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}} \]
      3. associate-*l/67.6%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/67.6%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative67.6%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified67.6%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num67.6%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative67.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def67.6%

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

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

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-167.6%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow267.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative67.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+67.6%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative67.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow267.6%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def67.6%

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

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

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

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

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

    if -2.0499999999999999e-38 < F < 8.0000000000000005e-133

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.5%

        \[\leadsto \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)} \]
      2. fma-def99.5%

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      4. *-commutative99.5%

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      6. fma-def99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      7. metadata-eval99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      8. metadata-eval99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      9. distribute-lft-neg-in99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}}\right) \]
      10. associate-*r/99.7%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.7%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Taylor expanded in F around 0 80.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{\cos B \cdot x}{\sin B}} \]
    5. Step-by-step derivation
      1. associate-*r/80.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(\cos B \cdot x\right)}{\sin B}} \]
      2. *-commutative80.7%

        \[\leadsto \frac{-1 \cdot \color{blue}{\left(x \cdot \cos B\right)}}{\sin B} \]
      3. associate-*r*80.7%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot x\right) \cdot \cos B}}{\sin B} \]
      4. mul-1-neg80.7%

        \[\leadsto \frac{\color{blue}{\left(-x\right)} \cdot \cos B}{\sin B} \]
    6. Simplified80.7%

      \[\leadsto \color{blue}{\frac{\left(-x\right) \cdot \cos B}{\sin B}} \]

    if 8.0000000000000005e-133 < F < 3.00000000000000029e-20

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.1%

        \[\leadsto \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)} \]
      2. unsub-neg99.1%

        \[\leadsto \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}} \]
      3. associate-*l/99.4%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.3%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.3%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.5%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def99.5%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr99.5%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.5%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow299.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.5%

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{\left(2 + 2 \cdot x\right)} + {F}^{2}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      8. +-commutative99.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow299.5%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def99.5%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around 0 99.4%

      \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{2 \cdot x + 2}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in x around 0 65.0%

      \[\leadsto \color{blue}{\frac{\sqrt{0.5} \cdot F}{\sin B}} \]

    if 3.00000000000000029e-20 < F

    1. Initial program 58.9%

      \[\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. Step-by-step derivation
      1. +-commutative58.9%

        \[\leadsto \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)} \]
      2. unsub-neg58.9%

        \[\leadsto \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}} \]
      3. associate-*l/79.9%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/79.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative79.8%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\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 97.6%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 75.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.05 \cdot 10^{-38}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 8 \cdot 10^{-133}:\\ \;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 3 \cdot 10^{-20}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 20: 61.2% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -3.9 \cdot 10^{-237}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-158}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -3.9e-237)
     (- (/ -1.0 B) t_0)
     (if (<= F 2.5e-158)
       (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
       (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -3.9e-237) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 2.5e-158) {
		tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-3.9d-237)) then
        tmp = ((-1.0d0) / b) - t_0
    else if (f <= 2.5d-158) then
        tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
    else
        tmp = (1.0d0 / b) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -3.9e-237) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 2.5e-158) {
		tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -3.9e-237:
		tmp = (-1.0 / B) - t_0
	elif F <= 2.5e-158:
		tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B
	else:
		tmp = (1.0 / B) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -3.9e-237)
		tmp = Float64(Float64(-1.0 / B) - t_0);
	elseif (F <= 2.5e-158)
		tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B);
	else
		tmp = Float64(Float64(1.0 / B) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -3.9e-237)
		tmp = (-1.0 / B) - t_0;
	elseif (F <= 2.5e-158)
		tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
	else
		tmp = (1.0 / B) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.9e-237], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.5e-158], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.9 \cdot 10^{-237}:\\
\;\;\;\;\frac{-1}{B} - t_0\\

\mathbf{elif}\;F \leq 2.5 \cdot 10^{-158}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -3.8999999999999998e-237

    1. Initial program 72.9%

      \[\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. Step-by-step derivation
      1. +-commutative72.9%

        \[\leadsto \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)} \]
      2. unsub-neg72.9%

        \[\leadsto \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}} \]
      3. associate-*l/77.4%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/77.3%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative77.3%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\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 78.9%

      \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 62.1%

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

    if -3.8999999999999998e-237 < F < 2.49999999999999986e-158

    1. Initial program 99.6%

      \[\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. Step-by-step derivation
      1. +-commutative99.6%

        \[\leadsto \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)} \]
      2. unsub-neg99.6%

        \[\leadsto \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}} \]
      3. associate-*l/99.6%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/99.5%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative99.5%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Step-by-step derivation
      1. clear-num99.8%

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

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

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-def99.8%

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

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    5. Applied egg-rr99.8%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. unpow-199.8%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(F \cdot F + 2\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      4. unpow299.8%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \left(\color{blue}{{F}^{2}} + 2\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      5. +-commutative99.8%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(2 \cdot x + \color{blue}{\left(2 + {F}^{2}\right)}\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      6. associate-+r+99.8%

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

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

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\color{blue}{\left({F}^{2} + \left(2 + 2 \cdot x\right)\right)}}^{-0.5}}} - \frac{x}{\tan B} \]
      9. unpow299.8%

        \[\leadsto F \cdot \frac{1}{\frac{\sin B}{{\left(\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)\right)}^{-0.5}}} - \frac{x}{\tan B} \]
      10. fma-def99.8%

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around 0 99.9%

      \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{2 \cdot x + 2}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in B around 0 63.4%

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

    if 2.49999999999999986e-158 < F

    1. Initial program 67.6%

      \[\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. Step-by-step derivation
      1. +-commutative67.6%

        \[\leadsto \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)} \]
      2. unsub-neg67.6%

        \[\leadsto \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}} \]
      3. associate-*l/84.1%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/84.1%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative84.1%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified84.2%

      \[\leadsto \color{blue}{F \cdot \frac{{\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 82.0%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 67.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.9 \cdot 10^{-237}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-158}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 21: 60.2% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -3.9 \cdot 10^{-237}:\\ \;\;\;\;\frac{-1}{B} - t_0\\ \mathbf{elif}\;F \leq 1.4 \cdot 10^{-159}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -3.9e-237)
     (- (/ -1.0 B) t_0)
     (if (<= F 1.4e-159) (- (/ x B)) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -3.9e-237) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 1.4e-159) {
		tmp = -(x / B);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-3.9d-237)) then
        tmp = ((-1.0d0) / b) - t_0
    else if (f <= 1.4d-159) then
        tmp = -(x / b)
    else
        tmp = (1.0d0 / b) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -3.9e-237) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= 1.4e-159) {
		tmp = -(x / B);
	} else {
		tmp = (1.0 / B) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -3.9e-237:
		tmp = (-1.0 / B) - t_0
	elif F <= 1.4e-159:
		tmp = -(x / B)
	else:
		tmp = (1.0 / B) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -3.9e-237)
		tmp = Float64(Float64(-1.0 / B) - t_0);
	elseif (F <= 1.4e-159)
		tmp = Float64(-Float64(x / B));
	else
		tmp = Float64(Float64(1.0 / B) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -3.9e-237)
		tmp = (-1.0 / B) - t_0;
	elseif (F <= 1.4e-159)
		tmp = -(x / B);
	else
		tmp = (1.0 / B) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.9e-237], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-159], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.9 \cdot 10^{-237}:\\
\;\;\;\;\frac{-1}{B} - t_0\\

\mathbf{elif}\;F \leq 1.4 \cdot 10^{-159}:\\
\;\;\;\;-\frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -3.8999999999999998e-237

    1. Initial program 72.9%

      \[\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. Step-by-step derivation
      1. +-commutative72.9%

        \[\leadsto \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)} \]
      2. unsub-neg72.9%

        \[\leadsto \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}} \]
      3. associate-*l/77.4%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/77.3%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative77.3%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\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 78.9%

      \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 62.1%

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

    if -3.8999999999999998e-237 < F < 1.4000000000000001e-159

    1. Initial program 99.6%

      \[\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. Step-by-step derivation
      1. +-commutative99.6%

        \[\leadsto \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)} \]
      2. fma-def99.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
      3. +-commutative99.6%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      4. *-commutative99.6%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      5. fma-def99.6%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      6. fma-def99.6%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      7. metadata-eval99.6%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      8. metadata-eval99.6%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      9. distribute-lft-neg-in99.6%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}}\right) \]
      10. associate-*r/99.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.9%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Taylor expanded in F around 0 90.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{\cos B \cdot x}{\sin B}} \]
    5. Step-by-step derivation
      1. mul-1-neg90.0%

        \[\leadsto \color{blue}{-\frac{\cos B \cdot x}{\sin B}} \]
      2. *-commutative90.0%

        \[\leadsto -\frac{\color{blue}{x \cdot \cos B}}{\sin B} \]
      3. associate-*l/90.0%

        \[\leadsto -\color{blue}{\frac{x}{\sin B} \cdot \cos B} \]
      4. *-commutative90.0%

        \[\leadsto -\color{blue}{\cos B \cdot \frac{x}{\sin B}} \]
    6. Simplified90.0%

      \[\leadsto \color{blue}{-\cos B \cdot \frac{x}{\sin B}} \]
    7. Taylor expanded in B around 0 57.2%

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

    if 1.4000000000000001e-159 < F

    1. Initial program 67.6%

      \[\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. Step-by-step derivation
      1. +-commutative67.6%

        \[\leadsto \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)} \]
      2. unsub-neg67.6%

        \[\leadsto \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}} \]
      3. associate-*l/84.1%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/84.1%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative84.1%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified84.2%

      \[\leadsto \color{blue}{F \cdot \frac{{\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 82.0%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 67.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.9 \cdot 10^{-237}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.4 \cdot 10^{-159}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]

Alternative 22: 54.0% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \frac{-1}{B} - \frac{x}{\tan B} \end{array} \]
(FPCore (F B x) :precision binary64 (- (/ -1.0 B) (/ x (tan B))))
double code(double F, double B, double x) {
	return (-1.0 / B) - (x / tan(B));
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    code = ((-1.0d0) / b) - (x / tan(b))
end function
public static double code(double F, double B, double x) {
	return (-1.0 / B) - (x / Math.tan(B));
}
def code(F, B, x):
	return (-1.0 / B) - (x / math.tan(B))
function code(F, B, x)
	return Float64(Float64(-1.0 / B) - Float64(x / tan(B)))
end
function tmp = code(F, B, x)
	tmp = (-1.0 / B) - (x / tan(B));
end
code[F_, B_, x_] := N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{-1}{B} - \frac{x}{\tan B}
\end{array}
Derivation
  1. Initial program 73.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. Step-by-step derivation
    1. +-commutative73.8%

      \[\leadsto \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)} \]
    2. unsub-neg73.8%

      \[\leadsto \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}} \]
    3. associate-*l/83.0%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
    4. associate-*r/82.9%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
    5. *-commutative82.9%

      \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
  3. Simplified83.1%

    \[\leadsto \color{blue}{F \cdot \frac{{\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 58.2%

    \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
  5. Taylor expanded in B around 0 54.9%

    \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
  6. Final simplification54.9%

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

Alternative 23: 43.7% accurate, 21.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-9}:\\ \;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.05 \cdot 10^{-64}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -7.2e-9)
   (+ (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (- -1.0 x) B))
   (if (<= F 1.05e-64) (- (/ x B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -7.2e-9) {
		tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
	} else if (F <= 1.05e-64) {
		tmp = -(x / B);
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-7.2d-9)) then
        tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) + (((-1.0d0) - x) / b)
    else if (f <= 1.05d-64) then
        tmp = -(x / b)
    else
        tmp = (1.0d0 - x) / b
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -7.2e-9) {
		tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
	} else if (F <= 1.05e-64) {
		tmp = -(x / B);
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -7.2e-9:
		tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B)
	elif F <= 1.05e-64:
		tmp = -(x / B)
	else:
		tmp = (1.0 - x) / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -7.2e-9)
		tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) + Float64(Float64(-1.0 - x) / B));
	elseif (F <= 1.05e-64)
		tmp = Float64(-Float64(x / B));
	else
		tmp = Float64(Float64(1.0 - x) / B);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -7.2e-9)
		tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
	elseif (F <= 1.05e-64)
		tmp = -(x / B);
	else
		tmp = (1.0 - x) / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-9], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.05e-64], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-9}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 1.05 \cdot 10^{-64}:\\
\;\;\;\;-\frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -7.2e-9

    1. Initial program 58.6%

      \[\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. Step-by-step derivation
      1. +-commutative58.6%

        \[\leadsto \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)} \]
      2. unsub-neg58.6%

        \[\leadsto \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}} \]
      3. associate-*l/65.5%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/65.4%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative65.4%

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

      \[\leadsto \color{blue}{F \cdot \frac{{\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 97.6%

      \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 49.9%

      \[\leadsto \color{blue}{\left(-0.16666666666666666 \cdot B - \frac{1}{B}\right)} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. *-commutative49.9%

        \[\leadsto \left(\color{blue}{B \cdot -0.16666666666666666} - \frac{1}{B}\right) - \frac{x}{\tan B} \]
    7. Simplified49.9%

      \[\leadsto \color{blue}{\left(B \cdot -0.16666666666666666 - \frac{1}{B}\right)} - \frac{x}{\tan B} \]
    8. Taylor expanded in B around 0 43.8%

      \[\leadsto \color{blue}{\left(0.3333333333333333 \cdot x - 0.16666666666666666\right) \cdot B + -1 \cdot \frac{1 + x}{B}} \]

    if -7.2e-9 < F < 1.05000000000000006e-64

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.4%

        \[\leadsto \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)} \]
      2. fma-def99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
      3. +-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      4. *-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      5. fma-def99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      6. fma-def99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      7. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      8. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      9. distribute-lft-neg-in99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}}\right) \]
      10. associate-*r/99.6%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.6%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Taylor expanded in F around 0 72.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{\cos B \cdot x}{\sin B}} \]
    5. Step-by-step derivation
      1. mul-1-neg72.5%

        \[\leadsto \color{blue}{-\frac{\cos B \cdot x}{\sin B}} \]
      2. *-commutative72.5%

        \[\leadsto -\frac{\color{blue}{x \cdot \cos B}}{\sin B} \]
      3. associate-*l/72.5%

        \[\leadsto -\color{blue}{\frac{x}{\sin B} \cdot \cos B} \]
      4. *-commutative72.5%

        \[\leadsto -\color{blue}{\cos B \cdot \frac{x}{\sin B}} \]
    6. Simplified72.5%

      \[\leadsto \color{blue}{-\cos B \cdot \frac{x}{\sin B}} \]
    7. Taylor expanded in B around 0 39.3%

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

    if 1.05000000000000006e-64 < F

    1. Initial program 63.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. Taylor expanded in B around 0 46.4%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    3. Taylor expanded in B around 0 26.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 51.7%

      \[\leadsto \color{blue}{\frac{1}{B} - \frac{x}{B}} \]
    5. Taylor expanded in B around 0 51.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-9}:\\ \;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.05 \cdot 10^{-64}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]

Alternative 24: 43.7% accurate, 35.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6 \cdot 10^{-31}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-69}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -6e-31)
   (/ (- -1.0 x) B)
   (if (<= F 4.6e-69) (- (/ x B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -6e-31) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 4.6e-69) {
		tmp = -(x / B);
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-6d-31)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= 4.6d-69) then
        tmp = -(x / b)
    else
        tmp = (1.0d0 - x) / b
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -6e-31) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 4.6e-69) {
		tmp = -(x / B);
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -6e-31:
		tmp = (-1.0 - x) / B
	elif F <= 4.6e-69:
		tmp = -(x / B)
	else:
		tmp = (1.0 - x) / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -6e-31)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= 4.6e-69)
		tmp = Float64(-Float64(x / B));
	else
		tmp = Float64(Float64(1.0 - x) / B);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -6e-31)
		tmp = (-1.0 - x) / B;
	elseif (F <= 4.6e-69)
		tmp = -(x / B);
	else
		tmp = (1.0 - x) / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -6e-31], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.6e-69], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -6 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 4.6 \cdot 10^{-69}:\\
\;\;\;\;-\frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -5.99999999999999962e-31

    1. Initial program 60.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. Step-by-step derivation
      1. +-commutative60.7%

        \[\leadsto \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)} \]
      2. unsub-neg60.7%

        \[\leadsto \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}} \]
      3. associate-*l/67.2%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      4. associate-*r/67.2%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} - x \cdot \frac{1}{\tan B} \]
      5. *-commutative67.2%

        \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} \cdot F} - x \cdot \frac{1}{\tan B} \]
    3. Simplified67.2%

      \[\leadsto \color{blue}{F \cdot \frac{{\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 95.4%

      \[\leadsto F \cdot \color{blue}{\frac{-1}{\sin B \cdot F}} - \frac{x}{\tan B} \]
    5. Taylor expanded in B around 0 48.9%

      \[\leadsto \color{blue}{\left(-0.16666666666666666 \cdot B - \frac{1}{B}\right)} - \frac{x}{\tan B} \]
    6. Step-by-step derivation
      1. *-commutative48.9%

        \[\leadsto \left(\color{blue}{B \cdot -0.16666666666666666} - \frac{1}{B}\right) - \frac{x}{\tan B} \]
    7. Simplified48.9%

      \[\leadsto \color{blue}{\left(B \cdot -0.16666666666666666 - \frac{1}{B}\right)} - \frac{x}{\tan B} \]
    8. Taylor expanded in B around 0 42.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    9. Step-by-step derivation
      1. associate-*r/42.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
      2. distribute-lft-in42.8%

        \[\leadsto \frac{\color{blue}{-1 \cdot 1 + -1 \cdot x}}{B} \]
      3. metadata-eval42.8%

        \[\leadsto \frac{\color{blue}{-1} + -1 \cdot x}{B} \]
      4. neg-mul-142.8%

        \[\leadsto \frac{-1 + \color{blue}{\left(-x\right)}}{B} \]
    10. Simplified42.8%

      \[\leadsto \color{blue}{\frac{-1 + \left(-x\right)}{B}} \]

    if -5.99999999999999962e-31 < F < 4.6000000000000001e-69

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutative99.4%

        \[\leadsto \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)} \]
      2. fma-def99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
      3. +-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      4. *-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      5. fma-def99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      6. fma-def99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      7. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      8. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      9. distribute-lft-neg-in99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}}\right) \]
      10. associate-*r/99.6%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.6%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Taylor expanded in F around 0 73.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{\cos B \cdot x}{\sin B}} \]
    5. Step-by-step derivation
      1. mul-1-neg73.6%

        \[\leadsto \color{blue}{-\frac{\cos B \cdot x}{\sin B}} \]
      2. *-commutative73.6%

        \[\leadsto -\frac{\color{blue}{x \cdot \cos B}}{\sin B} \]
      3. associate-*l/73.6%

        \[\leadsto -\color{blue}{\frac{x}{\sin B} \cdot \cos B} \]
      4. *-commutative73.6%

        \[\leadsto -\color{blue}{\cos B \cdot \frac{x}{\sin B}} \]
    6. Simplified73.6%

      \[\leadsto \color{blue}{-\cos B \cdot \frac{x}{\sin B}} \]
    7. Taylor expanded in B around 0 39.9%

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

    if 4.6000000000000001e-69 < F

    1. Initial program 63.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. Taylor expanded in B around 0 46.4%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    3. Taylor expanded in B around 0 26.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 51.7%

      \[\leadsto \color{blue}{\frac{1}{B} - \frac{x}{B}} \]
    5. Taylor expanded in B around 0 51.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6 \cdot 10^{-31}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-69}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]

Alternative 25: 36.4% accurate, 45.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq 5.5 \cdot 10^{-61}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F 5.5e-61) (- (/ x B)) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
	double tmp;
	if (F <= 5.5e-61) {
		tmp = -(x / B);
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= 5.5d-61) then
        tmp = -(x / b)
    else
        tmp = (1.0d0 - x) / b
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= 5.5e-61) {
		tmp = -(x / B);
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= 5.5e-61:
		tmp = -(x / B)
	else:
		tmp = (1.0 - x) / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= 5.5e-61)
		tmp = Float64(-Float64(x / B));
	else
		tmp = Float64(Float64(1.0 - x) / B);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= 5.5e-61)
		tmp = -(x / B);
	else
		tmp = (1.0 - x) / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, 5.5e-61], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq 5.5 \cdot 10^{-61}:\\
\;\;\;\;-\frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < 5.4999999999999997e-61

    1. Initial program 80.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. Step-by-step derivation
      1. +-commutative80.4%

        \[\leadsto \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)} \]
      2. fma-def80.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
      3. +-commutative80.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      4. *-commutative80.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
      5. fma-def80.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      6. fma-def80.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      7. metadata-eval80.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      8. metadata-eval80.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
      9. distribute-lft-neg-in80.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}}\right) \]
      10. associate-*r/80.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity80.5%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Taylor expanded in F around 0 53.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{\cos B \cdot x}{\sin B}} \]
    5. Step-by-step derivation
      1. mul-1-neg53.6%

        \[\leadsto \color{blue}{-\frac{\cos B \cdot x}{\sin B}} \]
      2. *-commutative53.6%

        \[\leadsto -\frac{\color{blue}{x \cdot \cos B}}{\sin B} \]
      3. associate-*l/53.6%

        \[\leadsto -\color{blue}{\frac{x}{\sin B} \cdot \cos B} \]
      4. *-commutative53.6%

        \[\leadsto -\color{blue}{\cos B \cdot \frac{x}{\sin B}} \]
    6. Simplified53.6%

      \[\leadsto \color{blue}{-\cos B \cdot \frac{x}{\sin B}} \]
    7. Taylor expanded in B around 0 26.8%

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

    if 5.4999999999999997e-61 < F

    1. Initial program 63.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. Taylor expanded in B around 0 46.4%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    3. Taylor expanded in B around 0 26.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 51.7%

      \[\leadsto \color{blue}{\frac{1}{B} - \frac{x}{B}} \]
    5. Taylor expanded in B around 0 51.7%

      \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq 5.5 \cdot 10^{-61}:\\ \;\;\;\;-\frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]

Alternative 26: 29.2% accurate, 81.0× speedup?

\[\begin{array}{l} \\ -\frac{x}{B} \end{array} \]
(FPCore (F B x) :precision binary64 (- (/ x B)))
double code(double F, double B, double x) {
	return -(x / B);
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    code = -(x / b)
end function
public static double code(double F, double B, double x) {
	return -(x / B);
}
def code(F, B, x):
	return -(x / B)
function code(F, B, x)
	return Float64(-Float64(x / B))
end
function tmp = code(F, B, x)
	tmp = -(x / B);
end
code[F_, B_, x_] := (-N[(x / B), $MachinePrecision])
\begin{array}{l}

\\
-\frac{x}{B}
\end{array}
Derivation
  1. Initial program 73.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. Step-by-step derivation
    1. +-commutative73.8%

      \[\leadsto \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)} \]
    2. fma-def73.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
    3. +-commutative73.8%

      \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
    4. *-commutative73.8%

      \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right) \]
    5. fma-def73.8%

      \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
    6. fma-def73.8%

      \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
    7. metadata-eval73.8%

      \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
    8. metadata-eval73.8%

      \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\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}\right) \]
    9. distribute-lft-neg-in73.8%

      \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}}\right) \]
    10. associate-*r/73.9%

      \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
    11. *-rgt-identity73.9%

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
  4. Taylor expanded in F around 0 53.6%

    \[\leadsto \color{blue}{-1 \cdot \frac{\cos B \cdot x}{\sin B}} \]
  5. Step-by-step derivation
    1. mul-1-neg53.6%

      \[\leadsto \color{blue}{-\frac{\cos B \cdot x}{\sin B}} \]
    2. *-commutative53.6%

      \[\leadsto -\frac{\color{blue}{x \cdot \cos B}}{\sin B} \]
    3. associate-*l/53.6%

      \[\leadsto -\color{blue}{\frac{x}{\sin B} \cdot \cos B} \]
    4. *-commutative53.6%

      \[\leadsto -\color{blue}{\cos B \cdot \frac{x}{\sin B}} \]
  6. Simplified53.6%

    \[\leadsto \color{blue}{-\cos B \cdot \frac{x}{\sin B}} \]
  7. Taylor expanded in B around 0 29.4%

    \[\leadsto -\color{blue}{\frac{x}{B}} \]
  8. Final simplification29.4%

    \[\leadsto -\frac{x}{B} \]

Alternative 27: 10.0% accurate, 108.0× speedup?

\[\begin{array}{l} \\ \frac{1}{B} \end{array} \]
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
	return 1.0 / B;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    code = 1.0d0 / b
end function
public static double code(double F, double B, double x) {
	return 1.0 / B;
}
def code(F, B, x):
	return 1.0 / B
function code(F, B, x)
	return Float64(1.0 / B)
end
function tmp = code(F, B, x)
	tmp = 1.0 / B;
end
code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
\begin{array}{l}

\\
\frac{1}{B}
\end{array}
Derivation
  1. Initial program 73.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. Taylor expanded in B around 0 56.4%

    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
  3. Taylor expanded in B around 0 32.2%

    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
  4. Taylor expanded in F around inf 30.3%

    \[\leadsto \color{blue}{\frac{1}{B} - \frac{x}{B}} \]
  5. Taylor expanded in x around 0 9.2%

    \[\leadsto \color{blue}{\frac{1}{B}} \]
  6. Final simplification9.2%

    \[\leadsto \frac{1}{B} \]

Reproduce

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