VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.1% → 99.7%
Time: 17.9s
Alternatives: 26
Speedup: 2.3×

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 26 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.1% 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.7% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := -\frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2 \cdot 10^{+68}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{+20}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x \cdot \cos B}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, 1, t\_1\right)\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ 1.0 (sin B))) (t_1 (- (/ x (tan B)))))
   (if (<= F -2e+68)
     (fma t_0 -1.0 t_1)
     (if (<= F 2.1e+20)
       (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) (* x (cos B))) (sin B))
       (fma t_0 1.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 <= -2e+68) {
		tmp = fma(t_0, -1.0, t_1);
	} else if (F <= 2.1e+20) {
		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - (x * cos(B))) / sin(B);
	} else {
		tmp = fma(t_0, 1.0, t_1);
	}
	return tmp;
}
function code(F, B, x)
	t_0 = Float64(1.0 / sin(B))
	t_1 = Float64(-Float64(x / tan(B)))
	tmp = 0.0
	if (F <= -2e+68)
		tmp = fma(t_0, -1.0, t_1);
	elseif (F <= 2.1e+20)
		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - Float64(x * cos(B))) / sin(B));
	else
		tmp = fma(t_0, 1.0, t_1);
	end
	return 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, -2e+68], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 2.1e+20], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * 1.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 -2 \cdot 10^{+68}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\

\mathbf{elif}\;F \leq 2.1 \cdot 10^{+20}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x \cdot \cos B}{\sin B}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, 1, t\_1\right)\\


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

    1. Initial program 53.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. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
      2. clear-numN/A

        \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
      3. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
      4. div-invN/A

        \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
      5. times-fracN/A

        \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
      6. accelerator-lowering-fma.f64N/A

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

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

      \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{-1}, \mathsf{neg}\left(\frac{x}{\tan B}\right)\right) \]
    6. Step-by-step derivation
      1. Simplified99.9%

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

      if -1.99999999999999991e68 < F < 2.1e20

      1. Initial program 98.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. Add Preprocessing
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
        2. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        3. associate-*l/N/A

          \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        4. div-invN/A

          \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        5. times-fracN/A

          \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        6. accelerator-lowering-fma.f64N/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, -\frac{x}{\tan B}\right)} \]
      5. Step-by-step derivation
        1. unsub-negN/A

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

          \[\leadsto \frac{1}{\sin B} \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
        3. associate-*l/N/A

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

          \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}} \]
        5. clear-numN/A

          \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \color{blue}{\frac{\cos B}{\sin B}} \]
        6. associate-/l*N/A

          \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
        7. sub-divN/A

          \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
        8. /-lowering-/.f64N/A

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

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

      if 2.1e20 < F

      1. Initial program 53.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. Add Preprocessing
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
        2. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        3. associate-*l/N/A

          \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        4. div-invN/A

          \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        5. times-fracN/A

          \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        6. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \mathsf{neg}\left(\frac{x}{\tan B}\right)\right) \]
      6. Step-by-step derivation
        1. Simplified99.7%

          \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, -\frac{x}{\tan B}\right) \]
      7. Recombined 3 regimes into one program.
      8. Add Preprocessing

      Alternative 2: 99.0% accurate, 1.4× 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:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 1.4:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, 2\right)}} - x \cdot \cos B}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, 1, t\_1\right)\\ \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)
           (fma t_0 -1.0 t_1)
           (if (<= F 1.4)
             (/ (- (/ F (sqrt (fma x 2.0 2.0))) (* x (cos B))) (sin B))
             (fma t_0 1.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 = fma(t_0, -1.0, t_1);
      	} else if (F <= 1.4) {
      		tmp = ((F / sqrt(fma(x, 2.0, 2.0))) - (x * cos(B))) / sin(B);
      	} else {
      		tmp = fma(t_0, 1.0, t_1);
      	}
      	return tmp;
      }
      
      function code(F, B, x)
      	t_0 = Float64(1.0 / sin(B))
      	t_1 = Float64(-Float64(x / tan(B)))
      	tmp = 0.0
      	if (F <= -1.45)
      		tmp = fma(t_0, -1.0, t_1);
      	elseif (F <= 1.4)
      		tmp = Float64(Float64(Float64(F / sqrt(fma(x, 2.0, 2.0))) - Float64(x * cos(B))) / sin(B));
      	else
      		tmp = fma(t_0, 1.0, t_1);
      	end
      	return 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[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(N[(F / N[Sqrt[N[(x * 2.0 + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * 1.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:\\
      \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
      
      \mathbf{elif}\;F \leq 1.4:\\
      \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, 2\right)}} - x \cdot \cos B}{\sin B}\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(t\_0, 1, t\_1\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if F < -1.44999999999999996

        1. Initial program 57.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. Add Preprocessing
        3. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
          2. clear-numN/A

            \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
          3. associate-*l/N/A

            \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
          4. div-invN/A

            \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
          5. times-fracN/A

            \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
          6. accelerator-lowering-fma.f64N/A

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

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

          \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{-1}, \mathsf{neg}\left(\frac{x}{\tan B}\right)\right) \]
        6. Step-by-step derivation
          1. Simplified99.9%

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

          if -1.44999999999999996 < F < 1.3999999999999999

          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. Add Preprocessing
          3. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
            2. clear-numN/A

              \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
            3. associate-*l/N/A

              \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
            4. div-invN/A

              \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
            5. times-fracN/A

              \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
            6. accelerator-lowering-fma.f64N/A

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, -\frac{x}{\tan B}\right)} \]
          5. Step-by-step derivation
            1. unsub-negN/A

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

              \[\leadsto \frac{1}{\sin B} \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
            3. associate-*l/N/A

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

              \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}} \]
            5. clear-numN/A

              \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \color{blue}{\frac{\cos B}{\sin B}} \]
            6. associate-/l*N/A

              \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
            7. sub-divN/A

              \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
            8. /-lowering-/.f64N/A

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

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

            \[\leadsto \frac{\frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x}}} - x \cdot \cos B}{\sin B} \]
          8. Step-by-step derivation
            1. sqrt-lowering-sqrt.f64N/A

              \[\leadsto \frac{\frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x}}} - x \cdot \cos B}{\sin B} \]
            2. +-commutativeN/A

              \[\leadsto \frac{\frac{F}{\sqrt{\color{blue}{2 \cdot x + 2}}} - x \cdot \cos B}{\sin B} \]
            3. *-commutativeN/A

              \[\leadsto \frac{\frac{F}{\sqrt{\color{blue}{x \cdot 2} + 2}} - x \cdot \cos B}{\sin B} \]
            4. accelerator-lowering-fma.f6499.0

              \[\leadsto \frac{\frac{F}{\sqrt{\color{blue}{\mathsf{fma}\left(x, 2, 2\right)}}} - x \cdot \cos B}{\sin B} \]
          9. Simplified99.0%

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

          if 1.3999999999999999 < F

          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. Add Preprocessing
          3. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
            2. clear-numN/A

              \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
            3. associate-*l/N/A

              \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
            4. div-invN/A

              \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
            5. times-fracN/A

              \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
            6. accelerator-lowering-fma.f64N/A

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

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

            \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \mathsf{neg}\left(\frac{x}{\tan B}\right)\right) \]
          6. Step-by-step derivation
            1. Simplified99.4%

              \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, -\frac{x}{\tan B}\right) \]
          7. Recombined 3 regimes into one program.
          8. Add Preprocessing

          Alternative 3: 92.4% accurate, 1.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := -\frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.22 \cdot 10^{-23}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 1.15 \cdot 10^{-137}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 7500000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, 1, t\_1\right)\\ \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.22e-23)
               (fma t_0 -1.0 t_1)
               (if (<= F 1.15e-137)
                 (+
                  (* x (/ -1.0 (tan B)))
                  (* (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (/ F B)))
                 (if (<= F 7500000.0)
                   (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) (sin B))
                   (fma t_0 1.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.22e-23) {
          		tmp = fma(t_0, -1.0, t_1);
          	} else if (F <= 1.15e-137) {
          		tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * (F / B));
          	} else if (F <= 7500000.0) {
          		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B);
          	} else {
          		tmp = fma(t_0, 1.0, t_1);
          	}
          	return tmp;
          }
          
          function code(F, B, x)
          	t_0 = Float64(1.0 / sin(B))
          	t_1 = Float64(-Float64(x / tan(B)))
          	tmp = 0.0
          	if (F <= -1.22e-23)
          		tmp = fma(t_0, -1.0, t_1);
          	elseif (F <= 1.15e-137)
          		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * Float64(F / B)));
          	elseif (F <= 7500000.0)
          		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B));
          	else
          		tmp = fma(t_0, 1.0, t_1);
          	end
          	return 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.22e-23], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 1.15e-137], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7500000.0], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * 1.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.22 \cdot 10^{-23}:\\
          \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
          
          \mathbf{elif}\;F \leq 1.15 \cdot 10^{-137}:\\
          \;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\
          
          \mathbf{elif}\;F \leq 7500000:\\
          \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(t\_0, 1, t\_1\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if F < -1.22000000000000007e-23

            1. Initial program 60.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. Add Preprocessing
            3. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
              2. clear-numN/A

                \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
              3. associate-*l/N/A

                \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
              4. div-invN/A

                \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
              5. times-fracN/A

                \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
              6. accelerator-lowering-fma.f64N/A

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

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

              \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{-1}, \mathsf{neg}\left(\frac{x}{\tan B}\right)\right) \]
            6. Step-by-step derivation
              1. Simplified96.3%

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

              if -1.22000000000000007e-23 < F < 1.15000000000000004e-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. Add Preprocessing
              3. Taylor expanded in B around 0

                \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                3. sqrt-lowering-sqrt.f64N/A

                  \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                4. /-lowering-/.f64N/A

                  \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                5. +-commutativeN/A

                  \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                6. associate-+l+N/A

                  \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}} \cdot \frac{F}{B} \]
                7. *-commutativeN/A

                  \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}} \cdot \frac{F}{B} \]
                8. +-commutativeN/A

                  \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                9. accelerator-lowering-fma.f64N/A

                  \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                10. +-commutativeN/A

                  \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}} \cdot \frac{F}{B} \]
                11. unpow2N/A

                  \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}} \cdot \frac{F}{B} \]
                12. accelerator-lowering-fma.f64N/A

                  \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}} \cdot \frac{F}{B} \]
                13. /-lowering-/.f6488.6

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

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

              if 1.15000000000000004e-137 < F < 7.5e6

              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. Add Preprocessing
              3. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                2. clear-numN/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                3. associate-*l/N/A

                  \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                4. div-invN/A

                  \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                5. times-fracN/A

                  \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                6. accelerator-lowering-fma.f64N/A

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, -\frac{x}{\tan B}\right)} \]
              5. Step-by-step derivation
                1. unsub-negN/A

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

                  \[\leadsto \frac{1}{\sin B} \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                3. associate-*l/N/A

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

                  \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}} \]
                5. clear-numN/A

                  \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \color{blue}{\frac{\cos B}{\sin B}} \]
                6. associate-/l*N/A

                  \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                7. sub-divN/A

                  \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                8. /-lowering-/.f64N/A

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

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

                \[\leadsto \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \color{blue}{x}}{\sin B} \]
              8. Step-by-step derivation
                1. Simplified92.3%

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

                if 7.5e6 < F

                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. Add Preprocessing
                3. Step-by-step derivation
                  1. +-commutativeN/A

                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                  2. clear-numN/A

                    \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                  3. associate-*l/N/A

                    \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                  4. div-invN/A

                    \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                  5. times-fracN/A

                    \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                  6. accelerator-lowering-fma.f64N/A

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \mathsf{neg}\left(\frac{x}{\tan B}\right)\right) \]
                6. Step-by-step derivation
                  1. Simplified99.7%

                    \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, -\frac{x}{\tan B}\right) \]
                7. Recombined 4 regimes into one program.
                8. Final simplification94.2%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.22 \cdot 10^{-23}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, -1, -\frac{x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 1.15 \cdot 10^{-137}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 7500000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, 1, -\frac{x}{\tan B}\right)\\ \end{array} \]
                9. Add Preprocessing

                Alternative 4: 82.7% accurate, 1.5× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\ \mathbf{if}\;F \leq -8.8 \cdot 10^{+133}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.65 \cdot 10^{-103}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 6.8 \cdot 10^{-138}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 820000:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \end{array} \]
                (FPCore (F B x)
                 :precision binary64
                 (let* ((t_0 (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) (sin B))))
                   (if (<= F -8.8e+133)
                     (- (/ x (tan B)))
                     (if (<= F -1.65e-103)
                       t_0
                       (if (<= F 6.8e-138)
                         (+
                          (* x (/ -1.0 (tan B)))
                          (* (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (/ F B)))
                         (if (<= F 820000.0) t_0 (/ (- 1.0 (* x (cos B))) (sin B))))))))
                double code(double F, double B, double x) {
                	double t_0 = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B);
                	double tmp;
                	if (F <= -8.8e+133) {
                		tmp = -(x / tan(B));
                	} else if (F <= -1.65e-103) {
                		tmp = t_0;
                	} else if (F <= 6.8e-138) {
                		tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * (F / B));
                	} else if (F <= 820000.0) {
                		tmp = t_0;
                	} else {
                		tmp = (1.0 - (x * cos(B))) / sin(B);
                	}
                	return tmp;
                }
                
                function code(F, B, x)
                	t_0 = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B))
                	tmp = 0.0
                	if (F <= -8.8e+133)
                		tmp = Float64(-Float64(x / tan(B)));
                	elseif (F <= -1.65e-103)
                		tmp = t_0;
                	elseif (F <= 6.8e-138)
                		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * Float64(F / B)));
                	elseif (F <= 820000.0)
                		tmp = t_0;
                	else
                		tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B));
                	end
                	return tmp
                end
                
                code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.8e+133], (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, -1.65e-103], t$95$0, If[LessEqual[F, 6.8e-138], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 820000.0], t$95$0, N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\
                \mathbf{if}\;F \leq -8.8 \cdot 10^{+133}:\\
                \;\;\;\;-\frac{x}{\tan B}\\
                
                \mathbf{elif}\;F \leq -1.65 \cdot 10^{-103}:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;F \leq 6.8 \cdot 10^{-138}:\\
                \;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\
                
                \mathbf{elif}\;F \leq 820000:\\
                \;\;\;\;t\_0\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 4 regimes
                2. if F < -8.8e133

                  1. Initial program 37.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. Add Preprocessing
                  3. Taylor expanded in x around inf

                    \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                  4. Step-by-step derivation
                    1. mul-1-negN/A

                      \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                    2. neg-lowering-neg.f64N/A

                      \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                    3. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{x \cdot \cos B}{\sin B}}\right) \]
                    4. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{neg}\left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right) \]
                    5. cos-lowering-cos.f64N/A

                      \[\leadsto \mathsf{neg}\left(\frac{x \cdot \color{blue}{\cos B}}{\sin B}\right) \]
                    6. sin-lowering-sin.f6462.6

                      \[\leadsto -\frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                  5. Simplified62.6%

                    \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
                  6. Step-by-step derivation
                    1. clear-numN/A

                      \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                    2. distribute-neg-frac2N/A

                      \[\leadsto \color{blue}{\frac{1}{\mathsf{neg}\left(\frac{\sin B}{x \cdot \cos B}\right)}} \]
                    3. associate-/l/N/A

                      \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}\right)} \]
                    4. tan-quotN/A

                      \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{\color{blue}{\tan B}}{x}\right)} \]
                    5. distribute-neg-frac2N/A

                      \[\leadsto \frac{1}{\color{blue}{\frac{\tan B}{\mathsf{neg}\left(x\right)}}} \]
                    6. clear-numN/A

                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                    7. /-lowering-/.f64N/A

                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                    8. neg-lowering-neg.f64N/A

                      \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{\tan B} \]
                    9. tan-lowering-tan.f6462.8

                      \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                  7. Applied egg-rr62.8%

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

                  if -8.8e133 < F < -1.64999999999999995e-103 or 6.8000000000000003e-138 < F < 8.2e5

                  1. Initial program 96.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. Add Preprocessing
                  3. Step-by-step derivation
                    1. +-commutativeN/A

                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                    2. clear-numN/A

                      \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                    3. associate-*l/N/A

                      \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                    4. div-invN/A

                      \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                    5. times-fracN/A

                      \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                    6. accelerator-lowering-fma.f64N/A

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, -\frac{x}{\tan B}\right)} \]
                  5. Step-by-step derivation
                    1. unsub-negN/A

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

                      \[\leadsto \frac{1}{\sin B} \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                    3. associate-*l/N/A

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

                      \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}} \]
                    5. clear-numN/A

                      \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \color{blue}{\frac{\cos B}{\sin B}} \]
                    6. associate-/l*N/A

                      \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                    7. sub-divN/A

                      \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                    8. /-lowering-/.f64N/A

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

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

                    \[\leadsto \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \color{blue}{x}}{\sin B} \]
                  8. Step-by-step derivation
                    1. Simplified82.7%

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

                    if -1.64999999999999995e-103 < F < 6.8000000000000003e-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. Add Preprocessing
                    3. Taylor expanded in B around 0

                      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                      3. sqrt-lowering-sqrt.f64N/A

                        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                      4. /-lowering-/.f64N/A

                        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                      5. +-commutativeN/A

                        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                      6. associate-+l+N/A

                        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}} \cdot \frac{F}{B} \]
                      7. *-commutativeN/A

                        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}} \cdot \frac{F}{B} \]
                      8. +-commutativeN/A

                        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                      9. accelerator-lowering-fma.f64N/A

                        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                      10. +-commutativeN/A

                        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}} \cdot \frac{F}{B} \]
                      11. unpow2N/A

                        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}} \cdot \frac{F}{B} \]
                      12. accelerator-lowering-fma.f64N/A

                        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}} \cdot \frac{F}{B} \]
                      13. /-lowering-/.f6491.0

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

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

                    if 8.2e5 < F

                    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. Add Preprocessing
                    3. Step-by-step derivation
                      1. +-commutativeN/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                      2. clear-numN/A

                        \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                      3. associate-*l/N/A

                        \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                      4. div-invN/A

                        \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                      5. times-fracN/A

                        \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                      6. accelerator-lowering-fma.f64N/A

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, -\frac{x}{\tan B}\right)} \]
                    5. Step-by-step derivation
                      1. unsub-negN/A

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

                        \[\leadsto \frac{1}{\sin B} \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                      3. associate-*l/N/A

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

                        \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}} \]
                      5. clear-numN/A

                        \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \color{blue}{\frac{\cos B}{\sin B}} \]
                      6. associate-/l*N/A

                        \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                      7. sub-divN/A

                        \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                      8. /-lowering-/.f64N/A

                        \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                    6. Applied egg-rr72.7%

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

                      \[\leadsto \color{blue}{\frac{1 - x \cdot \cos B}{\sin B}} \]
                    8. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \color{blue}{\frac{1 - x \cdot \cos B}{\sin B}} \]
                      2. --lowering--.f64N/A

                        \[\leadsto \frac{\color{blue}{1 - x \cdot \cos B}}{\sin B} \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \frac{1 - \color{blue}{x \cdot \cos B}}{\sin B} \]
                      4. cos-lowering-cos.f64N/A

                        \[\leadsto \frac{1 - x \cdot \color{blue}{\cos B}}{\sin B} \]
                      5. sin-lowering-sin.f6499.7

                        \[\leadsto \frac{1 - x \cdot \cos B}{\color{blue}{\sin B}} \]
                    9. Simplified99.7%

                      \[\leadsto \color{blue}{\frac{1 - x \cdot \cos B}{\sin B}} \]
                  9. Recombined 4 regimes into one program.
                  10. Final simplification85.9%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8.8 \cdot 10^{+133}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.65 \cdot 10^{-103}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\ \mathbf{elif}\;F \leq 6.8 \cdot 10^{-138}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 820000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \]
                  11. Add Preprocessing

                  Alternative 5: 92.4% accurate, 1.5× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.22 \cdot 10^{-23}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, -1, -\frac{x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 3.3 \cdot 10^{-139}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 3100000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \end{array} \]
                  (FPCore (F B x)
                   :precision binary64
                   (if (<= F -1.22e-23)
                     (fma (/ 1.0 (sin B)) -1.0 (- (/ x (tan B))))
                     (if (<= F 3.3e-139)
                       (+
                        (* x (/ -1.0 (tan B)))
                        (* (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (/ F B)))
                       (if (<= F 3100000.0)
                         (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) (sin B))
                         (/ (- 1.0 (* x (cos B))) (sin B))))))
                  double code(double F, double B, double x) {
                  	double tmp;
                  	if (F <= -1.22e-23) {
                  		tmp = fma((1.0 / sin(B)), -1.0, -(x / tan(B)));
                  	} else if (F <= 3.3e-139) {
                  		tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * (F / B));
                  	} else if (F <= 3100000.0) {
                  		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B);
                  	} else {
                  		tmp = (1.0 - (x * cos(B))) / sin(B);
                  	}
                  	return tmp;
                  }
                  
                  function code(F, B, x)
                  	tmp = 0.0
                  	if (F <= -1.22e-23)
                  		tmp = fma(Float64(1.0 / sin(B)), -1.0, Float64(-Float64(x / tan(B))));
                  	elseif (F <= 3.3e-139)
                  		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * Float64(F / B)));
                  	elseif (F <= 3100000.0)
                  		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B));
                  	else
                  		tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B));
                  	end
                  	return tmp
                  end
                  
                  code[F_, B_, x_] := If[LessEqual[F, -1.22e-23], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * -1.0 + (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 3.3e-139], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3100000.0], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;F \leq -1.22 \cdot 10^{-23}:\\
                  \;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, -1, -\frac{x}{\tan B}\right)\\
                  
                  \mathbf{elif}\;F \leq 3.3 \cdot 10^{-139}:\\
                  \;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\
                  
                  \mathbf{elif}\;F \leq 3100000:\\
                  \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 4 regimes
                  2. if F < -1.22000000000000007e-23

                    1. Initial program 60.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. Add Preprocessing
                    3. Step-by-step derivation
                      1. +-commutativeN/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                      2. clear-numN/A

                        \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                      3. associate-*l/N/A

                        \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                      4. div-invN/A

                        \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                      5. times-fracN/A

                        \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                      6. accelerator-lowering-fma.f64N/A

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{-1}, \mathsf{neg}\left(\frac{x}{\tan B}\right)\right) \]
                    6. Step-by-step derivation
                      1. Simplified96.3%

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

                      if -1.22000000000000007e-23 < F < 3.3e-139

                      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. Add Preprocessing
                      3. Taylor expanded in B around 0

                        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                        2. *-lowering-*.f64N/A

                          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                        3. sqrt-lowering-sqrt.f64N/A

                          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                        4. /-lowering-/.f64N/A

                          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                        5. +-commutativeN/A

                          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                        6. associate-+l+N/A

                          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}} \cdot \frac{F}{B} \]
                        7. *-commutativeN/A

                          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}} \cdot \frac{F}{B} \]
                        8. +-commutativeN/A

                          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                        9. accelerator-lowering-fma.f64N/A

                          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                        10. +-commutativeN/A

                          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}} \cdot \frac{F}{B} \]
                        11. unpow2N/A

                          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}} \cdot \frac{F}{B} \]
                        12. accelerator-lowering-fma.f64N/A

                          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}} \cdot \frac{F}{B} \]
                        13. /-lowering-/.f6488.6

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

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

                      if 3.3e-139 < F < 3.1e6

                      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. Add Preprocessing
                      3. Step-by-step derivation
                        1. +-commutativeN/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                        2. clear-numN/A

                          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                        3. associate-*l/N/A

                          \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                        4. div-invN/A

                          \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                        5. times-fracN/A

                          \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                        6. accelerator-lowering-fma.f64N/A

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, -\frac{x}{\tan B}\right)} \]
                      5. Step-by-step derivation
                        1. unsub-negN/A

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

                          \[\leadsto \frac{1}{\sin B} \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                        3. associate-*l/N/A

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

                          \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}} \]
                        5. clear-numN/A

                          \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \color{blue}{\frac{\cos B}{\sin B}} \]
                        6. associate-/l*N/A

                          \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                        7. sub-divN/A

                          \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                        8. /-lowering-/.f64N/A

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

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

                        \[\leadsto \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \color{blue}{x}}{\sin B} \]
                      8. Step-by-step derivation
                        1. Simplified92.3%

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

                        if 3.1e6 < F

                        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. Add Preprocessing
                        3. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                          2. clear-numN/A

                            \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                          3. associate-*l/N/A

                            \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                          4. div-invN/A

                            \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                          5. times-fracN/A

                            \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                          6. accelerator-lowering-fma.f64N/A

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, -\frac{x}{\tan B}\right)} \]
                        5. Step-by-step derivation
                          1. unsub-negN/A

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

                            \[\leadsto \frac{1}{\sin B} \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                          3. associate-*l/N/A

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

                            \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}} \]
                          5. clear-numN/A

                            \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \color{blue}{\frac{\cos B}{\sin B}} \]
                          6. associate-/l*N/A

                            \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                          7. sub-divN/A

                            \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                          8. /-lowering-/.f64N/A

                            \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                        6. Applied egg-rr72.7%

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

                          \[\leadsto \color{blue}{\frac{1 - x \cdot \cos B}{\sin B}} \]
                        8. Step-by-step derivation
                          1. /-lowering-/.f64N/A

                            \[\leadsto \color{blue}{\frac{1 - x \cdot \cos B}{\sin B}} \]
                          2. --lowering--.f64N/A

                            \[\leadsto \frac{\color{blue}{1 - x \cdot \cos B}}{\sin B} \]
                          3. *-lowering-*.f64N/A

                            \[\leadsto \frac{1 - \color{blue}{x \cdot \cos B}}{\sin B} \]
                          4. cos-lowering-cos.f64N/A

                            \[\leadsto \frac{1 - x \cdot \color{blue}{\cos B}}{\sin B} \]
                          5. sin-lowering-sin.f6499.7

                            \[\leadsto \frac{1 - x \cdot \cos B}{\color{blue}{\sin B}} \]
                        9. Simplified99.7%

                          \[\leadsto \color{blue}{\frac{1 - x \cdot \cos B}{\sin B}} \]
                      9. Recombined 4 regimes into one program.
                      10. Final simplification94.2%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.22 \cdot 10^{-23}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, -1, -\frac{x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 3.3 \cdot 10^{-139}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 3100000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \]
                      11. Add Preprocessing

                      Alternative 6: 92.4% accurate, 1.5× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.3 \cdot 10^{-25}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\cos B, -x, -1\right)}{\sin B}\\ \mathbf{elif}\;F \leq 4.3 \cdot 10^{-138}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 860000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \end{array} \]
                      (FPCore (F B x)
                       :precision binary64
                       (if (<= F -3.3e-25)
                         (/ (fma (cos B) (- x) -1.0) (sin B))
                         (if (<= F 4.3e-138)
                           (+
                            (* x (/ -1.0 (tan B)))
                            (* (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (/ F B)))
                           (if (<= F 860000.0)
                             (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) (sin B))
                             (/ (- 1.0 (* x (cos B))) (sin B))))))
                      double code(double F, double B, double x) {
                      	double tmp;
                      	if (F <= -3.3e-25) {
                      		tmp = fma(cos(B), -x, -1.0) / sin(B);
                      	} else if (F <= 4.3e-138) {
                      		tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * (F / B));
                      	} else if (F <= 860000.0) {
                      		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B);
                      	} else {
                      		tmp = (1.0 - (x * cos(B))) / sin(B);
                      	}
                      	return tmp;
                      }
                      
                      function code(F, B, x)
                      	tmp = 0.0
                      	if (F <= -3.3e-25)
                      		tmp = Float64(fma(cos(B), Float64(-x), -1.0) / sin(B));
                      	elseif (F <= 4.3e-138)
                      		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * Float64(F / B)));
                      	elseif (F <= 860000.0)
                      		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B));
                      	else
                      		tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B));
                      	end
                      	return tmp
                      end
                      
                      code[F_, B_, x_] := If[LessEqual[F, -3.3e-25], N[(N[(N[Cos[B], $MachinePrecision] * (-x) + -1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e-138], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 860000.0], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;F \leq -3.3 \cdot 10^{-25}:\\
                      \;\;\;\;\frac{\mathsf{fma}\left(\cos B, -x, -1\right)}{\sin B}\\
                      
                      \mathbf{elif}\;F \leq 4.3 \cdot 10^{-138}:\\
                      \;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\
                      
                      \mathbf{elif}\;F \leq 860000:\\
                      \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 4 regimes
                      2. if F < -3.2999999999999998e-25

                        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. Add Preprocessing
                        3. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                          2. clear-numN/A

                            \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                          3. associate-*l/N/A

                            \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                          4. div-invN/A

                            \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                          5. times-fracN/A

                            \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                          6. accelerator-lowering-fma.f64N/A

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, -\frac{x}{\tan B}\right)} \]
                        5. Step-by-step derivation
                          1. unsub-negN/A

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

                            \[\leadsto \frac{1}{\sin B} \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                          3. associate-*l/N/A

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

                            \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}} \]
                          5. clear-numN/A

                            \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \color{blue}{\frac{\cos B}{\sin B}} \]
                          6. associate-/l*N/A

                            \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                          7. sub-divN/A

                            \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                          8. /-lowering-/.f64N/A

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

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

                          \[\leadsto \color{blue}{-1 \cdot \frac{1 + x \cdot \cos B}{\sin B}} \]
                        8. Step-by-step derivation
                          1. associate-*r/N/A

                            \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x \cdot \cos B\right)}{\sin B}} \]
                          2. mul-1-negN/A

                            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x \cdot \cos B\right)\right)}}{\sin B} \]
                          3. /-lowering-/.f64N/A

                            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x \cdot \cos B\right)\right)}{\sin B}} \]
                          4. +-commutativeN/A

                            \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(x \cdot \cos B + 1\right)}\right)}{\sin B} \]
                          5. distribute-neg-inN/A

                            \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(x \cdot \cos B\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}}{\sin B} \]
                          6. *-commutativeN/A

                            \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\cos B \cdot x}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}{\sin B} \]
                          7. distribute-rgt-neg-inN/A

                            \[\leadsto \frac{\color{blue}{\cos B \cdot \left(\mathsf{neg}\left(x\right)\right)} + \left(\mathsf{neg}\left(1\right)\right)}{\sin B} \]
                          8. metadata-evalN/A

                            \[\leadsto \frac{\cos B \cdot \left(\mathsf{neg}\left(x\right)\right) + \color{blue}{-1}}{\sin B} \]
                          9. accelerator-lowering-fma.f64N/A

                            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\cos B, \mathsf{neg}\left(x\right), -1\right)}}{\sin B} \]
                          10. cos-lowering-cos.f64N/A

                            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\cos B}, \mathsf{neg}\left(x\right), -1\right)}{\sin B} \]
                          11. neg-lowering-neg.f64N/A

                            \[\leadsto \frac{\mathsf{fma}\left(\cos B, \color{blue}{\mathsf{neg}\left(x\right)}, -1\right)}{\sin B} \]
                          12. sin-lowering-sin.f6496.2

                            \[\leadsto \frac{\mathsf{fma}\left(\cos B, -x, -1\right)}{\color{blue}{\sin B}} \]
                        9. Simplified96.2%

                          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\cos B, -x, -1\right)}{\sin B}} \]

                        if -3.2999999999999998e-25 < F < 4.3e-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. Add Preprocessing
                        3. Taylor expanded in B around 0

                          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                        4. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                          2. *-lowering-*.f64N/A

                            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                          3. sqrt-lowering-sqrt.f64N/A

                            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                          4. /-lowering-/.f64N/A

                            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                          5. +-commutativeN/A

                            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                          6. associate-+l+N/A

                            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}} \cdot \frac{F}{B} \]
                          7. *-commutativeN/A

                            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}} \cdot \frac{F}{B} \]
                          8. +-commutativeN/A

                            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                          9. accelerator-lowering-fma.f64N/A

                            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                          10. +-commutativeN/A

                            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}} \cdot \frac{F}{B} \]
                          11. unpow2N/A

                            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}} \cdot \frac{F}{B} \]
                          12. accelerator-lowering-fma.f64N/A

                            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}} \cdot \frac{F}{B} \]
                          13. /-lowering-/.f6488.5

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

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

                        if 4.3e-138 < F < 8.6e5

                        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. Add Preprocessing
                        3. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                          2. clear-numN/A

                            \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                          3. associate-*l/N/A

                            \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                          4. div-invN/A

                            \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                          5. times-fracN/A

                            \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                          6. accelerator-lowering-fma.f64N/A

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, -\frac{x}{\tan B}\right)} \]
                        5. Step-by-step derivation
                          1. unsub-negN/A

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

                            \[\leadsto \frac{1}{\sin B} \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                          3. associate-*l/N/A

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

                            \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}} \]
                          5. clear-numN/A

                            \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \color{blue}{\frac{\cos B}{\sin B}} \]
                          6. associate-/l*N/A

                            \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                          7. sub-divN/A

                            \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                          8. /-lowering-/.f64N/A

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

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

                          \[\leadsto \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \color{blue}{x}}{\sin B} \]
                        8. Step-by-step derivation
                          1. Simplified92.3%

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

                          if 8.6e5 < F

                          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. Add Preprocessing
                          3. Step-by-step derivation
                            1. +-commutativeN/A

                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                            2. clear-numN/A

                              \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                            3. associate-*l/N/A

                              \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                            4. div-invN/A

                              \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                            5. times-fracN/A

                              \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                            6. accelerator-lowering-fma.f64N/A

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

                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, -\frac{x}{\tan B}\right)} \]
                          5. Step-by-step derivation
                            1. unsub-negN/A

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

                              \[\leadsto \frac{1}{\sin B} \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                            3. associate-*l/N/A

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

                              \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}} \]
                            5. clear-numN/A

                              \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \color{blue}{\frac{\cos B}{\sin B}} \]
                            6. associate-/l*N/A

                              \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                            7. sub-divN/A

                              \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                            8. /-lowering-/.f64N/A

                              \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                          6. Applied egg-rr72.7%

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

                            \[\leadsto \color{blue}{\frac{1 - x \cdot \cos B}{\sin B}} \]
                          8. Step-by-step derivation
                            1. /-lowering-/.f64N/A

                              \[\leadsto \color{blue}{\frac{1 - x \cdot \cos B}{\sin B}} \]
                            2. --lowering--.f64N/A

                              \[\leadsto \frac{\color{blue}{1 - x \cdot \cos B}}{\sin B} \]
                            3. *-lowering-*.f64N/A

                              \[\leadsto \frac{1 - \color{blue}{x \cdot \cos B}}{\sin B} \]
                            4. cos-lowering-cos.f64N/A

                              \[\leadsto \frac{1 - x \cdot \color{blue}{\cos B}}{\sin B} \]
                            5. sin-lowering-sin.f6499.7

                              \[\leadsto \frac{1 - x \cdot \cos B}{\color{blue}{\sin B}} \]
                          9. Simplified99.7%

                            \[\leadsto \color{blue}{\frac{1 - x \cdot \cos B}{\sin B}} \]
                        9. Recombined 4 regimes into one program.
                        10. Final simplification94.2%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.3 \cdot 10^{-25}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\cos B, -x, -1\right)}{\sin B}\\ \mathbf{elif}\;F \leq 4.3 \cdot 10^{-138}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 860000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \]
                        11. Add Preprocessing

                        Alternative 7: 76.8% accurate, 1.6× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{-43}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-82}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \end{array} \end{array} \]
                        (FPCore (F B x)
                         :precision binary64
                         (if (<= x -7.5e-43)
                           (* (cos B) (/ (- x) (sin B)))
                           (if (<= x 2e-82)
                             (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) (sin B))
                             (- (/ x (tan B))))))
                        double code(double F, double B, double x) {
                        	double tmp;
                        	if (x <= -7.5e-43) {
                        		tmp = cos(B) * (-x / sin(B));
                        	} else if (x <= 2e-82) {
                        		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B);
                        	} else {
                        		tmp = -(x / tan(B));
                        	}
                        	return tmp;
                        }
                        
                        function code(F, B, x)
                        	tmp = 0.0
                        	if (x <= -7.5e-43)
                        		tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B)));
                        	elseif (x <= 2e-82)
                        		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B));
                        	else
                        		tmp = Float64(-Float64(x / tan(B)));
                        	end
                        	return tmp
                        end
                        
                        code[F_, B_, x_] := If[LessEqual[x, -7.5e-43], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e-82], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;x \leq -7.5 \cdot 10^{-43}:\\
                        \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
                        
                        \mathbf{elif}\;x \leq 2 \cdot 10^{-82}:\\
                        \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;-\frac{x}{\tan B}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if x < -7.50000000000000068e-43

                          1. Initial program 64.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. Add Preprocessing
                          3. Taylor expanded in x around inf

                            \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                          4. Step-by-step derivation
                            1. mul-1-negN/A

                              \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                            2. neg-lowering-neg.f64N/A

                              \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                            3. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{x \cdot \cos B}{\sin B}}\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{neg}\left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right) \]
                            5. cos-lowering-cos.f64N/A

                              \[\leadsto \mathsf{neg}\left(\frac{x \cdot \color{blue}{\cos B}}{\sin B}\right) \]
                            6. sin-lowering-sin.f6479.6

                              \[\leadsto -\frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                          5. Simplified79.6%

                            \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
                          6. Step-by-step derivation
                            1. clear-numN/A

                              \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                            2. distribute-neg-frac2N/A

                              \[\leadsto \color{blue}{\frac{1}{\mathsf{neg}\left(\frac{\sin B}{x \cdot \cos B}\right)}} \]
                            3. associate-/l/N/A

                              \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}\right)} \]
                            4. tan-quotN/A

                              \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{\color{blue}{\tan B}}{x}\right)} \]
                            5. distribute-neg-frac2N/A

                              \[\leadsto \frac{1}{\color{blue}{\frac{\tan B}{\mathsf{neg}\left(x\right)}}} \]
                            6. clear-numN/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                            7. tan-quotN/A

                              \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{\frac{\sin B}{\cos B}}} \]
                            8. associate-/r/N/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\sin B} \cdot \cos B} \]
                            9. *-lowering-*.f64N/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\sin B} \cdot \cos B} \]
                            10. /-lowering-/.f64N/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\sin B}} \cdot \cos B \]
                            11. neg-lowering-neg.f64N/A

                              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{\sin B} \cdot \cos B \]
                            12. sin-lowering-sin.f64N/A

                              \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{\sin B}} \cdot \cos B \]
                            13. cos-lowering-cos.f6479.7

                              \[\leadsto \frac{-x}{\sin B} \cdot \color{blue}{\cos B} \]
                          7. Applied egg-rr79.7%

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

                          if -7.50000000000000068e-43 < x < 2e-82

                          1. Initial program 73.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. Add Preprocessing
                          3. Step-by-step derivation
                            1. +-commutativeN/A

                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                            2. clear-numN/A

                              \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                            3. associate-*l/N/A

                              \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                            4. div-invN/A

                              \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                            5. times-fracN/A

                              \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                            6. accelerator-lowering-fma.f64N/A

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

                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, -\frac{x}{\tan B}\right)} \]
                          5. Step-by-step derivation
                            1. unsub-negN/A

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

                              \[\leadsto \frac{1}{\sin B} \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                            3. associate-*l/N/A

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

                              \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}} \]
                            5. clear-numN/A

                              \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \color{blue}{\frac{\cos B}{\sin B}} \]
                            6. associate-/l*N/A

                              \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                            7. sub-divN/A

                              \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                            8. /-lowering-/.f64N/A

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

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

                            \[\leadsto \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \color{blue}{x}}{\sin B} \]
                          8. Step-by-step derivation
                            1. Simplified68.8%

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

                            if 2e-82 < x

                            1. Initial program 82.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. Add Preprocessing
                            3. Taylor expanded in x around inf

                              \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                            4. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                              2. neg-lowering-neg.f64N/A

                                \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                              3. /-lowering-/.f64N/A

                                \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{x \cdot \cos B}{\sin B}}\right) \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{neg}\left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right) \]
                              5. cos-lowering-cos.f64N/A

                                \[\leadsto \mathsf{neg}\left(\frac{x \cdot \color{blue}{\cos B}}{\sin B}\right) \]
                              6. sin-lowering-sin.f6490.4

                                \[\leadsto -\frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                            5. Simplified90.4%

                              \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
                            6. Step-by-step derivation
                              1. clear-numN/A

                                \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                              2. distribute-neg-frac2N/A

                                \[\leadsto \color{blue}{\frac{1}{\mathsf{neg}\left(\frac{\sin B}{x \cdot \cos B}\right)}} \]
                              3. associate-/l/N/A

                                \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}\right)} \]
                              4. tan-quotN/A

                                \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{\color{blue}{\tan B}}{x}\right)} \]
                              5. distribute-neg-frac2N/A

                                \[\leadsto \frac{1}{\color{blue}{\frac{\tan B}{\mathsf{neg}\left(x\right)}}} \]
                              6. clear-numN/A

                                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                              7. /-lowering-/.f64N/A

                                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                              8. neg-lowering-neg.f64N/A

                                \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{\tan B} \]
                              9. tan-lowering-tan.f6490.5

                                \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                            7. Applied egg-rr90.5%

                              \[\leadsto \color{blue}{\frac{-x}{\tan B}} \]
                          9. Recombined 3 regimes into one program.
                          10. Final simplification80.1%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{-43}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-82}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \end{array} \]
                          11. Add Preprocessing

                          Alternative 8: 76.8% accurate, 2.3× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := -\frac{x}{\tan B}\\ \mathbf{if}\;x \leq -3.5 \cdot 10^{-39}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-82}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                          (FPCore (F B x)
                           :precision binary64
                           (let* ((t_0 (- (/ x (tan B)))))
                             (if (<= x -3.5e-39)
                               t_0
                               (if (<= x 1.8e-82)
                                 (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) (sin B))
                                 t_0))))
                          double code(double F, double B, double x) {
                          	double t_0 = -(x / tan(B));
                          	double tmp;
                          	if (x <= -3.5e-39) {
                          		tmp = t_0;
                          	} else if (x <= 1.8e-82) {
                          		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B);
                          	} else {
                          		tmp = t_0;
                          	}
                          	return tmp;
                          }
                          
                          function code(F, B, x)
                          	t_0 = Float64(-Float64(x / tan(B)))
                          	tmp = 0.0
                          	if (x <= -3.5e-39)
                          		tmp = t_0;
                          	elseif (x <= 1.8e-82)
                          		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B));
                          	else
                          		tmp = t_0;
                          	end
                          	return tmp
                          end
                          
                          code[F_, B_, x_] := Block[{t$95$0 = (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])}, If[LessEqual[x, -3.5e-39], t$95$0, If[LessEqual[x, 1.8e-82], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_0 := -\frac{x}{\tan B}\\
                          \mathbf{if}\;x \leq -3.5 \cdot 10^{-39}:\\
                          \;\;\;\;t\_0\\
                          
                          \mathbf{elif}\;x \leq 1.8 \cdot 10^{-82}:\\
                          \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_0\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if x < -3.5e-39 or 1.79999999999999999e-82 < x

                            1. Initial program 77.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. Add Preprocessing
                            3. Taylor expanded in x around inf

                              \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                            4. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                              2. neg-lowering-neg.f64N/A

                                \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                              3. /-lowering-/.f64N/A

                                \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{x \cdot \cos B}{\sin B}}\right) \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{neg}\left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right) \]
                              5. cos-lowering-cos.f64N/A

                                \[\leadsto \mathsf{neg}\left(\frac{x \cdot \color{blue}{\cos B}}{\sin B}\right) \]
                              6. sin-lowering-sin.f6487.8

                                \[\leadsto -\frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                            5. Simplified87.8%

                              \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
                            6. Step-by-step derivation
                              1. clear-numN/A

                                \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                              2. distribute-neg-frac2N/A

                                \[\leadsto \color{blue}{\frac{1}{\mathsf{neg}\left(\frac{\sin B}{x \cdot \cos B}\right)}} \]
                              3. associate-/l/N/A

                                \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}\right)} \]
                              4. tan-quotN/A

                                \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{\color{blue}{\tan B}}{x}\right)} \]
                              5. distribute-neg-frac2N/A

                                \[\leadsto \frac{1}{\color{blue}{\frac{\tan B}{\mathsf{neg}\left(x\right)}}} \]
                              6. clear-numN/A

                                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                              7. /-lowering-/.f64N/A

                                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                              8. neg-lowering-neg.f64N/A

                                \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{\tan B} \]
                              9. tan-lowering-tan.f6487.9

                                \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                            7. Applied egg-rr87.9%

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

                            if -3.5e-39 < x < 1.79999999999999999e-82

                            1. Initial program 73.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. Add Preprocessing
                            3. Step-by-step derivation
                              1. +-commutativeN/A

                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                              2. clear-numN/A

                                \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                              3. associate-*l/N/A

                                \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                              4. div-invN/A

                                \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                              5. times-fracN/A

                                \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                              6. accelerator-lowering-fma.f64N/A

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

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, -\frac{x}{\tan B}\right)} \]
                            5. Step-by-step derivation
                              1. unsub-negN/A

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

                                \[\leadsto \frac{1}{\sin B} \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                              3. associate-*l/N/A

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

                                \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}} \]
                              5. clear-numN/A

                                \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \color{blue}{\frac{\cos B}{\sin B}} \]
                              6. associate-/l*N/A

                                \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                              7. sub-divN/A

                                \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                              8. /-lowering-/.f64N/A

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

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

                              \[\leadsto \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \color{blue}{x}}{\sin B} \]
                            8. Step-by-step derivation
                              1. Simplified68.8%

                                \[\leadsto \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \color{blue}{x}}{\sin B} \]
                            9. Recombined 2 regimes into one program.
                            10. Final simplification80.1%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{-39}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-82}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \end{array} \]
                            11. Add Preprocessing

                            Alternative 9: 71.9% accurate, 2.4× speedup?

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

                              1. Initial program 77.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. Add Preprocessing
                              3. Taylor expanded in x around inf

                                \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                              4. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                                2. neg-lowering-neg.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{x \cdot \cos B}{\sin B}}\right) \]
                                4. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right) \]
                                5. cos-lowering-cos.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\frac{x \cdot \color{blue}{\cos B}}{\sin B}\right) \]
                                6. sin-lowering-sin.f6485.4

                                  \[\leadsto -\frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                              5. Simplified85.4%

                                \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
                              6. Step-by-step derivation
                                1. clear-numN/A

                                  \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                                2. distribute-neg-frac2N/A

                                  \[\leadsto \color{blue}{\frac{1}{\mathsf{neg}\left(\frac{\sin B}{x \cdot \cos B}\right)}} \]
                                3. associate-/l/N/A

                                  \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}\right)} \]
                                4. tan-quotN/A

                                  \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{\color{blue}{\tan B}}{x}\right)} \]
                                5. distribute-neg-frac2N/A

                                  \[\leadsto \frac{1}{\color{blue}{\frac{\tan B}{\mathsf{neg}\left(x\right)}}} \]
                                6. clear-numN/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                                7. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                                8. neg-lowering-neg.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{\tan B} \]
                                9. tan-lowering-tan.f6485.5

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                              7. Applied egg-rr85.5%

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

                              if -6.2e-70 < x < 6.50000000000000022e-84

                              1. Initial program 74.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. Add Preprocessing
                              3. Step-by-step derivation
                                1. +-commutativeN/A

                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                2. clear-numN/A

                                  \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                                3. associate-*l/N/A

                                  \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                                4. div-invN/A

                                  \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                                5. times-fracN/A

                                  \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
                                6. accelerator-lowering-fma.f64N/A

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

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, -\frac{x}{\tan B}\right)} \]
                              5. Step-by-step derivation
                                1. unsub-negN/A

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

                                  \[\leadsto \frac{1}{\sin B} \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                3. associate-*l/N/A

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

                                  \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}} \]
                                5. clear-numN/A

                                  \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - x \cdot \color{blue}{\frac{\cos B}{\sin B}} \]
                                6. associate-/l*N/A

                                  \[\leadsto \frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}}}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                                7. sub-divN/A

                                  \[\leadsto \color{blue}{\frac{1 \cdot \frac{{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}}}{\frac{1}{F}} - x \cdot \cos B}{\sin B}} \]
                                8. /-lowering-/.f64N/A

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

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

                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
                              8. Step-by-step derivation
                                1. *-lowering-*.f64N/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
                                2. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \frac{F \cdot \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
                                4. +-commutativeN/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} \]
                                5. unpow2N/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} \]
                                6. accelerator-lowering-fma.f6459.8

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.2 \cdot 10^{-70}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-84}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 10: 71.8% accurate, 2.4× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_0 := -\frac{x}{\tan B}\\ \mathbf{if}\;x \leq -9.5 \cdot 10^{-67}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-86}:\\ \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (let* ((t_0 (- (/ x (tan B)))))
                               (if (<= x -9.5e-67)
                                 t_0
                                 (if (<= x 5.2e-86) (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0))))
                            double code(double F, double B, double x) {
                            	double t_0 = -(x / tan(B));
                            	double tmp;
                            	if (x <= -9.5e-67) {
                            		tmp = t_0;
                            	} else if (x <= 5.2e-86) {
                            		tmp = F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B));
                            	} else {
                            		tmp = t_0;
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	t_0 = Float64(-Float64(x / tan(B)))
                            	tmp = 0.0
                            	if (x <= -9.5e-67)
                            		tmp = t_0;
                            	elseif (x <= 5.2e-86)
                            		tmp = Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B)));
                            	else
                            		tmp = t_0;
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := Block[{t$95$0 = (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])}, If[LessEqual[x, -9.5e-67], t$95$0, If[LessEqual[x, 5.2e-86], N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_0 := -\frac{x}{\tan B}\\
                            \mathbf{if}\;x \leq -9.5 \cdot 10^{-67}:\\
                            \;\;\;\;t\_0\\
                            
                            \mathbf{elif}\;x \leq 5.2 \cdot 10^{-86}:\\
                            \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_0\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if x < -9.4999999999999994e-67 or 5.2000000000000002e-86 < x

                              1. Initial program 77.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. Add Preprocessing
                              3. Taylor expanded in x around inf

                                \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                              4. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                                2. neg-lowering-neg.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{x \cdot \cos B}{\sin B}}\right) \]
                                4. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right) \]
                                5. cos-lowering-cos.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\frac{x \cdot \color{blue}{\cos B}}{\sin B}\right) \]
                                6. sin-lowering-sin.f6485.4

                                  \[\leadsto -\frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                              5. Simplified85.4%

                                \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
                              6. Step-by-step derivation
                                1. clear-numN/A

                                  \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                                2. distribute-neg-frac2N/A

                                  \[\leadsto \color{blue}{\frac{1}{\mathsf{neg}\left(\frac{\sin B}{x \cdot \cos B}\right)}} \]
                                3. associate-/l/N/A

                                  \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}\right)} \]
                                4. tan-quotN/A

                                  \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{\color{blue}{\tan B}}{x}\right)} \]
                                5. distribute-neg-frac2N/A

                                  \[\leadsto \frac{1}{\color{blue}{\frac{\tan B}{\mathsf{neg}\left(x\right)}}} \]
                                6. clear-numN/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                                7. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                                8. neg-lowering-neg.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{\tan B} \]
                                9. tan-lowering-tan.f6485.5

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                              7. Applied egg-rr85.5%

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

                              if -9.4999999999999994e-67 < x < 5.2000000000000002e-86

                              1. Initial program 74.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. Add Preprocessing
                              3. Taylor expanded in x around 0

                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
                              4. Step-by-step derivation
                                1. associate-*l/N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} \]
                                2. associate-/l*N/A

                                  \[\leadsto \color{blue}{F \cdot \frac{\sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} \]
                                3. *-lowering-*.f64N/A

                                  \[\leadsto \color{blue}{F \cdot \frac{\sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} \]
                                4. /-lowering-/.f64N/A

                                  \[\leadsto F \cdot \color{blue}{\frac{\sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} \]
                                5. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
                                6. /-lowering-/.f64N/A

                                  \[\leadsto F \cdot \frac{\sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}}{\sin B} \]
                                7. +-commutativeN/A

                                  \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} \]
                                8. unpow2N/A

                                  \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} \]
                                9. accelerator-lowering-fma.f64N/A

                                  \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}}{\sin B} \]
                                10. sin-lowering-sin.f6459.8

                                  \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\color{blue}{\sin B}} \]
                              5. Simplified59.8%

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{-67}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-86}:\\ \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 11: 57.5% accurate, 2.5× speedup?

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

                              1. Initial program 70.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + \left(\frac{1}{3} \cdot x + {B}^{2} \cdot \left(-1 \cdot \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \left(\frac{-1}{36} \cdot F + \frac{1}{120} \cdot F\right)\right) + \left(\frac{-1}{9} \cdot x + \frac{2}{15} \cdot x\right)\right)\right)\right)\right) - x}{B}} \]
                              4. Simplified56.9%

                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.019444444444444445, F \cdot 0.16666666666666666\right), x \cdot \mathsf{fma}\left(0.022222222222222223, B \cdot B, 0.3333333333333333\right)\right), \mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)\right)}{B}} \]

                              if 0.062 < B

                              1. Initial program 91.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. Add Preprocessing
                              3. Taylor expanded in x around inf

                                \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                              4. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                                2. neg-lowering-neg.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{x \cdot \cos B}{\sin B}}\right) \]
                                4. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right) \]
                                5. cos-lowering-cos.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\frac{x \cdot \color{blue}{\cos B}}{\sin B}\right) \]
                                6. sin-lowering-sin.f6465.6

                                  \[\leadsto -\frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                              5. Simplified65.6%

                                \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
                              6. Step-by-step derivation
                                1. clear-numN/A

                                  \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                                2. distribute-neg-frac2N/A

                                  \[\leadsto \color{blue}{\frac{1}{\mathsf{neg}\left(\frac{\sin B}{x \cdot \cos B}\right)}} \]
                                3. associate-/l/N/A

                                  \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}\right)} \]
                                4. tan-quotN/A

                                  \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{\color{blue}{\tan B}}{x}\right)} \]
                                5. distribute-neg-frac2N/A

                                  \[\leadsto \frac{1}{\color{blue}{\frac{\tan B}{\mathsf{neg}\left(x\right)}}} \]
                                6. clear-numN/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                                7. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                                8. neg-lowering-neg.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{\tan B} \]
                                9. tan-lowering-tan.f6465.7

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                              7. Applied egg-rr65.7%

                                \[\leadsto \color{blue}{\frac{-x}{\tan B}} \]
                            3. Recombined 2 regimes into one program.
                            4. Final simplification59.2%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 0.062:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \mathsf{fma}\left(F \cdot \left(B \cdot B\right), 0.019444444444444445, F \cdot 0.16666666666666666\right), x \cdot \mathsf{fma}\left(0.022222222222222223, B \cdot B, 0.3333333333333333\right)\right), \mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 12: 57.5% accurate, 3.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 0.036:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right), 0.3333333333333333 \cdot \left(x \cdot \left(B \cdot B\right)\right) - x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= B 0.036)
                               (/
                                (fma
                                 (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0))))
                                 (fma 0.16666666666666666 (* F (* B B)) F)
                                 (- (* 0.3333333333333333 (* x (* B B))) x))
                                B)
                               (- (/ x (tan B)))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (B <= 0.036) {
                            		tmp = fma(sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))), fma(0.16666666666666666, (F * (B * B)), F), ((0.3333333333333333 * (x * (B * B))) - x)) / B;
                            	} else {
                            		tmp = -(x / tan(B));
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (B <= 0.036)
                            		tmp = Float64(fma(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))), fma(0.16666666666666666, Float64(F * Float64(B * B)), F), Float64(Float64(0.3333333333333333 * Float64(x * Float64(B * B))) - x)) / B);
                            	else
                            		tmp = Float64(-Float64(x / tan(B)));
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[B, 0.036], N[(N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.16666666666666666 * N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision] + F), $MachinePrecision] + N[(N[(0.3333333333333333 * N[(x * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;B \leq 0.036:\\
                            \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right), 0.3333333333333333 \cdot \left(x \cdot \left(B \cdot B\right)\right) - x\right)}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;-\frac{x}{\tan B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if B < 0.0359999999999999973

                              1. Initial program 70.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + \frac{1}{3} \cdot x\right)\right) - x}{B}} \]
                              4. Simplified56.9%

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

                              if 0.0359999999999999973 < B

                              1. Initial program 91.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. Add Preprocessing
                              3. Taylor expanded in x around inf

                                \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                              4. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                                2. neg-lowering-neg.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{x \cdot \cos B}{\sin B}}\right) \]
                                4. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right) \]
                                5. cos-lowering-cos.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\frac{x \cdot \color{blue}{\cos B}}{\sin B}\right) \]
                                6. sin-lowering-sin.f6465.6

                                  \[\leadsto -\frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                              5. Simplified65.6%

                                \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
                              6. Step-by-step derivation
                                1. clear-numN/A

                                  \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                                2. distribute-neg-frac2N/A

                                  \[\leadsto \color{blue}{\frac{1}{\mathsf{neg}\left(\frac{\sin B}{x \cdot \cos B}\right)}} \]
                                3. associate-/l/N/A

                                  \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}\right)} \]
                                4. tan-quotN/A

                                  \[\leadsto \frac{1}{\mathsf{neg}\left(\frac{\color{blue}{\tan B}}{x}\right)} \]
                                5. distribute-neg-frac2N/A

                                  \[\leadsto \frac{1}{\color{blue}{\frac{\tan B}{\mathsf{neg}\left(x\right)}}} \]
                                6. clear-numN/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                                7. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}} \]
                                8. neg-lowering-neg.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{\tan B} \]
                                9. tan-lowering-tan.f6465.7

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                              7. Applied egg-rr65.7%

                                \[\leadsto \color{blue}{\frac{-x}{\tan B}} \]
                            3. Recombined 2 regimes into one program.
                            4. Final simplification59.2%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 0.036:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right), 0.3333333333333333 \cdot \left(x \cdot \left(B \cdot B\right)\right) - x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 13: 51.9% accurate, 6.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\ \;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1 - x\right)}{B}\\ \mathbf{elif}\;F \leq 50000000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -3e-21)
                               (/ (fma 0.5 (/ (fma 2.0 x 2.0) (* F F)) (- -1.0 x)) B)
                               (if (<= F 50000000.0)
                                 (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
                                 (/ (- 1.0 x) B))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -3e-21) {
                            		tmp = fma(0.5, (fma(2.0, x, 2.0) / (F * F)), (-1.0 - x)) / B;
                            	} else if (F <= 50000000.0) {
                            		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -3e-21)
                            		tmp = Float64(fma(0.5, Float64(fma(2.0, x, 2.0) / Float64(F * F)), Float64(-1.0 - x)) / B);
                            	elseif (F <= 50000000.0)
                            		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B);
                            	else
                            		tmp = Float64(Float64(1.0 - x) / B);
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -3e-21], N[(N[(0.5 * N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 50000000.0], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\
                            \;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1 - x\right)}{B}\\
                            
                            \mathbf{elif}\;F \leq 50000000:\\
                            \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -2.99999999999999991e-21

                              1. Initial program 59.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6436.2

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified36.2%

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

                                \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}}{B} \]
                              7. Step-by-step derivation
                                1. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
                                2. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{2}, \frac{2 + 2 \cdot x}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{{F}^{2}}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                4. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                6. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                7. *-lowering-*.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                8. distribute-neg-inN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}\right)}{B} \]
                                9. metadata-evalN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)\right)}{B} \]
                                10. unsub-negN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1 - x}\right)}{B} \]
                                11. --lowering--.f6450.0

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

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

                              if -2.99999999999999991e-21 < F < 5e7

                              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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6449.7

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified49.7%

                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
                              6. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} + \left(\mathsf{neg}\left(x\right)\right)}{B}} \]
                              7. Applied egg-rr49.8%

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

                              if 5e7 < F

                              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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6439.5

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified39.5%

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

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                              7. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                                2. --lowering--.f6454.0

                                  \[\leadsto \frac{\color{blue}{1 - x}}{B} \]
                              8. Simplified54.0%

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                            3. Recombined 3 regimes into one program.
                            4. Add Preprocessing

                            Alternative 14: 51.9% accurate, 6.8× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\ \;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1 - x\right)}{B}\\ \mathbf{elif}\;F \leq 50000000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -3e-21)
                               (/ (fma 0.5 (/ (fma 2.0 x 2.0) (* F F)) (- -1.0 x)) B)
                               (if (<= F 50000000.0)
                                 (/ (- (/ F (sqrt (fma F F 2.0))) x) B)
                                 (/ (- 1.0 x) B))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -3e-21) {
                            		tmp = fma(0.5, (fma(2.0, x, 2.0) / (F * F)), (-1.0 - x)) / B;
                            	} else if (F <= 50000000.0) {
                            		tmp = ((F / sqrt(fma(F, F, 2.0))) - x) / B;
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -3e-21)
                            		tmp = Float64(fma(0.5, Float64(fma(2.0, x, 2.0) / Float64(F * F)), Float64(-1.0 - x)) / B);
                            	elseif (F <= 50000000.0)
                            		tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) - x) / B);
                            	else
                            		tmp = Float64(Float64(1.0 - x) / B);
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -3e-21], N[(N[(0.5 * N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 50000000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\
                            \;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1 - x\right)}{B}\\
                            
                            \mathbf{elif}\;F \leq 50000000:\\
                            \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - x}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -2.99999999999999991e-21

                              1. Initial program 59.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6436.2

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified36.2%

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

                                \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}}{B} \]
                              7. Step-by-step derivation
                                1. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
                                2. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{2}, \frac{2 + 2 \cdot x}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{{F}^{2}}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                4. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                6. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                7. *-lowering-*.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                8. distribute-neg-inN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}\right)}{B} \]
                                9. metadata-evalN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)\right)}{B} \]
                                10. unsub-negN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1 - x}\right)}{B} \]
                                11. --lowering--.f6450.0

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

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

                              if -2.99999999999999991e-21 < F < 5e7

                              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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6449.7

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified49.7%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                2. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f6449.2

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              8. Simplified49.2%

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              9. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{F \cdot F + 2}} + \left(\mathsf{neg}\left(x\right)\right)}{B}} \]
                                2. unsub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{F \cdot F + 2}} - x}}{B} \]
                                3. --lowering--.f64N/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{F \cdot F + 2}} - x}}{B} \]
                                4. sqrt-divN/A

                                  \[\leadsto \frac{F \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{F \cdot F + 2}}} - x}{B} \]
                                5. metadata-evalN/A

                                  \[\leadsto \frac{F \cdot \frac{\color{blue}{1}}{\sqrt{F \cdot F + 2}} - x}{B} \]
                                6. un-div-invN/A

                                  \[\leadsto \frac{\color{blue}{\frac{F}{\sqrt{F \cdot F + 2}}} - x}{B} \]
                                7. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{F}{\sqrt{F \cdot F + 2}}} - x}{B} \]
                                8. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\frac{F}{\color{blue}{\sqrt{F \cdot F + 2}}} - x}{B} \]
                                9. accelerator-lowering-fma.f6449.2

                                  \[\leadsto \frac{\frac{F}{\sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} - x}{B} \]
                              10. Applied egg-rr49.2%

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

                              if 5e7 < F

                              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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6439.5

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified39.5%

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

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                              7. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                                2. --lowering--.f6454.0

                                  \[\leadsto \frac{\color{blue}{1 - x}}{B} \]
                              8. Simplified54.0%

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                            3. Recombined 3 regimes into one program.
                            4. Add Preprocessing

                            Alternative 15: 52.2% accurate, 6.8× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\ \;\;\;\;\frac{\left(-1 - x\right) + \frac{1}{F \cdot F}}{B}\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+97}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -3e-21)
                               (/ (+ (- -1.0 x) (/ 1.0 (* F F))) B)
                               (if (<= F 2e+97) (/ (- (/ F (sqrt (fma F F 2.0))) x) B) (/ (- 1.0 x) B))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -3e-21) {
                            		tmp = ((-1.0 - x) + (1.0 / (F * F))) / B;
                            	} else if (F <= 2e+97) {
                            		tmp = ((F / sqrt(fma(F, F, 2.0))) - x) / B;
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -3e-21)
                            		tmp = Float64(Float64(Float64(-1.0 - x) + Float64(1.0 / Float64(F * F))) / B);
                            	elseif (F <= 2e+97)
                            		tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) - x) / B);
                            	else
                            		tmp = Float64(Float64(1.0 - x) / B);
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -3e-21], N[(N[(N[(-1.0 - x), $MachinePrecision] + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2e+97], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\
                            \;\;\;\;\frac{\left(-1 - x\right) + \frac{1}{F \cdot F}}{B}\\
                            
                            \mathbf{elif}\;F \leq 2 \cdot 10^{+97}:\\
                            \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - x}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -2.99999999999999991e-21

                              1. Initial program 59.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6436.2

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified36.2%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                2. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f6436.2

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              8. Simplified36.2%

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

                                \[\leadsto \frac{\color{blue}{\frac{1}{{F}^{2}} - \left(1 + x\right)}}{B} \]
                              10. Step-by-step derivation
                                1. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{\frac{1}{{F}^{2}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
                                2. +-lowering-+.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{1}{{F}^{2}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{1}{{F}^{2}}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\frac{1}{\color{blue}{F \cdot F}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                5. *-lowering-*.f64N/A

                                  \[\leadsto \frac{\frac{1}{\color{blue}{F \cdot F}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                6. distribute-neg-inN/A

                                  \[\leadsto \frac{\frac{1}{F \cdot F} + \color{blue}{\left(\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)\right)}}{B} \]
                                7. metadata-evalN/A

                                  \[\leadsto \frac{\frac{1}{F \cdot F} + \left(\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)\right)}{B} \]
                                8. unsub-negN/A

                                  \[\leadsto \frac{\frac{1}{F \cdot F} + \color{blue}{\left(-1 - x\right)}}{B} \]
                                9. --lowering--.f6449.9

                                  \[\leadsto \frac{\frac{1}{F \cdot F} + \color{blue}{\left(-1 - x\right)}}{B} \]
                              11. Simplified49.9%

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

                              if -2.99999999999999991e-21 < F < 2.0000000000000001e97

                              1. Initial program 97.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6450.8

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified50.8%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                2. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f6450.4

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              8. Simplified50.4%

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              9. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{F \cdot F + 2}} + \left(\mathsf{neg}\left(x\right)\right)}{B}} \]
                                2. unsub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{F \cdot F + 2}} - x}}{B} \]
                                3. --lowering--.f64N/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{F \cdot F + 2}} - x}}{B} \]
                                4. sqrt-divN/A

                                  \[\leadsto \frac{F \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{F \cdot F + 2}}} - x}{B} \]
                                5. metadata-evalN/A

                                  \[\leadsto \frac{F \cdot \frac{\color{blue}{1}}{\sqrt{F \cdot F + 2}} - x}{B} \]
                                6. un-div-invN/A

                                  \[\leadsto \frac{\color{blue}{\frac{F}{\sqrt{F \cdot F + 2}}} - x}{B} \]
                                7. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{F}{\sqrt{F \cdot F + 2}}} - x}{B} \]
                                8. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\frac{F}{\color{blue}{\sqrt{F \cdot F + 2}}} - x}{B} \]
                                9. accelerator-lowering-fma.f6450.4

                                  \[\leadsto \frac{\frac{F}{\sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} - x}{B} \]
                              10. Applied egg-rr50.4%

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

                              if 2.0000000000000001e97 < F

                              1. Initial program 44.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6432.5

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified32.5%

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

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                              7. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                                2. --lowering--.f6452.8

                                  \[\leadsto \frac{\color{blue}{1 - x}}{B} \]
                              8. Simplified52.8%

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                            3. Recombined 3 regimes into one program.
                            4. Final simplification50.7%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\ \;\;\;\;\frac{\left(-1 - x\right) + \frac{1}{F \cdot F}}{B}\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+97}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 16: 52.1% accurate, 6.9× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.75 \cdot 10^{-20}:\\ \;\;\;\;\frac{\left(-1 - x\right) + \frac{1}{F \cdot F}}{B}\\ \mathbf{elif}\;F \leq 1.3:\\ \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\mathsf{fma}\left(F \cdot F, -0.25, 0.5\right)}, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(1 - x\right) + \frac{-1}{F \cdot F}}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -1.75e-20)
                               (/ (+ (- -1.0 x) (/ 1.0 (* F F))) B)
                               (if (<= F 1.3)
                                 (/ (fma F (sqrt (fma (* F F) -0.25 0.5)) (- x)) B)
                                 (/ (+ (- 1.0 x) (/ -1.0 (* F F))) B))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -1.75e-20) {
                            		tmp = ((-1.0 - x) + (1.0 / (F * F))) / B;
                            	} else if (F <= 1.3) {
                            		tmp = fma(F, sqrt(fma((F * F), -0.25, 0.5)), -x) / B;
                            	} else {
                            		tmp = ((1.0 - x) + (-1.0 / (F * F))) / B;
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -1.75e-20)
                            		tmp = Float64(Float64(Float64(-1.0 - x) + Float64(1.0 / Float64(F * F))) / B);
                            	elseif (F <= 1.3)
                            		tmp = Float64(fma(F, sqrt(fma(Float64(F * F), -0.25, 0.5)), Float64(-x)) / B);
                            	else
                            		tmp = Float64(Float64(Float64(1.0 - x) + Float64(-1.0 / Float64(F * F))) / B);
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -1.75e-20], N[(N[(N[(-1.0 - x), $MachinePrecision] + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.3], N[(N[(F * N[Sqrt[N[(N[(F * F), $MachinePrecision] * -0.25 + 0.5), $MachinePrecision]], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] + N[(-1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -1.75 \cdot 10^{-20}:\\
                            \;\;\;\;\frac{\left(-1 - x\right) + \frac{1}{F \cdot F}}{B}\\
                            
                            \mathbf{elif}\;F \leq 1.3:\\
                            \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\mathsf{fma}\left(F \cdot F, -0.25, 0.5\right)}, -x\right)}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{\left(1 - x\right) + \frac{-1}{F \cdot F}}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -1.75000000000000002e-20

                              1. Initial program 59.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6436.7

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified36.7%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                2. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f6436.7

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              8. Simplified36.7%

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

                                \[\leadsto \frac{\color{blue}{\frac{1}{{F}^{2}} - \left(1 + x\right)}}{B} \]
                              10. Step-by-step derivation
                                1. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{\frac{1}{{F}^{2}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
                                2. +-lowering-+.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{1}{{F}^{2}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{1}{{F}^{2}}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\frac{1}{\color{blue}{F \cdot F}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                5. *-lowering-*.f64N/A

                                  \[\leadsto \frac{\frac{1}{\color{blue}{F \cdot F}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                6. distribute-neg-inN/A

                                  \[\leadsto \frac{\frac{1}{F \cdot F} + \color{blue}{\left(\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)\right)}}{B} \]
                                7. metadata-evalN/A

                                  \[\leadsto \frac{\frac{1}{F \cdot F} + \left(\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)\right)}{B} \]
                                8. unsub-negN/A

                                  \[\leadsto \frac{\frac{1}{F \cdot F} + \color{blue}{\left(-1 - x\right)}}{B} \]
                                9. --lowering--.f6450.6

                                  \[\leadsto \frac{\frac{1}{F \cdot F} + \color{blue}{\left(-1 - x\right)}}{B} \]
                              11. Simplified50.6%

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

                              if -1.75000000000000002e-20 < F < 1.30000000000000004

                              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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6448.8

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified48.8%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                2. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f6448.3

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              8. Simplified48.3%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2} + \frac{-1}{4} \cdot {F}^{2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              10. Step-by-step derivation
                                1. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{-1}{4} \cdot {F}^{2} + \frac{1}{2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                2. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{{F}^{2} \cdot \frac{-1}{4}} + \frac{1}{2}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\mathsf{fma}\left({F}^{2}, \frac{-1}{4}, \frac{1}{2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\mathsf{fma}\left(\color{blue}{F \cdot F}, \frac{-1}{4}, \frac{1}{2}\right)}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. *-lowering-*.f6448.3

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\mathsf{fma}\left(\color{blue}{F \cdot F}, -0.25, 0.5\right)}, -x\right)}{B} \]
                              11. Simplified48.3%

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\mathsf{fma}\left(F \cdot F, -0.25, 0.5\right)}}, -x\right)}{B} \]

                              if 1.30000000000000004 < F

                              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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6440.4

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified40.4%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                2. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f6440.4

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              8. Simplified40.4%

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

                                \[\leadsto \frac{\color{blue}{1 - \left(x + \frac{1}{{F}^{2}}\right)}}{B} \]
                              10. Step-by-step derivation
                                1. associate--r+N/A

                                  \[\leadsto \frac{\color{blue}{\left(1 - x\right) - \frac{1}{{F}^{2}}}}{B} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{\left(1 - x\right) + \left(\mathsf{neg}\left(\frac{1}{{F}^{2}}\right)\right)}}{B} \]
                                3. +-lowering-+.f64N/A

                                  \[\leadsto \frac{\color{blue}{\left(1 - x\right) + \left(\mathsf{neg}\left(\frac{1}{{F}^{2}}\right)\right)}}{B} \]
                                4. --lowering--.f64N/A

                                  \[\leadsto \frac{\color{blue}{\left(1 - x\right)} + \left(\mathsf{neg}\left(\frac{1}{{F}^{2}}\right)\right)}{B} \]
                                5. distribute-neg-fracN/A

                                  \[\leadsto \frac{\left(1 - x\right) + \color{blue}{\frac{\mathsf{neg}\left(1\right)}{{F}^{2}}}}{B} \]
                                6. metadata-evalN/A

                                  \[\leadsto \frac{\left(1 - x\right) + \frac{\color{blue}{-1}}{{F}^{2}}}{B} \]
                                7. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\left(1 - x\right) + \color{blue}{\frac{-1}{{F}^{2}}}}{B} \]
                                8. unpow2N/A

                                  \[\leadsto \frac{\left(1 - x\right) + \frac{-1}{\color{blue}{F \cdot F}}}{B} \]
                                9. *-lowering-*.f6454.6

                                  \[\leadsto \frac{\left(1 - x\right) + \frac{-1}{\color{blue}{F \cdot F}}}{B} \]
                              11. Simplified54.6%

                                \[\leadsto \frac{\color{blue}{\left(1 - x\right) + \frac{-1}{F \cdot F}}}{B} \]
                            3. Recombined 3 regimes into one program.
                            4. Final simplification50.7%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.75 \cdot 10^{-20}:\\ \;\;\;\;\frac{\left(-1 - x\right) + \frac{1}{F \cdot F}}{B}\\ \mathbf{elif}\;F \leq 1.3:\\ \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\mathsf{fma}\left(F \cdot F, -0.25, 0.5\right)}, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(1 - x\right) + \frac{-1}{F \cdot F}}{B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 17: 52.1% accurate, 8.0× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\ \;\;\;\;\frac{\left(-1 - x\right) + \frac{1}{F \cdot F}}{B}\\ \mathbf{elif}\;F \leq 1.45:\\ \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{0.5}, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(1 - x\right) + \frac{-1}{F \cdot F}}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -3e-21)
                               (/ (+ (- -1.0 x) (/ 1.0 (* F F))) B)
                               (if (<= F 1.45)
                                 (/ (fma F (sqrt 0.5) (- x)) B)
                                 (/ (+ (- 1.0 x) (/ -1.0 (* F F))) B))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -3e-21) {
                            		tmp = ((-1.0 - x) + (1.0 / (F * F))) / B;
                            	} else if (F <= 1.45) {
                            		tmp = fma(F, sqrt(0.5), -x) / B;
                            	} else {
                            		tmp = ((1.0 - x) + (-1.0 / (F * F))) / B;
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -3e-21)
                            		tmp = Float64(Float64(Float64(-1.0 - x) + Float64(1.0 / Float64(F * F))) / B);
                            	elseif (F <= 1.45)
                            		tmp = Float64(fma(F, sqrt(0.5), Float64(-x)) / B);
                            	else
                            		tmp = Float64(Float64(Float64(1.0 - x) + Float64(-1.0 / Float64(F * F))) / B);
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -3e-21], N[(N[(N[(-1.0 - x), $MachinePrecision] + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(F * N[Sqrt[0.5], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] + N[(-1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\
                            \;\;\;\;\frac{\left(-1 - x\right) + \frac{1}{F \cdot F}}{B}\\
                            
                            \mathbf{elif}\;F \leq 1.45:\\
                            \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{0.5}, -x\right)}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{\left(1 - x\right) + \frac{-1}{F \cdot F}}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -2.99999999999999991e-21

                              1. Initial program 59.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6436.2

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified36.2%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                2. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f6436.2

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              8. Simplified36.2%

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

                                \[\leadsto \frac{\color{blue}{\frac{1}{{F}^{2}} - \left(1 + x\right)}}{B} \]
                              10. Step-by-step derivation
                                1. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{\frac{1}{{F}^{2}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
                                2. +-lowering-+.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{1}{{F}^{2}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{1}{{F}^{2}}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\frac{1}{\color{blue}{F \cdot F}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                5. *-lowering-*.f64N/A

                                  \[\leadsto \frac{\frac{1}{\color{blue}{F \cdot F}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
                                6. distribute-neg-inN/A

                                  \[\leadsto \frac{\frac{1}{F \cdot F} + \color{blue}{\left(\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)\right)}}{B} \]
                                7. metadata-evalN/A

                                  \[\leadsto \frac{\frac{1}{F \cdot F} + \left(\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)\right)}{B} \]
                                8. unsub-negN/A

                                  \[\leadsto \frac{\frac{1}{F \cdot F} + \color{blue}{\left(-1 - x\right)}}{B} \]
                                9. --lowering--.f6449.9

                                  \[\leadsto \frac{\frac{1}{F \cdot F} + \color{blue}{\left(-1 - x\right)}}{B} \]
                              11. Simplified49.9%

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

                              if -2.99999999999999991e-21 < F < 1.44999999999999996

                              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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6449.2

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified49.2%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                2. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f6448.7

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              8. Simplified48.7%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              10. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f6448.7

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{0.5}}, -x\right)}{B} \]
                              11. Simplified48.7%

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

                              if 1.44999999999999996 < F

                              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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6440.4

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified40.4%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                2. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f6440.4

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              8. Simplified40.4%

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

                                \[\leadsto \frac{\color{blue}{1 - \left(x + \frac{1}{{F}^{2}}\right)}}{B} \]
                              10. Step-by-step derivation
                                1. associate--r+N/A

                                  \[\leadsto \frac{\color{blue}{\left(1 - x\right) - \frac{1}{{F}^{2}}}}{B} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{\left(1 - x\right) + \left(\mathsf{neg}\left(\frac{1}{{F}^{2}}\right)\right)}}{B} \]
                                3. +-lowering-+.f64N/A

                                  \[\leadsto \frac{\color{blue}{\left(1 - x\right) + \left(\mathsf{neg}\left(\frac{1}{{F}^{2}}\right)\right)}}{B} \]
                                4. --lowering--.f64N/A

                                  \[\leadsto \frac{\color{blue}{\left(1 - x\right)} + \left(\mathsf{neg}\left(\frac{1}{{F}^{2}}\right)\right)}{B} \]
                                5. distribute-neg-fracN/A

                                  \[\leadsto \frac{\left(1 - x\right) + \color{blue}{\frac{\mathsf{neg}\left(1\right)}{{F}^{2}}}}{B} \]
                                6. metadata-evalN/A

                                  \[\leadsto \frac{\left(1 - x\right) + \frac{\color{blue}{-1}}{{F}^{2}}}{B} \]
                                7. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\left(1 - x\right) + \color{blue}{\frac{-1}{{F}^{2}}}}{B} \]
                                8. unpow2N/A

                                  \[\leadsto \frac{\left(1 - x\right) + \frac{-1}{\color{blue}{F \cdot F}}}{B} \]
                                9. *-lowering-*.f6454.6

                                  \[\leadsto \frac{\left(1 - x\right) + \frac{-1}{\color{blue}{F \cdot F}}}{B} \]
                              11. Simplified54.6%

                                \[\leadsto \frac{\color{blue}{\left(1 - x\right) + \frac{-1}{F \cdot F}}}{B} \]
                            3. Recombined 3 regimes into one program.
                            4. Final simplification50.7%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\ \;\;\;\;\frac{\left(-1 - x\right) + \frac{1}{F \cdot F}}{B}\\ \mathbf{elif}\;F \leq 1.45:\\ \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{0.5}, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(1 - x\right) + \frac{-1}{F \cdot F}}{B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 18: 52.1% accurate, 8.0× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.22 \cdot 10^{-23}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.46:\\ \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{0.5}, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(1 - x\right) + \frac{-1}{F \cdot F}}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -1.22e-23)
                               (/ (- -1.0 x) B)
                               (if (<= F 1.46)
                                 (/ (fma F (sqrt 0.5) (- x)) B)
                                 (/ (+ (- 1.0 x) (/ -1.0 (* F F))) B))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -1.22e-23) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= 1.46) {
                            		tmp = fma(F, sqrt(0.5), -x) / B;
                            	} else {
                            		tmp = ((1.0 - x) + (-1.0 / (F * F))) / B;
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -1.22e-23)
                            		tmp = Float64(Float64(-1.0 - x) / B);
                            	elseif (F <= 1.46)
                            		tmp = Float64(fma(F, sqrt(0.5), Float64(-x)) / B);
                            	else
                            		tmp = Float64(Float64(Float64(1.0 - x) + Float64(-1.0 / Float64(F * F))) / B);
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -1.22e-23], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.46], N[(N[(F * N[Sqrt[0.5], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] + N[(-1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -1.22 \cdot 10^{-23}:\\
                            \;\;\;\;\frac{-1 - x}{B}\\
                            
                            \mathbf{elif}\;F \leq 1.46:\\
                            \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{0.5}, -x\right)}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{\left(1 - x\right) + \frac{-1}{F \cdot F}}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -1.22000000000000007e-23

                              1. Initial program 60.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6435.8

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified35.8%

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

                                \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
                              7. Step-by-step derivation
                                1. associate-*r/N/A

                                  \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
                                2. mul-1-negN/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
                                4. distribute-neg-inN/A

                                  \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                5. metadata-evalN/A

                                  \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                6. unsub-negN/A

                                  \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                                7. --lowering--.f6449.3

                                  \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                              8. Simplified49.3%

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

                              if -1.22000000000000007e-23 < F < 1.46

                              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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6449.6

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified49.6%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                2. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f6449.1

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              8. Simplified49.1%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              10. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f6449.1

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{0.5}}, -x\right)}{B} \]
                              11. Simplified49.1%

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

                              if 1.46 < F

                              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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6440.4

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified40.4%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                2. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f6440.4

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              8. Simplified40.4%

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

                                \[\leadsto \frac{\color{blue}{1 - \left(x + \frac{1}{{F}^{2}}\right)}}{B} \]
                              10. Step-by-step derivation
                                1. associate--r+N/A

                                  \[\leadsto \frac{\color{blue}{\left(1 - x\right) - \frac{1}{{F}^{2}}}}{B} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{\left(1 - x\right) + \left(\mathsf{neg}\left(\frac{1}{{F}^{2}}\right)\right)}}{B} \]
                                3. +-lowering-+.f64N/A

                                  \[\leadsto \frac{\color{blue}{\left(1 - x\right) + \left(\mathsf{neg}\left(\frac{1}{{F}^{2}}\right)\right)}}{B} \]
                                4. --lowering--.f64N/A

                                  \[\leadsto \frac{\color{blue}{\left(1 - x\right)} + \left(\mathsf{neg}\left(\frac{1}{{F}^{2}}\right)\right)}{B} \]
                                5. distribute-neg-fracN/A

                                  \[\leadsto \frac{\left(1 - x\right) + \color{blue}{\frac{\mathsf{neg}\left(1\right)}{{F}^{2}}}}{B} \]
                                6. metadata-evalN/A

                                  \[\leadsto \frac{\left(1 - x\right) + \frac{\color{blue}{-1}}{{F}^{2}}}{B} \]
                                7. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\left(1 - x\right) + \color{blue}{\frac{-1}{{F}^{2}}}}{B} \]
                                8. unpow2N/A

                                  \[\leadsto \frac{\left(1 - x\right) + \frac{-1}{\color{blue}{F \cdot F}}}{B} \]
                                9. *-lowering-*.f6454.6

                                  \[\leadsto \frac{\left(1 - x\right) + \frac{-1}{\color{blue}{F \cdot F}}}{B} \]
                              11. Simplified54.6%

                                \[\leadsto \frac{\color{blue}{\left(1 - x\right) + \frac{-1}{F \cdot F}}}{B} \]
                            3. Recombined 3 regimes into one program.
                            4. Add Preprocessing

                            Alternative 19: 52.1% accurate, 8.8× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.22 \cdot 10^{-23}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.45:\\ \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{0.5}, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -1.22e-23)
                               (/ (- -1.0 x) B)
                               (if (<= F 1.45) (/ (fma F (sqrt 0.5) (- x)) B) (/ (- 1.0 x) B))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -1.22e-23) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= 1.45) {
                            		tmp = fma(F, sqrt(0.5), -x) / B;
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -1.22e-23)
                            		tmp = Float64(Float64(-1.0 - x) / B);
                            	elseif (F <= 1.45)
                            		tmp = Float64(fma(F, sqrt(0.5), Float64(-x)) / B);
                            	else
                            		tmp = Float64(Float64(1.0 - x) / B);
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -1.22e-23], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(F * N[Sqrt[0.5], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -1.22 \cdot 10^{-23}:\\
                            \;\;\;\;\frac{-1 - x}{B}\\
                            
                            \mathbf{elif}\;F \leq 1.45:\\
                            \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{0.5}, -x\right)}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -1.22000000000000007e-23

                              1. Initial program 60.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6435.8

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified35.8%

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

                                \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
                              7. Step-by-step derivation
                                1. associate-*r/N/A

                                  \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
                                2. mul-1-negN/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
                                4. distribute-neg-inN/A

                                  \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                5. metadata-evalN/A

                                  \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                6. unsub-negN/A

                                  \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                                7. --lowering--.f6449.3

                                  \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                              8. Simplified49.3%

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

                              if -1.22000000000000007e-23 < F < 1.44999999999999996

                              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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6449.6

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified49.6%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                2. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                4. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. accelerator-lowering-fma.f6449.1

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}, -x\right)}{B} \]
                              8. Simplified49.1%

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

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              10. Step-by-step derivation
                                1. sqrt-lowering-sqrt.f6449.1

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{0.5}}, -x\right)}{B} \]
                              11. Simplified49.1%

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

                              if 1.44999999999999996 < F

                              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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6440.4

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified40.4%

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

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                              7. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                                2. --lowering--.f6454.3

                                  \[\leadsto \frac{\color{blue}{1 - x}}{B} \]
                              8. Simplified54.3%

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                            3. Recombined 3 regimes into one program.
                            4. Add Preprocessing

                            Alternative 20: 45.1% accurate, 9.2× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.2 \cdot 10^{-46}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3.1 \cdot 10^{-83}:\\ \;\;\;\;\frac{x \cdot \mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -1.2e-46)
                               (/ (- -1.0 x) B)
                               (if (<= F 3.1e-83)
                                 (/ (* x (fma (* B B) 0.3333333333333333 -1.0)) B)
                                 (/ (- 1.0 x) B))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -1.2e-46) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= 3.1e-83) {
                            		tmp = (x * fma((B * B), 0.3333333333333333, -1.0)) / B;
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -1.2e-46)
                            		tmp = Float64(Float64(-1.0 - x) / B);
                            	elseif (F <= 3.1e-83)
                            		tmp = Float64(Float64(x * fma(Float64(B * B), 0.3333333333333333, -1.0)) / B);
                            	else
                            		tmp = Float64(Float64(1.0 - x) / B);
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -1.2e-46], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.1e-83], N[(N[(x * N[(N[(B * B), $MachinePrecision] * 0.3333333333333333 + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -1.2 \cdot 10^{-46}:\\
                            \;\;\;\;\frac{-1 - x}{B}\\
                            
                            \mathbf{elif}\;F \leq 3.1 \cdot 10^{-83}:\\
                            \;\;\;\;\frac{x \cdot \mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -1.20000000000000007e-46

                              1. Initial program 62.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6438.6

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified38.6%

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

                                \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
                              7. Step-by-step derivation
                                1. associate-*r/N/A

                                  \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
                                2. mul-1-negN/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
                                4. distribute-neg-inN/A

                                  \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                5. metadata-evalN/A

                                  \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                6. unsub-negN/A

                                  \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                                7. --lowering--.f6449.0

                                  \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                              8. Simplified49.0%

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

                              if -1.20000000000000007e-46 < F < 3.09999999999999992e-83

                              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. Add Preprocessing
                              3. Taylor expanded in x around inf

                                \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                              4. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                                2. neg-lowering-neg.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{x \cdot \cos B}{\sin B}}\right) \]
                                4. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right) \]
                                5. cos-lowering-cos.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\frac{x \cdot \color{blue}{\cos B}}{\sin B}\right) \]
                                6. sin-lowering-sin.f6477.9

                                  \[\leadsto -\frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                              5. Simplified77.9%

                                \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
                              6. Step-by-step derivation
                                1. clear-numN/A

                                  \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                                2. distribute-neg-fracN/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\frac{\sin B}{x \cdot \cos B}}} \]
                                3. associate-/l/N/A

                                  \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}} \]
                                4. tan-quotN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\frac{\color{blue}{\tan B}}{x}} \]
                                5. metadata-evalN/A

                                  \[\leadsto \frac{\color{blue}{-1}}{\frac{\tan B}{x}} \]
                                6. div-invN/A

                                  \[\leadsto \frac{-1}{\color{blue}{\tan B \cdot \frac{1}{x}}} \]
                                7. associate-/r*N/A

                                  \[\leadsto \color{blue}{\frac{\frac{-1}{\tan B}}{\frac{1}{x}}} \]
                                8. frac-2negN/A

                                  \[\leadsto \frac{\color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\tan B\right)}}}{\frac{1}{x}} \]
                                9. metadata-evalN/A

                                  \[\leadsto \frac{\frac{\color{blue}{1}}{\mathsf{neg}\left(\tan B\right)}}{\frac{1}{x}} \]
                                10. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\frac{1}{\mathsf{neg}\left(\tan B\right)}}{\frac{1}{x}}} \]
                                11. metadata-evalN/A

                                  \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\mathsf{neg}\left(\tan B\right)}}{\frac{1}{x}} \]
                                12. frac-2negN/A

                                  \[\leadsto \frac{\color{blue}{\frac{-1}{\tan B}}}{\frac{1}{x}} \]
                                13. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{-1}{\tan B}}}{\frac{1}{x}} \]
                                14. tan-lowering-tan.f64N/A

                                  \[\leadsto \frac{\frac{-1}{\color{blue}{\tan B}}}{\frac{1}{x}} \]
                                15. /-lowering-/.f6477.7

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

                                \[\leadsto \color{blue}{\frac{\frac{-1}{\tan B}}{\frac{1}{x}}} \]
                              8. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{-1 \cdot x + \frac{1}{3} \cdot \left({B}^{2} \cdot x\right)}{B}} \]
                              9. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{-1 \cdot x + \frac{1}{3} \cdot \left({B}^{2} \cdot x\right)}{B}} \]
                                2. mul-1-negN/A

                                  \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(x\right)\right)} + \frac{1}{3} \cdot \left({B}^{2} \cdot x\right)}{B} \]
                                3. +-commutativeN/A

                                  \[\leadsto \frac{\color{blue}{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. associate-*r*N/A

                                  \[\leadsto \frac{\color{blue}{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                5. mul-1-negN/A

                                  \[\leadsto \frac{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x + \color{blue}{-1 \cdot x}}{B} \]
                                6. distribute-rgt-outN/A

                                  \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + -1\right)}}{B} \]
                                7. metadata-evalN/A

                                  \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)}{B} \]
                                8. sub-negN/A

                                  \[\leadsto \frac{x \cdot \color{blue}{\left(\frac{1}{3} \cdot {B}^{2} - 1\right)}}{B} \]
                                9. *-lowering-*.f64N/A

                                  \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} - 1\right)}}{B} \]
                                10. sub-negN/A

                                  \[\leadsto \frac{x \cdot \color{blue}{\left(\frac{1}{3} \cdot {B}^{2} + \left(\mathsf{neg}\left(1\right)\right)\right)}}{B} \]
                                11. *-commutativeN/A

                                  \[\leadsto \frac{x \cdot \left(\color{blue}{{B}^{2} \cdot \frac{1}{3}} + \left(\mathsf{neg}\left(1\right)\right)\right)}{B} \]
                                12. metadata-evalN/A

                                  \[\leadsto \frac{x \cdot \left({B}^{2} \cdot \frac{1}{3} + \color{blue}{-1}\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left({B}^{2}, \frac{1}{3}, -1\right)}}{B} \]
                                14. unpow2N/A

                                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{3}, -1\right)}{B} \]
                                15. *-lowering-*.f6437.4

                                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(\color{blue}{B \cdot B}, 0.3333333333333333, -1\right)}{B} \]
                              10. Simplified37.4%

                                \[\leadsto \color{blue}{\frac{x \cdot \mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}} \]

                              if 3.09999999999999992e-83 < F

                              1. Initial program 64.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6443.8

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified43.8%

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

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                              7. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                                2. --lowering--.f6449.7

                                  \[\leadsto \frac{\color{blue}{1 - x}}{B} \]
                              8. Simplified49.7%

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                            3. Recombined 3 regimes into one program.
                            4. Add Preprocessing

                            Alternative 21: 45.0% accurate, 9.2× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.15 \cdot 10^{-47}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{-83}:\\ \;\;\;\;x \cdot \frac{\mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -2.15e-47)
                               (/ (- -1.0 x) B)
                               (if (<= F 4.5e-83)
                                 (* x (/ (fma (* B B) 0.3333333333333333 -1.0) B))
                                 (/ (- 1.0 x) B))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -2.15e-47) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= 4.5e-83) {
                            		tmp = x * (fma((B * B), 0.3333333333333333, -1.0) / B);
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -2.15e-47)
                            		tmp = Float64(Float64(-1.0 - x) / B);
                            	elseif (F <= 4.5e-83)
                            		tmp = Float64(x * Float64(fma(Float64(B * B), 0.3333333333333333, -1.0) / B));
                            	else
                            		tmp = Float64(Float64(1.0 - x) / B);
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -2.15e-47], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.5e-83], N[(x * N[(N[(N[(B * B), $MachinePrecision] * 0.3333333333333333 + -1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -2.15 \cdot 10^{-47}:\\
                            \;\;\;\;\frac{-1 - x}{B}\\
                            
                            \mathbf{elif}\;F \leq 4.5 \cdot 10^{-83}:\\
                            \;\;\;\;x \cdot \frac{\mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -2.1499999999999999e-47

                              1. Initial program 62.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6438.6

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified38.6%

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

                                \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
                              7. Step-by-step derivation
                                1. associate-*r/N/A

                                  \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
                                2. mul-1-negN/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
                                4. distribute-neg-inN/A

                                  \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                5. metadata-evalN/A

                                  \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                6. unsub-negN/A

                                  \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                                7. --lowering--.f6449.0

                                  \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                              8. Simplified49.0%

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

                              if -2.1499999999999999e-47 < F < 4.49999999999999997e-83

                              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. Add Preprocessing
                              3. Taylor expanded in x around inf

                                \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                              4. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                                2. neg-lowering-neg.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{x \cdot \cos B}{\sin B}}\right) \]
                                4. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right) \]
                                5. cos-lowering-cos.f64N/A

                                  \[\leadsto \mathsf{neg}\left(\frac{x \cdot \color{blue}{\cos B}}{\sin B}\right) \]
                                6. sin-lowering-sin.f6477.9

                                  \[\leadsto -\frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                              5. Simplified77.9%

                                \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
                              6. Step-by-step derivation
                                1. clear-numN/A

                                  \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                                2. distribute-neg-fracN/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\frac{\sin B}{x \cdot \cos B}}} \]
                                3. associate-/l/N/A

                                  \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}} \]
                                4. tan-quotN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\frac{\color{blue}{\tan B}}{x}} \]
                                5. metadata-evalN/A

                                  \[\leadsto \frac{\color{blue}{-1}}{\frac{\tan B}{x}} \]
                                6. div-invN/A

                                  \[\leadsto \frac{-1}{\color{blue}{\tan B \cdot \frac{1}{x}}} \]
                                7. associate-/r*N/A

                                  \[\leadsto \color{blue}{\frac{\frac{-1}{\tan B}}{\frac{1}{x}}} \]
                                8. frac-2negN/A

                                  \[\leadsto \frac{\color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\tan B\right)}}}{\frac{1}{x}} \]
                                9. metadata-evalN/A

                                  \[\leadsto \frac{\frac{\color{blue}{1}}{\mathsf{neg}\left(\tan B\right)}}{\frac{1}{x}} \]
                                10. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\frac{1}{\mathsf{neg}\left(\tan B\right)}}{\frac{1}{x}}} \]
                                11. metadata-evalN/A

                                  \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\mathsf{neg}\left(\tan B\right)}}{\frac{1}{x}} \]
                                12. frac-2negN/A

                                  \[\leadsto \frac{\color{blue}{\frac{-1}{\tan B}}}{\frac{1}{x}} \]
                                13. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{-1}{\tan B}}}{\frac{1}{x}} \]
                                14. tan-lowering-tan.f64N/A

                                  \[\leadsto \frac{\frac{-1}{\color{blue}{\tan B}}}{\frac{1}{x}} \]
                                15. /-lowering-/.f6477.7

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

                                \[\leadsto \color{blue}{\frac{\frac{-1}{\tan B}}{\frac{1}{x}}} \]
                              8. Taylor expanded in B around 0

                                \[\leadsto \frac{\color{blue}{\frac{\frac{1}{3} \cdot {B}^{2} - 1}{B}}}{\frac{1}{x}} \]
                              9. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{\frac{1}{3} \cdot {B}^{2} - 1}{B}}}{\frac{1}{x}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\frac{\color{blue}{\frac{1}{3} \cdot {B}^{2} + \left(\mathsf{neg}\left(1\right)\right)}}{B}}{\frac{1}{x}} \]
                                3. *-commutativeN/A

                                  \[\leadsto \frac{\frac{\color{blue}{{B}^{2} \cdot \frac{1}{3}} + \left(\mathsf{neg}\left(1\right)\right)}{B}}{\frac{1}{x}} \]
                                4. metadata-evalN/A

                                  \[\leadsto \frac{\frac{{B}^{2} \cdot \frac{1}{3} + \color{blue}{-1}}{B}}{\frac{1}{x}} \]
                                5. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\frac{\color{blue}{\mathsf{fma}\left({B}^{2}, \frac{1}{3}, -1\right)}}{B}}{\frac{1}{x}} \]
                                6. unpow2N/A

                                  \[\leadsto \frac{\frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{3}, -1\right)}{B}}{\frac{1}{x}} \]
                                7. *-lowering-*.f6437.2

                                  \[\leadsto \frac{\frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, 0.3333333333333333, -1\right)}{B}}{\frac{1}{x}} \]
                              10. Simplified37.2%

                                \[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}}}{\frac{1}{x}} \]
                              11. Step-by-step derivation
                                1. associate-/r/N/A

                                  \[\leadsto \color{blue}{\frac{\frac{\left(B \cdot B\right) \cdot \frac{1}{3} + -1}{B}}{1} \cdot x} \]
                                2. /-rgt-identityN/A

                                  \[\leadsto \color{blue}{\frac{\left(B \cdot B\right) \cdot \frac{1}{3} + -1}{B}} \cdot x \]
                                3. *-lowering-*.f64N/A

                                  \[\leadsto \color{blue}{\frac{\left(B \cdot B\right) \cdot \frac{1}{3} + -1}{B} \cdot x} \]
                                4. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\left(B \cdot B\right) \cdot \frac{1}{3} + -1}{B}} \cdot x \]
                                5. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(B \cdot B, \frac{1}{3}, -1\right)}}{B} \cdot x \]
                                6. *-lowering-*.f6437.3

                                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, 0.3333333333333333, -1\right)}{B} \cdot x \]
                              12. Applied egg-rr37.3%

                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B} \cdot x} \]

                              if 4.49999999999999997e-83 < F

                              1. Initial program 64.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6443.8

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified43.8%

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

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                              7. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                                2. --lowering--.f6449.7

                                  \[\leadsto \frac{\color{blue}{1 - x}}{B} \]
                              8. Simplified49.7%

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                            3. Recombined 3 regimes into one program.
                            4. Final simplification45.2%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.15 \cdot 10^{-47}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{-83}:\\ \;\;\;\;x \cdot \frac{\mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 22: 44.7% accurate, 13.6× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.55 \cdot 10^{-46}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 6.2 \cdot 10^{-136}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -1.55e-46)
                               (/ (- -1.0 x) B)
                               (if (<= F 6.2e-136) (/ (- x) B) (/ (- 1.0 x) B))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -1.55e-46) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= 6.2e-136) {
                            		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 <= (-1.55d-46)) then
                                    tmp = ((-1.0d0) - x) / b
                                else if (f <= 6.2d-136) 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 <= -1.55e-46) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= 6.2e-136) {
                            		tmp = -x / B;
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            def code(F, B, x):
                            	tmp = 0
                            	if F <= -1.55e-46:
                            		tmp = (-1.0 - x) / B
                            	elif F <= 6.2e-136:
                            		tmp = -x / B
                            	else:
                            		tmp = (1.0 - x) / B
                            	return tmp
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -1.55e-46)
                            		tmp = Float64(Float64(-1.0 - x) / B);
                            	elseif (F <= 6.2e-136)
                            		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 <= -1.55e-46)
                            		tmp = (-1.0 - x) / B;
                            	elseif (F <= 6.2e-136)
                            		tmp = -x / B;
                            	else
                            		tmp = (1.0 - x) / B;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -1.55e-46], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6.2e-136], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -1.55 \cdot 10^{-46}:\\
                            \;\;\;\;\frac{-1 - x}{B}\\
                            
                            \mathbf{elif}\;F \leq 6.2 \cdot 10^{-136}:\\
                            \;\;\;\;\frac{-x}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -1.55e-46

                              1. Initial program 62.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6438.6

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified38.6%

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

                                \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
                              7. Step-by-step derivation
                                1. associate-*r/N/A

                                  \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
                                2. mul-1-negN/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
                                4. distribute-neg-inN/A

                                  \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                5. metadata-evalN/A

                                  \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                6. unsub-negN/A

                                  \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                                7. --lowering--.f6449.0

                                  \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                              8. Simplified49.0%

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

                              if -1.55e-46 < F < 6.2e-136

                              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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6446.3

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified46.3%

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

                                \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
                              7. Step-by-step derivation
                                1. associate-*r/N/A

                                  \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
                                2. mul-1-negN/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{B}} \]
                                4. neg-lowering-neg.f6437.1

                                  \[\leadsto \frac{\color{blue}{-x}}{B} \]
                              8. Simplified37.1%

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

                              if 6.2e-136 < F

                              1. Initial program 66.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6443.7

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified43.7%

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

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                              7. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                                2. --lowering--.f6449.3

                                  \[\leadsto \frac{\color{blue}{1 - x}}{B} \]
                              8. Simplified49.3%

                                \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
                            3. Recombined 3 regimes into one program.
                            4. Add Preprocessing

                            Alternative 23: 37.5% accurate, 17.5× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.15 \cdot 10^{-46}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -1.15e-46) (/ (- -1.0 x) B) (/ (- x) B)))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -1.15e-46) {
                            		tmp = (-1.0 - x) / B;
                            	} else {
                            		tmp = -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 <= (-1.15d-46)) then
                                    tmp = ((-1.0d0) - x) / b
                                else
                                    tmp = -x / b
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -1.15e-46) {
                            		tmp = (-1.0 - x) / B;
                            	} else {
                            		tmp = -x / B;
                            	}
                            	return tmp;
                            }
                            
                            def code(F, B, x):
                            	tmp = 0
                            	if F <= -1.15e-46:
                            		tmp = (-1.0 - x) / B
                            	else:
                            		tmp = -x / B
                            	return tmp
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -1.15e-46)
                            		tmp = Float64(Float64(-1.0 - x) / B);
                            	else
                            		tmp = Float64(Float64(-x) / B);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(F, B, x)
                            	tmp = 0.0;
                            	if (F <= -1.15e-46)
                            		tmp = (-1.0 - x) / B;
                            	else
                            		tmp = -x / B;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -1.15e-46], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -1.15 \cdot 10^{-46}:\\
                            \;\;\;\;\frac{-1 - x}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{-x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if F < -1.15e-46

                              1. Initial program 62.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6438.6

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified38.6%

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

                                \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
                              7. Step-by-step derivation
                                1. associate-*r/N/A

                                  \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
                                2. mul-1-negN/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
                                4. distribute-neg-inN/A

                                  \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                5. metadata-evalN/A

                                  \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                6. unsub-negN/A

                                  \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                                7. --lowering--.f6449.0

                                  \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                              8. Simplified49.0%

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

                              if -1.15e-46 < F

                              1. Initial program 82.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. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. sub-negN/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                3. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                4. sqrt-lowering-sqrt.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                7. associate-+l+N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                9. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                10. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                12. unpow2N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                13. accelerator-lowering-fma.f64N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                                14. neg-lowering-neg.f6445.0

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                              5. Simplified45.0%

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

                                \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
                              7. Step-by-step derivation
                                1. associate-*r/N/A

                                  \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
                                2. mul-1-negN/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{B} \]
                                3. /-lowering-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{B}} \]
                                4. neg-lowering-neg.f6434.2

                                  \[\leadsto \frac{\color{blue}{-x}}{B} \]
                              8. Simplified34.2%

                                \[\leadsto \color{blue}{\frac{-x}{B}} \]
                            3. Recombined 2 regimes into one program.
                            4. Add Preprocessing

                            Alternative 24: 30.0% accurate, 26.3× 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 76.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. Add Preprocessing
                            3. Taylor expanded in B around 0

                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                            4. Step-by-step derivation
                              1. /-lowering-/.f64N/A

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              2. sub-negN/A

                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                              3. accelerator-lowering-fma.f64N/A

                                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                              4. sqrt-lowering-sqrt.f64N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              5. /-lowering-/.f64N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              6. +-commutativeN/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. associate-+l+N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              8. *-commutativeN/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              9. +-commutativeN/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              10. accelerator-lowering-fma.f64N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              11. +-commutativeN/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              12. unpow2N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              13. accelerator-lowering-fma.f64N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              14. neg-lowering-neg.f6443.0

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                            5. Simplified43.0%

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

                              \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
                            7. Step-by-step derivation
                              1. associate-*r/N/A

                                \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
                              2. mul-1-negN/A

                                \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{B} \]
                              3. /-lowering-/.f64N/A

                                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{B}} \]
                              4. neg-lowering-neg.f6432.5

                                \[\leadsto \frac{\color{blue}{-x}}{B} \]
                            8. Simplified32.5%

                              \[\leadsto \color{blue}{\frac{-x}{B}} \]
                            9. Add Preprocessing

                            Alternative 25: 10.8% accurate, 30.7× 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 76.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. Add Preprocessing
                            3. Taylor expanded in B around 0

                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                            4. Step-by-step derivation
                              1. /-lowering-/.f64N/A

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              2. sub-negN/A

                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                              3. accelerator-lowering-fma.f64N/A

                                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
                              4. sqrt-lowering-sqrt.f64N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              5. /-lowering-/.f64N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              6. +-commutativeN/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              7. associate-+l+N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              8. *-commutativeN/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              9. +-commutativeN/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              10. accelerator-lowering-fma.f64N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              11. +-commutativeN/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              12. unpow2N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              13. accelerator-lowering-fma.f64N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
                              14. neg-lowering-neg.f6443.0

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
                            5. Simplified43.0%

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

                              \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
                            7. Step-by-step derivation
                              1. associate-*r/N/A

                                \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
                              2. mul-1-negN/A

                                \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
                              3. /-lowering-/.f64N/A

                                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
                              4. distribute-neg-inN/A

                                \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                              5. metadata-evalN/A

                                \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                              6. unsub-negN/A

                                \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                              7. --lowering--.f6432.5

                                \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
                            8. Simplified32.5%

                              \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]
                            9. Taylor expanded in x around 0

                              \[\leadsto \color{blue}{\frac{-1}{B}} \]
                            10. Step-by-step derivation
                              1. /-lowering-/.f649.9

                                \[\leadsto \color{blue}{\frac{-1}{B}} \]
                            11. Simplified9.9%

                              \[\leadsto \color{blue}{\frac{-1}{B}} \]
                            12. Add Preprocessing

                            Alternative 26: 2.8% accurate, 33.5× speedup?

                            \[\begin{array}{l} \\ x \cdot \left(B \cdot 0.3333333333333333\right) \end{array} \]
                            (FPCore (F B x) :precision binary64 (* x (* B 0.3333333333333333)))
                            double code(double F, double B, double x) {
                            	return x * (B * 0.3333333333333333);
                            }
                            
                            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 * 0.3333333333333333d0)
                            end function
                            
                            public static double code(double F, double B, double x) {
                            	return x * (B * 0.3333333333333333);
                            }
                            
                            def code(F, B, x):
                            	return x * (B * 0.3333333333333333)
                            
                            function code(F, B, x)
                            	return Float64(x * Float64(B * 0.3333333333333333))
                            end
                            
                            function tmp = code(F, B, x)
                            	tmp = x * (B * 0.3333333333333333);
                            end
                            
                            code[F_, B_, x_] := N[(x * N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]
                            
                            \begin{array}{l}
                            
                            \\
                            x \cdot \left(B \cdot 0.3333333333333333\right)
                            \end{array}
                            
                            Derivation
                            1. Initial program 76.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. Add Preprocessing
                            3. Taylor expanded in x around inf

                              \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                            4. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                              2. neg-lowering-neg.f64N/A

                                \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)} \]
                              3. /-lowering-/.f64N/A

                                \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{x \cdot \cos B}{\sin B}}\right) \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{neg}\left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right) \]
                              5. cos-lowering-cos.f64N/A

                                \[\leadsto \mathsf{neg}\left(\frac{x \cdot \color{blue}{\cos B}}{\sin B}\right) \]
                              6. sin-lowering-sin.f6461.2

                                \[\leadsto -\frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                            5. Simplified61.2%

                              \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
                            6. Step-by-step derivation
                              1. clear-numN/A

                                \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                              2. distribute-neg-fracN/A

                                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\frac{\sin B}{x \cdot \cos B}}} \]
                              3. associate-/l/N/A

                                \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}} \]
                              4. tan-quotN/A

                                \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\frac{\color{blue}{\tan B}}{x}} \]
                              5. metadata-evalN/A

                                \[\leadsto \frac{\color{blue}{-1}}{\frac{\tan B}{x}} \]
                              6. div-invN/A

                                \[\leadsto \frac{-1}{\color{blue}{\tan B \cdot \frac{1}{x}}} \]
                              7. associate-/r*N/A

                                \[\leadsto \color{blue}{\frac{\frac{-1}{\tan B}}{\frac{1}{x}}} \]
                              8. frac-2negN/A

                                \[\leadsto \frac{\color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\tan B\right)}}}{\frac{1}{x}} \]
                              9. metadata-evalN/A

                                \[\leadsto \frac{\frac{\color{blue}{1}}{\mathsf{neg}\left(\tan B\right)}}{\frac{1}{x}} \]
                              10. /-lowering-/.f64N/A

                                \[\leadsto \color{blue}{\frac{\frac{1}{\mathsf{neg}\left(\tan B\right)}}{\frac{1}{x}}} \]
                              11. metadata-evalN/A

                                \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\mathsf{neg}\left(\tan B\right)}}{\frac{1}{x}} \]
                              12. frac-2negN/A

                                \[\leadsto \frac{\color{blue}{\frac{-1}{\tan B}}}{\frac{1}{x}} \]
                              13. /-lowering-/.f64N/A

                                \[\leadsto \frac{\color{blue}{\frac{-1}{\tan B}}}{\frac{1}{x}} \]
                              14. tan-lowering-tan.f64N/A

                                \[\leadsto \frac{\frac{-1}{\color{blue}{\tan B}}}{\frac{1}{x}} \]
                              15. /-lowering-/.f6461.1

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

                              \[\leadsto \color{blue}{\frac{\frac{-1}{\tan B}}{\frac{1}{x}}} \]
                            8. Taylor expanded in B around 0

                              \[\leadsto \frac{\color{blue}{\frac{\frac{1}{3} \cdot {B}^{2} - 1}{B}}}{\frac{1}{x}} \]
                            9. Step-by-step derivation
                              1. /-lowering-/.f64N/A

                                \[\leadsto \frac{\color{blue}{\frac{\frac{1}{3} \cdot {B}^{2} - 1}{B}}}{\frac{1}{x}} \]
                              2. sub-negN/A

                                \[\leadsto \frac{\frac{\color{blue}{\frac{1}{3} \cdot {B}^{2} + \left(\mathsf{neg}\left(1\right)\right)}}{B}}{\frac{1}{x}} \]
                              3. *-commutativeN/A

                                \[\leadsto \frac{\frac{\color{blue}{{B}^{2} \cdot \frac{1}{3}} + \left(\mathsf{neg}\left(1\right)\right)}{B}}{\frac{1}{x}} \]
                              4. metadata-evalN/A

                                \[\leadsto \frac{\frac{{B}^{2} \cdot \frac{1}{3} + \color{blue}{-1}}{B}}{\frac{1}{x}} \]
                              5. accelerator-lowering-fma.f64N/A

                                \[\leadsto \frac{\frac{\color{blue}{\mathsf{fma}\left({B}^{2}, \frac{1}{3}, -1\right)}}{B}}{\frac{1}{x}} \]
                              6. unpow2N/A

                                \[\leadsto \frac{\frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{3}, -1\right)}{B}}{\frac{1}{x}} \]
                              7. *-lowering-*.f6432.5

                                \[\leadsto \frac{\frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, 0.3333333333333333, -1\right)}{B}}{\frac{1}{x}} \]
                            10. Simplified32.5%

                              \[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}}}{\frac{1}{x}} \]
                            11. Taylor expanded in B around inf

                              \[\leadsto \color{blue}{\frac{1}{3} \cdot \left(B \cdot x\right)} \]
                            12. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \color{blue}{\left(B \cdot x\right) \cdot \frac{1}{3}} \]
                              2. *-commutativeN/A

                                \[\leadsto \color{blue}{\left(x \cdot B\right)} \cdot \frac{1}{3} \]
                              3. associate-*l*N/A

                                \[\leadsto \color{blue}{x \cdot \left(B \cdot \frac{1}{3}\right)} \]
                              4. *-commutativeN/A

                                \[\leadsto x \cdot \color{blue}{\left(\frac{1}{3} \cdot B\right)} \]
                              5. *-lowering-*.f64N/A

                                \[\leadsto \color{blue}{x \cdot \left(\frac{1}{3} \cdot B\right)} \]
                              6. *-commutativeN/A

                                \[\leadsto x \cdot \color{blue}{\left(B \cdot \frac{1}{3}\right)} \]
                              7. *-lowering-*.f642.8

                                \[\leadsto x \cdot \color{blue}{\left(B \cdot 0.3333333333333333\right)} \]
                            13. Simplified2.8%

                              \[\leadsto \color{blue}{x \cdot \left(B \cdot 0.3333333333333333\right)} \]
                            14. Add Preprocessing

                            Reproduce

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