VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.9% → 99.7%
Time: 17.1s
Alternatives: 18
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 18 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.9% 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{x}{\tan B}\\ \mathbf{if}\;F \leq -4 \cdot 10^{+115}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 3 \cdot 10^{+77}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - t\_0\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\frac{1}{\sin B}}{F}, F, \frac{x}{0 - \tan B}\right)\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -4e+115)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 3e+77)
       (- (/ F (* (sin B) (sqrt (fma F F (fma 2.0 x 2.0))))) t_0)
       (fma (/ (/ 1.0 (sin B)) F) F (/ x (- 0.0 (tan B))))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -4e+115) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 3e+77) {
		tmp = (F / (sin(B) * sqrt(fma(F, F, fma(2.0, x, 2.0))))) - t_0;
	} else {
		tmp = fma(((1.0 / sin(B)) / F), F, (x / (0.0 - tan(B))));
	}
	return tmp;
}
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -4e+115)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 3e+77)
		tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, fma(2.0, x, 2.0))))) - t_0);
	else
		tmp = fma(Float64(Float64(1.0 / sin(B)) / F), F, Float64(x / Float64(0.0 - tan(B))));
	end
	return tmp
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4e+115], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3e+77], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision] * F + N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq 3 \cdot 10^{+77}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - t\_0\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\frac{1}{\sin B}}{F}, F, \frac{x}{0 - \tan B}\right)\\


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

    1. Initial program 38.6%

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

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
      2. sin-lowering-sin.f6499.7

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \frac{-1}{\sin B} + \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\tan B}}\right)\right) \]
      3. unsub-negN/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
      4. +-lft-identityN/A

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\left(0 + \frac{x}{\tan B}\right)} \]
      5. --lowering--.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \left(0 + \frac{x}{\tan B}\right)} \]
      6. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \left(0 + \frac{x}{\tan B}\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \left(0 + \frac{x}{\tan B}\right) \]
      8. +-lft-identityN/A

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
      9. /-lowering-/.f64N/A

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
      10. tan-lowering-tan.f6499.7

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

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

    if -4.0000000000000001e115 < F < 2.9999999999999998e77

    1. Initial program 95.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. 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-/r/N/A

        \[\leadsto \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} \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) \]
      4. associate-*l*N/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, \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}, F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, 0 - \frac{x}{\tan B}\right)} \]
    5. Step-by-step derivation
      1. associate-*l/N/A

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

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

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

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

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

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

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

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

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

    if 2.9999999999999998e77 < F

    1. Initial program 45.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
      3. sin-lowering-sin.f6499.5

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{\sin B \cdot F}}, F, 0 - \frac{x}{\tan B}\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\frac{1}{\sin B}}{F}}, F, 0 - \frac{x}{\tan B}\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{{F}^{0}}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{{F}^{\color{blue}{\left(-1 + 1\right)}}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      5. pow-plusN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{{F}^{-1} \cdot F}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      6. inv-powN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{\frac{1}{F}} \cdot F}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{\frac{1}{F}}{\sin B} \cdot F}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{1}{F \cdot \sin B}} \cdot F}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\frac{1}{F \cdot \sin B} \cdot F}{F}}, F, 0 - \frac{x}{\tan B}\right) \]
      10. associate-/r*N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{\frac{1}{F}}{\sin B}} \cdot F}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      11. associate-*l/N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{\frac{1}{F} \cdot F}{\sin B}}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      12. inv-powN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{{F}^{-1}} \cdot F}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      13. pow-plusN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{{F}^{\left(-1 + 1\right)}}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{{F}^{\color{blue}{0}}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{1}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{1}{\sin B}}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      17. sin-lowering-sin.f6499.8

        \[\leadsto \mathsf{fma}\left(\frac{\frac{1}{\color{blue}{\sin B}}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
    9. Applied egg-rr99.8%

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

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

Alternative 2: 99.1% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, 2\right)}} - t\_0\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\frac{1}{\sin B}}{F}, F, \frac{x}{0 - \tan B}\right)\\


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

    1. Initial program 51.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 F around -inf

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
      2. sin-lowering-sin.f6498.4

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \frac{-1}{\sin B} + \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\tan B}}\right)\right) \]
      3. unsub-negN/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
      4. +-lft-identityN/A

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\left(0 + \frac{x}{\tan B}\right)} \]
      5. --lowering--.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \left(0 + \frac{x}{\tan B}\right)} \]
      6. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \left(0 + \frac{x}{\tan B}\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \left(0 + \frac{x}{\tan B}\right) \]
      8. +-lft-identityN/A

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
      9. /-lowering-/.f64N/A

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
      10. tan-lowering-tan.f6498.5

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

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

    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-/r/N/A

        \[\leadsto \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} \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) \]
      4. associate-*l*N/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, \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}, F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, 0 - \frac{x}{\tan B}\right)} \]
    5. Step-by-step derivation
      1. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{x \cdot 2} + 2}} - \frac{x}{\tan B} \]
      6. accelerator-lowering-fma.f6499.5

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

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

    if 1.3999999999999999 < F

    1. Initial program 57.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
      3. sin-lowering-sin.f6498.5

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{\sin B \cdot F}}, F, 0 - \frac{x}{\tan B}\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\frac{1}{\sin B}}{F}}, F, 0 - \frac{x}{\tan B}\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{{F}^{0}}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{{F}^{\color{blue}{\left(-1 + 1\right)}}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      5. pow-plusN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{{F}^{-1} \cdot F}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      6. inv-powN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{\frac{1}{F}} \cdot F}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{\frac{1}{F}}{\sin B} \cdot F}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{1}{F \cdot \sin B}} \cdot F}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\frac{1}{F \cdot \sin B} \cdot F}{F}}, F, 0 - \frac{x}{\tan B}\right) \]
      10. associate-/r*N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{\frac{1}{F}}{\sin B}} \cdot F}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      11. associate-*l/N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{\frac{1}{F} \cdot F}{\sin B}}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      12. inv-powN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{{F}^{-1}} \cdot F}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      13. pow-plusN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{{F}^{\left(-1 + 1\right)}}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{{F}^{\color{blue}{0}}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{1}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{1}{\sin B}}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
      17. sin-lowering-sin.f6498.8

        \[\leadsto \mathsf{fma}\left(\frac{\frac{1}{\color{blue}{\sin B}}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
    9. Applied egg-rr98.8%

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

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

Alternative 3: 91.8% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq 60000:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\frac{1}{\sin B}}{F}, F, \frac{x}{0 - \tan B}\right)\\


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

    1. Initial program 50.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 F around -inf

      \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
      2. sin-lowering-sin.f6499.0

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \frac{-1}{\sin B} + \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\tan B}}\right)\right) \]
      3. unsub-negN/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
      4. +-lft-identityN/A

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\left(0 + \frac{x}{\tan B}\right)} \]
      5. --lowering--.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B} - \left(0 + \frac{x}{\tan B}\right)} \]
      6. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \left(0 + \frac{x}{\tan B}\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \left(0 + \frac{x}{\tan B}\right) \]
      8. +-lft-identityN/A

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
      9. /-lowering-/.f64N/A

        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
      10. tan-lowering-tan.f6499.1

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

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

    if -1400 < F < 6e4

    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-/r/N/A

        \[\leadsto \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} \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) \]
      4. associate-*l*N/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, \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}, F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, 0 - \frac{x}{\tan B}\right)} \]
    5. Step-by-step derivation
      1. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
        3. unpow2N/A

          \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
        4. accelerator-lowering-fma.f6482.5

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

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

      if 6e4 < F

      1. Initial program 56.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
        3. sin-lowering-sin.f6499.5

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
      8. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{\sin B \cdot F}}, F, 0 - \frac{x}{\tan B}\right) \]
        2. associate-/r*N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\frac{1}{\sin B}}{F}}, F, 0 - \frac{x}{\tan B}\right) \]
        3. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{{F}^{0}}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
        4. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(\frac{\frac{{F}^{\color{blue}{\left(-1 + 1\right)}}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
        5. pow-plusN/A

          \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{{F}^{-1} \cdot F}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
        6. inv-powN/A

          \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{\frac{1}{F}} \cdot F}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
        7. associate-*l/N/A

          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{\frac{1}{F}}{\sin B} \cdot F}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
        8. associate-/r*N/A

          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{1}{F \cdot \sin B}} \cdot F}{F}, F, 0 - \frac{x}{\tan B}\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\frac{1}{F \cdot \sin B} \cdot F}{F}}, F, 0 - \frac{x}{\tan B}\right) \]
        10. associate-/r*N/A

          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{\frac{1}{F}}{\sin B}} \cdot F}{F}, F, 0 - \frac{x}{\tan B}\right) \]
        11. associate-*l/N/A

          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{\frac{1}{F} \cdot F}{\sin B}}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
        12. inv-powN/A

          \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{{F}^{-1}} \cdot F}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
        13. pow-plusN/A

          \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{{F}^{\left(-1 + 1\right)}}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
        14. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(\frac{\frac{{F}^{\color{blue}{0}}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
        15. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(\frac{\frac{\color{blue}{1}}{\sin B}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
        16. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{1}{\sin B}}}{F}, F, 0 - \frac{x}{\tan B}\right) \]
        17. sin-lowering-sin.f6499.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1400:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 60000:\\ \;\;\;\;\frac{F}{B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\frac{1}{\sin B}}{F}, F, \frac{x}{0 - \tan B}\right)\\ \end{array} \]
    11. Add Preprocessing

    Alternative 4: 91.9% accurate, 1.5× speedup?

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

      1. Initial program 50.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 F around -inf

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
        2. sin-lowering-sin.f6499.0

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

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

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

          \[\leadsto \frac{-1}{\sin B} + \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\tan B}}\right)\right) \]
        3. unsub-negN/A

          \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
        4. +-lft-identityN/A

          \[\leadsto \frac{-1}{\sin B} - \color{blue}{\left(0 + \frac{x}{\tan B}\right)} \]
        5. --lowering--.f64N/A

          \[\leadsto \color{blue}{\frac{-1}{\sin B} - \left(0 + \frac{x}{\tan B}\right)} \]
        6. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \left(0 + \frac{x}{\tan B}\right) \]
        7. sin-lowering-sin.f64N/A

          \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \left(0 + \frac{x}{\tan B}\right) \]
        8. +-lft-identityN/A

          \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
        9. /-lowering-/.f64N/A

          \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
        10. tan-lowering-tan.f6499.1

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

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

      if -1520 < F < 62000

      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-/r/N/A

          \[\leadsto \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} \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) \]
        4. associate-*l*N/A

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, \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}, F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, 0 - \frac{x}{\tan B}\right)} \]
      5. Step-by-step derivation
        1. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
          3. unpow2N/A

            \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
          4. accelerator-lowering-fma.f6482.5

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

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

        if 62000 < F

        1. Initial program 56.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
          3. sin-lowering-sin.f6499.5

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
        8. Step-by-step derivation
          1. associate-+r-N/A

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

            \[\leadsto \color{blue}{\frac{1}{F \cdot \sin B} \cdot F} - \frac{x}{\tan B} \]
          3. +-lft-identityN/A

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

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

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

            \[\leadsto \color{blue}{\frac{\frac{1}{F} \cdot F}{\sin B}} - \left(0 + \frac{x}{\tan B}\right) \]
          7. inv-powN/A

            \[\leadsto \frac{\color{blue}{{F}^{-1}} \cdot F}{\sin B} - \left(0 + \frac{x}{\tan B}\right) \]
          8. pow-plusN/A

            \[\leadsto \frac{\color{blue}{{F}^{\left(-1 + 1\right)}}}{\sin B} - \left(0 + \frac{x}{\tan B}\right) \]
          9. metadata-evalN/A

            \[\leadsto \frac{{F}^{\color{blue}{0}}}{\sin B} - \left(0 + \frac{x}{\tan B}\right) \]
          10. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{1}}{\sin B} - \left(0 + \frac{x}{\tan B}\right) \]
          11. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{1}{\sin B}} - \left(0 + \frac{x}{\tan B}\right) \]
          12. sin-lowering-sin.f64N/A

            \[\leadsto \frac{1}{\color{blue}{\sin B}} - \left(0 + \frac{x}{\tan B}\right) \]
          13. +-lft-identityN/A

            \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
          14. /-lowering-/.f64N/A

            \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
          15. tan-lowering-tan.f6499.7

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

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

      Alternative 5: 84.1% accurate, 1.6× speedup?

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

        1. Initial program 50.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 F around -inf

          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
          2. sin-lowering-sin.f6499.0

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

          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
        6. Step-by-step derivation
          1. +-commutativeN/A

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

            \[\leadsto \frac{-1}{\sin B} + \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\tan B}}\right)\right) \]
          3. unsub-negN/A

            \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
          4. +-lft-identityN/A

            \[\leadsto \frac{-1}{\sin B} - \color{blue}{\left(0 + \frac{x}{\tan B}\right)} \]
          5. --lowering--.f64N/A

            \[\leadsto \color{blue}{\frac{-1}{\sin B} - \left(0 + \frac{x}{\tan B}\right)} \]
          6. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \left(0 + \frac{x}{\tan B}\right) \]
          7. sin-lowering-sin.f64N/A

            \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \left(0 + \frac{x}{\tan B}\right) \]
          8. +-lft-identityN/A

            \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
          9. /-lowering-/.f64N/A

            \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
          10. tan-lowering-tan.f6499.1

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

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

        if -1520 < F < 7.00000000000000036e162

        1. Initial program 96.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-/r/N/A

            \[\leadsto \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} \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) \]
          4. associate-*l*N/A

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, \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}, F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, 0 - \frac{x}{\tan B}\right)} \]
        5. Step-by-step derivation
          1. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
            3. unpow2N/A

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

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

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

          if 7.00000000000000036e162 < F

          1. Initial program 11.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
            3. sin-lowering-sin.f6499.5

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

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

            \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, 0 - \color{blue}{\frac{x}{B}}\right) \]
          9. Step-by-step derivation
            1. /-lowering-/.f6491.4

              \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, 0 - \color{blue}{\frac{x}{B}}\right) \]
          10. Simplified91.4%

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

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

        Alternative 6: 62.4% accurate, 2.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -5.2 \cdot 10^{-96}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.1 \cdot 10^{-144}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\ \mathbf{elif}\;F \leq 1.32 \cdot 10^{+22}:\\ \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\ \mathbf{elif}\;F \leq 1.6 \cdot 10^{+173}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{F \cdot B}, F, \frac{x}{0 - \tan B}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, \frac{0 - x}{B}\right)\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (if (<= F -5.2e-96)
           (- (/ -1.0 B) (/ x (tan B)))
           (if (<= F 3.1e-144)
             (/ (- (/ F (sqrt (fma F F (fma 2.0 x 2.0)))) x) B)
             (if (<= F 1.32e+22)
               (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B)))
               (if (<= F 1.6e+173)
                 (fma (/ 1.0 (* F B)) F (/ x (- 0.0 (tan B))))
                 (fma (/ 1.0 (* F (sin B))) F (/ (- 0.0 x) B)))))))
        double code(double F, double B, double x) {
        	double tmp;
        	if (F <= -5.2e-96) {
        		tmp = (-1.0 / B) - (x / tan(B));
        	} else if (F <= 3.1e-144) {
        		tmp = ((F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B;
        	} else if (F <= 1.32e+22) {
        		tmp = F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B));
        	} else if (F <= 1.6e+173) {
        		tmp = fma((1.0 / (F * B)), F, (x / (0.0 - tan(B))));
        	} else {
        		tmp = fma((1.0 / (F * sin(B))), F, ((0.0 - x) / B));
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	tmp = 0.0
        	if (F <= -5.2e-96)
        		tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B)));
        	elseif (F <= 3.1e-144)
        		tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B);
        	elseif (F <= 1.32e+22)
        		tmp = Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B)));
        	elseif (F <= 1.6e+173)
        		tmp = fma(Float64(1.0 / Float64(F * B)), F, Float64(x / Float64(0.0 - tan(B))));
        	else
        		tmp = fma(Float64(1.0 / Float64(F * sin(B))), F, Float64(Float64(0.0 - x) / B));
        	end
        	return tmp
        end
        
        code[F_, B_, x_] := If[LessEqual[F, -5.2e-96], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.1e-144], N[(N[(N[(F / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.32e+22], N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.6e+173], N[(N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision] * F + N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * F + N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;F \leq -5.2 \cdot 10^{-96}:\\
        \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
        
        \mathbf{elif}\;F \leq 3.1 \cdot 10^{-144}:\\
        \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\
        
        \mathbf{elif}\;F \leq 1.32 \cdot 10^{+22}:\\
        \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\
        
        \mathbf{elif}\;F \leq 1.6 \cdot 10^{+173}:\\
        \;\;\;\;\mathsf{fma}\left(\frac{1}{F \cdot B}, F, \frac{x}{0 - \tan B}\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, \frac{0 - x}{B}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 5 regimes
        2. if F < -5.2000000000000003e-96

          1. Initial program 57.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-/r/N/A

              \[\leadsto \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} \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) \]
            4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
            3. Step-by-step derivation
              1. /-lowering-/.f6474.9

                \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
            4. Simplified74.9%

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

            if -5.2000000000000003e-96 < F < 3.1000000000000001e-144

            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-sub0N/A

                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
              15. --lowering--.f6454.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}{0 - x}\right)}{B} \]
            5. Simplified54.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)}}, 0 - 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(0 - x\right)}{B}} \]
            7. Applied egg-rr54.9%

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

            if 3.1000000000000001e-144 < F < 1.32e22

            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. 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.f6468.3

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

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

            if 1.32e22 < F < 1.6000000000000001e173

            1. Initial program 83.6%

              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
            2. 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
              3. sin-lowering-sin.f6499.4

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

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

              \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \color{blue}{B}}, F, 0 - \frac{x}{\tan B}\right) \]
            9. Step-by-step derivation
              1. Simplified74.9%

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

              if 1.6000000000000001e173 < F

              1. Initial program 9.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
                3. sin-lowering-sin.f6499.5

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

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

                \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, 0 - \color{blue}{\frac{x}{B}}\right) \]
              9. Step-by-step derivation
                1. /-lowering-/.f6493.7

                  \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, 0 - \color{blue}{\frac{x}{B}}\right) \]
              10. Simplified93.7%

                \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, 0 - \color{blue}{\frac{x}{B}}\right) \]
            10. Recombined 5 regimes into one program.
            11. Final simplification71.3%

              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -5.2 \cdot 10^{-96}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.1 \cdot 10^{-144}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\ \mathbf{elif}\;F \leq 1.32 \cdot 10^{+22}:\\ \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\ \mathbf{elif}\;F \leq 1.6 \cdot 10^{+173}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{F \cdot B}, F, \frac{x}{0 - \tan B}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, \frac{0 - x}{B}\right)\\ \end{array} \]
            12. Add Preprocessing

            Alternative 7: 77.0% accurate, 2.3× speedup?

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

              1. Initial program 29.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 F around -inf

                \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
              4. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{-1}{\sin B}} \]
                2. sin-lowering-sin.f6499.7

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

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

                \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{-1}{\sin B} \]
              7. Step-by-step derivation
                1. /-lowering-/.f6479.5

                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]
              8. Simplified79.5%

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

              if -8.20000000000000033e153 < F < 7.00000000000000036e162

              1. Initial program 94.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. 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-/r/N/A

                  \[\leadsto \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} \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) \]
                4. associate-*l*N/A

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, \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}, F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, 0 - \frac{x}{\tan B}\right)} \]
              5. Step-by-step derivation
                1. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
                  3. unpow2N/A

                    \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
                  4. accelerator-lowering-fma.f6479.7

                    \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} - \frac{x}{\tan B} \]
                4. Simplified79.7%

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

                if 7.00000000000000036e162 < F

                1. Initial program 11.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
                  3. sin-lowering-sin.f6499.5

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, 0 - \color{blue}{\frac{x}{B}}\right) \]
                9. Step-by-step derivation
                  1. /-lowering-/.f6491.4

                    \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, 0 - \color{blue}{\frac{x}{B}}\right) \]
                10. Simplified91.4%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8.2 \cdot 10^{+153}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 7 \cdot 10^{+162}:\\ \;\;\;\;\frac{F}{B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, \frac{0 - x}{B}\right)\\ \end{array} \]
              11. Add Preprocessing

              Alternative 8: 61.4% accurate, 2.4× speedup?

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

                1. Initial program 57.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-/r/N/A

                    \[\leadsto \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} \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) \]
                  4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
                  3. Step-by-step derivation
                    1. /-lowering-/.f6474.9

                      \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
                  4. Simplified74.9%

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

                  if -1.39999999999999989e-109 < F < 1.00000000000000003e-117

                  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-sub0N/A

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

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

                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - 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(0 - x\right)}{B}} \]
                  7. Applied egg-rr56.2%

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

                  if 1.00000000000000003e-117 < F < 6.99999999999999955e172

                  1. Initial program 89.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
                    3. sin-lowering-sin.f6478.1

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \color{blue}{B}}, F, 0 - \frac{x}{\tan B}\right) \]
                  9. Step-by-step derivation
                    1. Simplified62.0%

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

                    if 6.99999999999999955e172 < F

                    1. Initial program 9.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
                      3. sin-lowering-sin.f6499.5

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, 0 - \color{blue}{\frac{x}{B}}\right) \]
                    9. Step-by-step derivation
                      1. /-lowering-/.f6493.7

                        \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, 0 - \color{blue}{\frac{x}{B}}\right) \]
                    10. Simplified93.7%

                      \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, 0 - \color{blue}{\frac{x}{B}}\right) \]
                  10. Recombined 4 regimes into one program.
                  11. Final simplification68.6%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.4 \cdot 10^{-109}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 10^{-117}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\ \mathbf{elif}\;F \leq 7 \cdot 10^{+172}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{F \cdot B}, F, \frac{x}{0 - \tan B}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{F \cdot \sin B}, F, \frac{0 - x}{B}\right)\\ \end{array} \]
                  12. Add Preprocessing

                  Alternative 9: 61.6% accurate, 2.5× speedup?

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

                    1. Initial program 57.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-/r/N/A

                        \[\leadsto \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} \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) \]
                      4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
                      3. Step-by-step derivation
                        1. /-lowering-/.f6474.9

                          \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
                      4. Simplified74.9%

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

                      if -6.8000000000000003e-98 < F < 4.8999999999999998e-118

                      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-sub0N/A

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

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

                        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - 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(0 - x\right)}{B}} \]
                      7. Applied egg-rr56.2%

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

                      if 4.8999999999999998e-118 < F

                      1. Initial program 66.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. 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \color{blue}{B}}, F, 0 - \frac{x}{\tan B}\right) \]
                      9. Step-by-step derivation
                        1. Simplified62.7%

                          \[\leadsto \mathsf{fma}\left(\frac{1}{F \cdot \color{blue}{B}}, F, 0 - \frac{x}{\tan B}\right) \]
                      10. Recombined 3 regimes into one program.
                      11. Final simplification65.5%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.8 \cdot 10^{-98}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4.9 \cdot 10^{-118}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{F \cdot B}, F, \frac{x}{0 - \tan B}\right)\\ \end{array} \]
                      12. Add Preprocessing

                      Alternative 10: 54.7% accurate, 2.8× speedup?

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

                        1. Initial program 67.6%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. 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-/r/N/A

                            \[\leadsto \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} \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) \]
                          4. associate-*l*N/A

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

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, 0 - \frac{x}{\tan B}\right)} \]
                        5. 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}} \]
                        6. Step-by-step derivation
                          1. /-lowering-/.f64N/A

                            \[\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}} \]
                        7. Simplified53.0%

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

                        if 0.0519999999999999976 < B

                        1. Initial program 82.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-/r/N/A

                            \[\leadsto \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} \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) \]
                          4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
                          3. Step-by-step derivation
                            1. /-lowering-/.f6448.0

                              \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
                          4. Simplified48.0%

                            \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
                        9. Recombined 2 regimes into one program.
                        10. Add Preprocessing

                        Alternative 11: 51.7% accurate, 3.0× speedup?

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

                          1. Initial program 29.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-sub0N/A

                              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                            15. --lowering--.f6427.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}{0 - x}\right)}{B} \]
                          5. Simplified27.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)}}, 0 - 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--.f6456.7

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

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

                          if -2.00000000000000007e154 < F < 62000

                          1. Initial program 95.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-sub0N/A

                              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                            15. --lowering--.f6451.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}{0 - x}\right)}{B} \]
                          5. Simplified51.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)}}, 0 - 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(0 - x\right)}{B}} \]
                          7. Applied egg-rr51.8%

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

                          if 62000 < F

                          1. Initial program 56.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{F \cdot \sin B}}, F, 0 - \frac{x}{\tan B}\right) \]
                            3. sin-lowering-sin.f6499.5

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

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

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

                              \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                            2. sin-lowering-sin.f6459.9

                              \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                          10. Simplified59.9%

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

                        Alternative 12: 50.1% accurate, 6.1× speedup?

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

                          1. Initial program 29.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-sub0N/A

                              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                            15. --lowering--.f6427.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}{0 - x}\right)}{B} \]
                          5. Simplified27.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)}}, 0 - 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--.f6456.7

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

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

                          if -2.00000000000000007e154 < F < 4.5e-42

                          1. Initial program 95.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-sub0N/A

                              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                            15. --lowering--.f6452.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}{0 - x}\right)}{B} \]
                          5. Simplified52.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)}}, 0 - 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(0 - x\right)}{B}} \]
                          7. Applied egg-rr52.6%

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

                          if 4.5e-42 < F

                          1. Initial program 60.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-sub0N/A

                              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                            15. --lowering--.f6428.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}{0 - x}\right)}{B} \]
                          5. Simplified28.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)}}, 0 - x\right)}{B}} \]
                          6. Taylor expanded in F around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(-0.5, \frac{\color{blue}{2}}{F \cdot \left(F \cdot B\right)}, \frac{1 - x}{B}\right) \]
                          11. Recombined 3 regimes into one program.
                          12. Add Preprocessing

                          Alternative 13: 43.4% accurate, 6.8× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -0.22:\\ \;\;\;\;\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 4.5 \cdot 10^{-42}:\\ \;\;\;\;\frac{0 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{2}{F \cdot \left(F \cdot B\right)}, \frac{1 - x}{B}\right)\\ \end{array} \end{array} \]
                          (FPCore (F B x)
                           :precision binary64
                           (if (<= F -0.22)
                             (/ (fma 0.5 (/ (fma 2.0 x 2.0) (* F F)) (- -1.0 x)) B)
                             (if (<= F 4.5e-42)
                               (/ (- 0.0 x) B)
                               (fma -0.5 (/ 2.0 (* F (* F B))) (/ (- 1.0 x) B)))))
                          double code(double F, double B, double x) {
                          	double tmp;
                          	if (F <= -0.22) {
                          		tmp = fma(0.5, (fma(2.0, x, 2.0) / (F * F)), (-1.0 - x)) / B;
                          	} else if (F <= 4.5e-42) {
                          		tmp = (0.0 - x) / B;
                          	} else {
                          		tmp = fma(-0.5, (2.0 / (F * (F * B))), ((1.0 - x) / B));
                          	}
                          	return tmp;
                          }
                          
                          function code(F, B, x)
                          	tmp = 0.0
                          	if (F <= -0.22)
                          		tmp = Float64(fma(0.5, Float64(fma(2.0, x, 2.0) / Float64(F * F)), Float64(-1.0 - x)) / B);
                          	elseif (F <= 4.5e-42)
                          		tmp = Float64(Float64(0.0 - x) / B);
                          	else
                          		tmp = fma(-0.5, Float64(2.0 / Float64(F * Float64(F * B))), Float64(Float64(1.0 - x) / B));
                          	end
                          	return tmp
                          end
                          
                          code[F_, B_, x_] := If[LessEqual[F, -0.22], 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, 4.5e-42], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(-0.5 * N[(2.0 / N[(F * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;F \leq -0.22:\\
                          \;\;\;\;\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 4.5 \cdot 10^{-42}:\\
                          \;\;\;\;\frac{0 - x}{B}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\mathsf{fma}\left(-0.5, \frac{2}{F \cdot \left(F \cdot B\right)}, \frac{1 - x}{B}\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if F < -0.220000000000000001

                            1. Initial program 51.6%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. 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-sub0N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                              15. --lowering--.f6437.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}{0 - x}\right)}{B} \]
                            5. Simplified37.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)}}, 0 - 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--.f6455.1

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

                              \[\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 -0.220000000000000001 < F < 4.5e-42

                            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-sub0N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                              15. --lowering--.f6452.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}{0 - x}\right)}{B} \]
                            5. Simplified52.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)}}, 0 - x\right)}{B}} \]
                            6. Taylor expanded in F around 0

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

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

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

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

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

                            if 4.5e-42 < F

                            1. Initial program 60.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-sub0N/A

                                \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                              15. --lowering--.f6428.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}{0 - x}\right)}{B} \]
                            5. Simplified28.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)}}, 0 - x\right)}{B}} \]
                            6. Taylor expanded in F around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(-0.5, \frac{\color{blue}{2}}{F \cdot \left(F \cdot B\right)}, \frac{1 - x}{B}\right) \]
                            11. Recombined 3 regimes into one program.
                            12. Add Preprocessing

                            Alternative 14: 43.5% accurate, 6.8× speedup?

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

                              1. Initial program 53.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-sub0N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                                15. --lowering--.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}{0 - 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)}}, 0 - 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--.f6453.6

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

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

                              if -5.09999999999999973e-36 < F < 4.5e-42

                              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-sub0N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                                15. --lowering--.f6451.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}{0 - x}\right)}{B} \]
                              5. Simplified51.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)}}, 0 - x\right)}{B}} \]
                              6. Taylor expanded in F around 0

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

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

                                  \[\leadsto \frac{\color{blue}{0 - x}}{B} \]
                                3. --lowering--.f6433.5

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

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

                              if 4.5e-42 < F

                              1. Initial program 60.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-sub0N/A

                                  \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                                15. --lowering--.f6428.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}{0 - x}\right)}{B} \]
                              5. Simplified28.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)}}, 0 - x\right)}{B}} \]
                              6. Taylor expanded in F around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(-0.5, \frac{\color{blue}{2}}{F \cdot \left(F \cdot B\right)}, \frac{1 - x}{B}\right) \]
                              11. Recombined 3 regimes into one program.
                              12. Add Preprocessing

                              Alternative 15: 43.3% accurate, 13.6× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -5.4 \cdot 10^{-36}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{-115}:\\ \;\;\;\;\frac{0 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                              (FPCore (F B x)
                               :precision binary64
                               (if (<= F -5.4e-36)
                                 (/ (- -1.0 x) B)
                                 (if (<= F 2.8e-115) (/ (- 0.0 x) B) (/ (- 1.0 x) B))))
                              double code(double F, double B, double x) {
                              	double tmp;
                              	if (F <= -5.4e-36) {
                              		tmp = (-1.0 - x) / B;
                              	} else if (F <= 2.8e-115) {
                              		tmp = (0.0 - x) / B;
                              	} else {
                              		tmp = (1.0 - x) / B;
                              	}
                              	return tmp;
                              }
                              
                              real(8) function code(f, b, x)
                                  real(8), intent (in) :: f
                                  real(8), intent (in) :: b
                                  real(8), intent (in) :: x
                                  real(8) :: tmp
                                  if (f <= (-5.4d-36)) then
                                      tmp = ((-1.0d0) - x) / b
                                  else if (f <= 2.8d-115) then
                                      tmp = (0.0d0 - x) / b
                                  else
                                      tmp = (1.0d0 - x) / b
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double F, double B, double x) {
                              	double tmp;
                              	if (F <= -5.4e-36) {
                              		tmp = (-1.0 - x) / B;
                              	} else if (F <= 2.8e-115) {
                              		tmp = (0.0 - x) / B;
                              	} else {
                              		tmp = (1.0 - x) / B;
                              	}
                              	return tmp;
                              }
                              
                              def code(F, B, x):
                              	tmp = 0
                              	if F <= -5.4e-36:
                              		tmp = (-1.0 - x) / B
                              	elif F <= 2.8e-115:
                              		tmp = (0.0 - x) / B
                              	else:
                              		tmp = (1.0 - x) / B
                              	return tmp
                              
                              function code(F, B, x)
                              	tmp = 0.0
                              	if (F <= -5.4e-36)
                              		tmp = Float64(Float64(-1.0 - x) / B);
                              	elseif (F <= 2.8e-115)
                              		tmp = Float64(Float64(0.0 - x) / B);
                              	else
                              		tmp = Float64(Float64(1.0 - x) / B);
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(F, B, x)
                              	tmp = 0.0;
                              	if (F <= -5.4e-36)
                              		tmp = (-1.0 - x) / B;
                              	elseif (F <= 2.8e-115)
                              		tmp = (0.0 - x) / B;
                              	else
                              		tmp = (1.0 - x) / B;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[F_, B_, x_] := If[LessEqual[F, -5.4e-36], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.8e-115], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;F \leq -5.4 \cdot 10^{-36}:\\
                              \;\;\;\;\frac{-1 - x}{B}\\
                              
                              \mathbf{elif}\;F \leq 2.8 \cdot 10^{-115}:\\
                              \;\;\;\;\frac{0 - x}{B}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{1 - x}{B}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if F < -5.40000000000000015e-36

                                1. Initial program 53.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-sub0N/A

                                    \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                                  15. --lowering--.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}{0 - 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)}}, 0 - 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--.f6453.6

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

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

                                if -5.40000000000000015e-36 < F < 2.79999999999999987e-115

                                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-sub0N/A

                                    \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                                  15. --lowering--.f6454.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}{0 - x}\right)}{B} \]
                                5. Simplified54.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)}}, 0 - x\right)}{B}} \]
                                6. Taylor expanded in F around 0

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

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

                                    \[\leadsto \frac{\color{blue}{0 - x}}{B} \]
                                  3. --lowering--.f6437.5

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

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

                                if 2.79999999999999987e-115 < F

                                1. Initial program 66.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-sub0N/A

                                    \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                                  15. --lowering--.f6429.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}{0 - x}\right)}{B} \]
                                5. Simplified29.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)}}, 0 - 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--.f6438.9

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

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

                              Alternative 16: 36.5% accurate, 17.5× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -7.5 \cdot 10^{-36}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{0 - x}{B}\\ \end{array} \end{array} \]
                              (FPCore (F B x)
                               :precision binary64
                               (if (<= F -7.5e-36) (/ (- -1.0 x) B) (/ (- 0.0 x) B)))
                              double code(double F, double B, double x) {
                              	double tmp;
                              	if (F <= -7.5e-36) {
                              		tmp = (-1.0 - x) / B;
                              	} else {
                              		tmp = (0.0 - x) / B;
                              	}
                              	return tmp;
                              }
                              
                              real(8) function code(f, b, x)
                                  real(8), intent (in) :: f
                                  real(8), intent (in) :: b
                                  real(8), intent (in) :: x
                                  real(8) :: tmp
                                  if (f <= (-7.5d-36)) then
                                      tmp = ((-1.0d0) - x) / b
                                  else
                                      tmp = (0.0d0 - x) / b
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double F, double B, double x) {
                              	double tmp;
                              	if (F <= -7.5e-36) {
                              		tmp = (-1.0 - x) / B;
                              	} else {
                              		tmp = (0.0 - x) / B;
                              	}
                              	return tmp;
                              }
                              
                              def code(F, B, x):
                              	tmp = 0
                              	if F <= -7.5e-36:
                              		tmp = (-1.0 - x) / B
                              	else:
                              		tmp = (0.0 - x) / B
                              	return tmp
                              
                              function code(F, B, x)
                              	tmp = 0.0
                              	if (F <= -7.5e-36)
                              		tmp = Float64(Float64(-1.0 - x) / B);
                              	else
                              		tmp = Float64(Float64(0.0 - x) / B);
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(F, B, x)
                              	tmp = 0.0;
                              	if (F <= -7.5e-36)
                              		tmp = (-1.0 - x) / B;
                              	else
                              		tmp = (0.0 - x) / B;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[F_, B_, x_] := If[LessEqual[F, -7.5e-36], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;F \leq -7.5 \cdot 10^{-36}:\\
                              \;\;\;\;\frac{-1 - x}{B}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{0 - x}{B}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if F < -7.49999999999999972e-36

                                1. Initial program 53.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-sub0N/A

                                    \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                                  15. --lowering--.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}{0 - 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)}}, 0 - 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--.f6453.6

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

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

                                if -7.49999999999999972e-36 < F

                                1. Initial program 80.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-sub0N/A

                                    \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
                                  15. --lowering--.f6440.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}{0 - x}\right)}{B} \]
                                5. Simplified40.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)}}, 0 - x\right)}{B}} \]
                                6. Taylor expanded in F around 0

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

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

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

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

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

                              Alternative 17: 29.9% accurate, 24.5× speedup?

                              \[\begin{array}{l} \\ \frac{-1 - x}{B} \end{array} \]
                              (FPCore (F B x) :precision binary64 (/ (- -1.0 x) B))
                              double code(double F, double B, double x) {
                              	return (-1.0 - 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 = ((-1.0d0) - x) / b
                              end function
                              
                              public static double code(double F, double B, double x) {
                              	return (-1.0 - x) / B;
                              }
                              
                              def code(F, B, x):
                              	return (-1.0 - x) / B
                              
                              function code(F, B, x)
                              	return Float64(Float64(-1.0 - x) / B)
                              end
                              
                              function tmp = code(F, B, x)
                              	tmp = (-1.0 - x) / B;
                              end
                              
                              code[F_, B_, x_] := N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]
                              
                              \begin{array}{l}
                              
                              \\
                              \frac{-1 - x}{B}
                              \end{array}
                              
                              Derivation
                              1. Initial program 71.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-sub0N/A

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

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

                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - 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--.f6428.6

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

                                \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]
                              9. Add Preprocessing

                              Alternative 18: 10.5% 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 71.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-sub0N/A

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

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

                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - 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--.f6428.6

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

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

                                  \[\leadsto \color{blue}{\frac{-1}{B}} \]
                              11. Simplified12.3%

                                \[\leadsto \color{blue}{\frac{-1}{B}} \]
                              12. Add Preprocessing

                              Reproduce

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