VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.7% → 99.6%
Time: 16.5s
Alternatives: 20
Speedup: 2.2×

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 20 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.7% 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.6% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 24.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999998e155 < F < 1e6

    1. Initial program 98.2%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
      3. associate-/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.7%

      \[\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}, -\frac{x}{\tan B}\right)} \]
    5. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e6 < F

    1. Initial program 55.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.f6499.8

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.8%

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

Alternative 2: 99.7% accurate, 1.4× speedup?

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

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

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

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


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

    1. Initial program 24.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
      3. associate-/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-rr38.8%

      \[\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}, -\frac{x}{\tan B}\right)} \]
    5. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    11. Simplified99.7%

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

    if -2.00000000000000003e151 < F < 5e8

    1. Initial program 98.2%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
      3. associate-/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.7%

      \[\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}, -\frac{x}{\tan B}\right)} \]
    5. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e8 < F

    1. Initial program 55.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.f6499.8

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.8%

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

Alternative 3: 99.1% accurate, 1.4× speedup?

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

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

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

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


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

    1. Initial program 55.9%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    11. Simplified99.8%

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

    if -190 < F < 1.3500000000000001

    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}, -\frac{x}{\tan B}\right)} \]
    5. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{\tan B} \]
    10. 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.7

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

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

    if 1.3500000000000001 < F

    1. Initial program 56.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 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.8

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

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

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

Alternative 4: 90.2% accurate, 1.5× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\


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

    1. Initial program 57.2%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    11. Simplified99.8%

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

    if -1.4500000000000001e-12 < F < 4.6e-57

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.6e-57 < F

    1. Initial program 59.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.f6494.7

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

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification92.6%

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

Alternative 5: 90.3% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;F \leq 4.6 \cdot 10^{-57}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\

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


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

    1. Initial program 57.2%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    11. Simplified99.8%

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

    if -1.4500000000000001e-12 < F < 4.6e-57

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.6e-57 < F

    1. Initial program 59.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-rr78.8%

      \[\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}, -\frac{x}{\tan B}\right)} \]
    5. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    11. Simplified94.7%

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

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

Alternative 6: 80.6% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;F \leq 3.05 \cdot 10^{+60}:\\
\;\;\;\;t\_0 + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\

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

\mathbf{else}:\\
\;\;\;\;t\_0\\


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

    1. Initial program 57.2%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    11. Simplified99.8%

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

    if -1.4500000000000001e-12 < F < 3.05e60

    1. Initial program 98.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 \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.05e60 < F < 3.5e123

    1. Initial program 71.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. 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.5%

      \[\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}, -\frac{x}{\tan B}\right)} \]
    5. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.5e123 < F

      1. Initial program 38.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 x around inf

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{-1}{\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}} \]
        5. tan-quotN/A

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

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

          \[\leadsto \frac{-1}{\color{blue}{\frac{\tan B}{x}}} \]
        8. tan-lowering-tan.f6461.3

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

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

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

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

          \[\leadsto \color{blue}{\frac{-1}{\tan B}} \cdot x \]
        4. tan-lowering-tan.f6461.3

          \[\leadsto \frac{-1}{\color{blue}{\tan B}} \cdot x \]
      9. Applied egg-rr61.3%

        \[\leadsto \color{blue}{\frac{-1}{\tan B} \cdot x} \]
    11. Recombined 4 regimes into one program.
    12. Final simplification84.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.45 \cdot 10^{-12}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.05 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 3.5 \cdot 10^{+123}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \end{array} \]
    13. Add Preprocessing

    Alternative 7: 76.8% accurate, 2.2× speedup?

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

      1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.19999999999999999e-93 < x < 1.2000000000000001e-11

      1. Initial program 70.0%

        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. +-commutativeN/A

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

          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        3. associate-/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-rr72.8%

        \[\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}, -\frac{x}{\tan B}\right)} \]
      5. Step-by-step derivation
        1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 8: 71.8% accurate, 2.4× speedup?

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

        1. Initial program 78.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.10000000000000006e-107 < x < 1.1000000000000001e-11

        1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 9: 56.7% accurate, 2.5× speedup?

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

        1. Initial program 72.0%

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

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

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

        if 1.3999999999999999 < B

        1. Initial program 81.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 x around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 10: 56.9% accurate, 3.1× speedup?

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

        1. Initial program 72.0%

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, x \cdot \mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{45}, \frac{1}{3}\right), \mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \mathsf{neg}\left(x\right)\right)\right)}{B} \]
          6. *-lowering-*.f6453.5

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

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

        if 1.3999999999999999 < B

        1. Initial program 81.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 x around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 11: 51.0% accurate, 5.2× speedup?

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

        1. Initial program 24.3%

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

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

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

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

            \[\leadsto \frac{\color{blue}{\left({B}^{2} \cdot \left(\left(\frac{-7}{360} \cdot {B}^{2} + x \cdot \left(\frac{1}{3} + \frac{1}{45} \cdot {B}^{2}\right)\right) - \frac{1}{6}\right) - 1\right) - x}}{B} \]
          2. --lowering--.f64N/A

            \[\leadsto \frac{\color{blue}{\left({B}^{2} \cdot \left(\left(\frac{-7}{360} \cdot {B}^{2} + x \cdot \left(\frac{1}{3} + \frac{1}{45} \cdot {B}^{2}\right)\right) - \frac{1}{6}\right) - 1\right) - x}}{B} \]
        7. Simplified59.6%

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

        if -1.35000000000000003e154 < F < 1e6

        1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1e6 < F

        1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 12: 50.9% accurate, 5.7× speedup?

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

        1. Initial program 24.3%

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

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

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

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

            \[\leadsto \frac{\color{blue}{\left({B}^{2} \cdot \left(\left(\frac{-7}{360} \cdot {B}^{2} + x \cdot \left(\frac{1}{3} + \frac{1}{45} \cdot {B}^{2}\right)\right) - \frac{1}{6}\right) - 1\right) - x}}{B} \]
          2. --lowering--.f64N/A

            \[\leadsto \frac{\color{blue}{\left({B}^{2} \cdot \left(\left(\frac{-7}{360} \cdot {B}^{2} + x \cdot \left(\frac{1}{3} + \frac{1}{45} \cdot {B}^{2}\right)\right) - \frac{1}{6}\right) - 1\right) - x}}{B} \]
        7. Simplified59.6%

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

        if -6.0999999999999998e153 < F < 9.99999999999999914e28

        1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 9.99999999999999914e28 < F

        1. Initial program 52.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-lowering-neg.f6447.4

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

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, 1\right) - x}{B} \]
          6. 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}}, 1\right) - x}{B} \]
          7. unpow2N/A

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

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

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

      Alternative 13: 43.4% accurate, 6.0× speedup?

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

        1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.3500000000000001e-68 < F < -5.50000000000000036e-127

        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 B around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2}}}}{B} \]
          3. sqrt-lowering-sqrt.f6468.1

            \[\leadsto \frac{F \cdot \color{blue}{\sqrt{0.5}}}{B} \]
        11. Simplified68.1%

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

        if -5.50000000000000036e-127 < F < 3.1e5

        1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \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-lowering-neg.f6429.2

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

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

        if 3.1e5 < F

        1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, 1\right) - x}{B} \]
          6. 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}}, 1\right) - x}{B} \]
          7. unpow2N/A

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

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

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

      Alternative 14: 50.7% accurate, 6.2× speedup?

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

        1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{-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--.f6447.2

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

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

        if -190 < F < 3.1e5

        1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{-1 \cdot \frac{x}{B} + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 3.1e5 < F

        1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, 1\right) - x}{B} \]
          6. 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}}, 1\right) - x}{B} \]
          7. unpow2N/A

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

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

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

      Alternative 15: 43.0% accurate, 9.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-68}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -2.9 \cdot 10^{-126}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{B}\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{-121}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (if (<= F -4e-68)
         (/ (- -1.0 x) B)
         (if (<= F -2.9e-126)
           (/ (* F (sqrt 0.5)) B)
           (if (<= F 2.1e-121) (/ (- x) B) (/ (- 1.0 x) B)))))
      double code(double F, double B, double x) {
      	double tmp;
      	if (F <= -4e-68) {
      		tmp = (-1.0 - x) / B;
      	} else if (F <= -2.9e-126) {
      		tmp = (F * sqrt(0.5)) / B;
      	} else if (F <= 2.1e-121) {
      		tmp = -x / B;
      	} else {
      		tmp = (1.0 - x) / B;
      	}
      	return tmp;
      }
      
      real(8) function code(f, b, x)
          real(8), intent (in) :: f
          real(8), intent (in) :: b
          real(8), intent (in) :: x
          real(8) :: tmp
          if (f <= (-4d-68)) then
              tmp = ((-1.0d0) - x) / b
          else if (f <= (-2.9d-126)) then
              tmp = (f * sqrt(0.5d0)) / b
          else if (f <= 2.1d-121) then
              tmp = -x / b
          else
              tmp = (1.0d0 - x) / b
          end if
          code = tmp
      end function
      
      public static double code(double F, double B, double x) {
      	double tmp;
      	if (F <= -4e-68) {
      		tmp = (-1.0 - x) / B;
      	} else if (F <= -2.9e-126) {
      		tmp = (F * Math.sqrt(0.5)) / B;
      	} else if (F <= 2.1e-121) {
      		tmp = -x / B;
      	} else {
      		tmp = (1.0 - x) / B;
      	}
      	return tmp;
      }
      
      def code(F, B, x):
      	tmp = 0
      	if F <= -4e-68:
      		tmp = (-1.0 - x) / B
      	elif F <= -2.9e-126:
      		tmp = (F * math.sqrt(0.5)) / B
      	elif F <= 2.1e-121:
      		tmp = -x / B
      	else:
      		tmp = (1.0 - x) / B
      	return tmp
      
      function code(F, B, x)
      	tmp = 0.0
      	if (F <= -4e-68)
      		tmp = Float64(Float64(-1.0 - x) / B);
      	elseif (F <= -2.9e-126)
      		tmp = Float64(Float64(F * sqrt(0.5)) / B);
      	elseif (F <= 2.1e-121)
      		tmp = Float64(Float64(-x) / B);
      	else
      		tmp = Float64(Float64(1.0 - x) / B);
      	end
      	return tmp
      end
      
      function tmp_2 = code(F, B, x)
      	tmp = 0.0;
      	if (F <= -4e-68)
      		tmp = (-1.0 - x) / B;
      	elseif (F <= -2.9e-126)
      		tmp = (F * sqrt(0.5)) / B;
      	elseif (F <= 2.1e-121)
      		tmp = -x / B;
      	else
      		tmp = (1.0 - x) / B;
      	end
      	tmp_2 = tmp;
      end
      
      code[F_, B_, x_] := If[LessEqual[F, -4e-68], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -2.9e-126], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.1e-121], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;F \leq -4 \cdot 10^{-68}:\\
      \;\;\;\;\frac{-1 - x}{B}\\
      
      \mathbf{elif}\;F \leq -2.9 \cdot 10^{-126}:\\
      \;\;\;\;\frac{F \cdot \sqrt{0.5}}{B}\\
      
      \mathbf{elif}\;F \leq 2.1 \cdot 10^{-121}:\\
      \;\;\;\;\frac{-x}{B}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{1 - x}{B}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if F < -4.00000000000000027e-68

        1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.00000000000000027e-68 < F < -2.89999999999999988e-126

        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 B around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2}}}}{B} \]
          3. sqrt-lowering-sqrt.f6468.1

            \[\leadsto \frac{F \cdot \color{blue}{\sqrt{0.5}}}{B} \]
        11. Simplified68.1%

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

        if -2.89999999999999988e-126 < F < 2.0999999999999999e-121

        1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \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-lowering-neg.f6433.1

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

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

        if 2.0999999999999999e-121 < F

        1. Initial program 63.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 16: 36.1% accurate, 11.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;F \leq -9 \cdot 10^{-183}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 360000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{+199}:\\ \;\;\;\;\frac{1}{B}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (let* ((t_0 (/ (- x) B)))
         (if (<= F -9e-183)
           (/ (- -1.0 x) B)
           (if (<= F 360000.0) t_0 (if (<= F 2.5e+199) (/ 1.0 B) t_0)))))
      double code(double F, double B, double x) {
      	double t_0 = -x / B;
      	double tmp;
      	if (F <= -9e-183) {
      		tmp = (-1.0 - x) / B;
      	} else if (F <= 360000.0) {
      		tmp = t_0;
      	} else if (F <= 2.5e+199) {
      		tmp = 1.0 / B;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      real(8) function code(f, b, x)
          real(8), intent (in) :: f
          real(8), intent (in) :: b
          real(8), intent (in) :: x
          real(8) :: t_0
          real(8) :: tmp
          t_0 = -x / b
          if (f <= (-9d-183)) then
              tmp = ((-1.0d0) - x) / b
          else if (f <= 360000.0d0) then
              tmp = t_0
          else if (f <= 2.5d+199) then
              tmp = 1.0d0 / b
          else
              tmp = t_0
          end if
          code = tmp
      end function
      
      public static double code(double F, double B, double x) {
      	double t_0 = -x / B;
      	double tmp;
      	if (F <= -9e-183) {
      		tmp = (-1.0 - x) / B;
      	} else if (F <= 360000.0) {
      		tmp = t_0;
      	} else if (F <= 2.5e+199) {
      		tmp = 1.0 / B;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      def code(F, B, x):
      	t_0 = -x / B
      	tmp = 0
      	if F <= -9e-183:
      		tmp = (-1.0 - x) / B
      	elif F <= 360000.0:
      		tmp = t_0
      	elif F <= 2.5e+199:
      		tmp = 1.0 / B
      	else:
      		tmp = t_0
      	return tmp
      
      function code(F, B, x)
      	t_0 = Float64(Float64(-x) / B)
      	tmp = 0.0
      	if (F <= -9e-183)
      		tmp = Float64(Float64(-1.0 - x) / B);
      	elseif (F <= 360000.0)
      		tmp = t_0;
      	elseif (F <= 2.5e+199)
      		tmp = Float64(1.0 / B);
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(F, B, x)
      	t_0 = -x / B;
      	tmp = 0.0;
      	if (F <= -9e-183)
      		tmp = (-1.0 - x) / B;
      	elseif (F <= 360000.0)
      		tmp = t_0;
      	elseif (F <= 2.5e+199)
      		tmp = 1.0 / B;
      	else
      		tmp = t_0;
      	end
      	tmp_2 = tmp;
      end
      
      code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[F, -9e-183], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 360000.0], t$95$0, If[LessEqual[F, 2.5e+199], N[(1.0 / B), $MachinePrecision], t$95$0]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{-x}{B}\\
      \mathbf{if}\;F \leq -9 \cdot 10^{-183}:\\
      \;\;\;\;\frac{-1 - x}{B}\\
      
      \mathbf{elif}\;F \leq 360000:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;F \leq 2.5 \cdot 10^{+199}:\\
      \;\;\;\;\frac{1}{B}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if F < -8.99999999999999942e-183

        1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -8.99999999999999942e-183 < F < 3.6e5 or 2.4999999999999999e199 < F

        1. Initial program 81.9%

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

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          5. /-lowering-/.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          6. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          7. associate-+l+N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          10. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          11. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          12. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          13. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          14. neg-lowering-neg.f6438.8

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
        5. Simplified38.8%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
        6. Taylor expanded in F around 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-lowering-neg.f6433.3

            \[\leadsto \frac{\color{blue}{-x}}{B} \]
        8. Simplified33.3%

          \[\leadsto \frac{\color{blue}{-x}}{B} \]

        if 3.6e5 < F < 2.4999999999999999e199

        1. Initial program 66.1%

          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in B around 0

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          2. sub-negN/A

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
          3. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
          4. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          5. /-lowering-/.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          6. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          7. associate-+l+N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          10. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          11. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          12. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          13. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          14. neg-lowering-neg.f6449.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}{-x}\right)}{B} \]
        5. Simplified49.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)}}, -x\right)}{B}} \]
        6. Taylor expanded in x around 0

          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
          2. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
          3. /-lowering-/.f64N/A

            \[\leadsto \frac{F \cdot \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}}{B} \]
          4. +-commutativeN/A

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{B} \]
          5. unpow2N/A

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{B} \]
          6. accelerator-lowering-fma.f6431.2

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}}{B} \]
        8. Simplified31.2%

          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}{B} \]
        9. Taylor expanded in F around inf

          \[\leadsto \color{blue}{\frac{1}{B}} \]
        10. Step-by-step derivation
          1. /-lowering-/.f6438.1

            \[\leadsto \color{blue}{\frac{1}{B}} \]
        11. Simplified38.1%

          \[\leadsto \color{blue}{\frac{1}{B}} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 17: 42.1% accurate, 13.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -9 \cdot 10^{-183}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{-121}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (if (<= F -9e-183)
         (/ (- -1.0 x) B)
         (if (<= F 2.1e-121) (/ (- x) B) (/ (- 1.0 x) B))))
      double code(double F, double B, double x) {
      	double tmp;
      	if (F <= -9e-183) {
      		tmp = (-1.0 - x) / B;
      	} else if (F <= 2.1e-121) {
      		tmp = -x / B;
      	} else {
      		tmp = (1.0 - x) / B;
      	}
      	return tmp;
      }
      
      real(8) function code(f, b, x)
          real(8), intent (in) :: f
          real(8), intent (in) :: b
          real(8), intent (in) :: x
          real(8) :: tmp
          if (f <= (-9d-183)) then
              tmp = ((-1.0d0) - x) / b
          else if (f <= 2.1d-121) then
              tmp = -x / b
          else
              tmp = (1.0d0 - x) / b
          end if
          code = tmp
      end function
      
      public static double code(double F, double B, double x) {
      	double tmp;
      	if (F <= -9e-183) {
      		tmp = (-1.0 - x) / B;
      	} else if (F <= 2.1e-121) {
      		tmp = -x / B;
      	} else {
      		tmp = (1.0 - x) / B;
      	}
      	return tmp;
      }
      
      def code(F, B, x):
      	tmp = 0
      	if F <= -9e-183:
      		tmp = (-1.0 - x) / B
      	elif F <= 2.1e-121:
      		tmp = -x / B
      	else:
      		tmp = (1.0 - x) / B
      	return tmp
      
      function code(F, B, x)
      	tmp = 0.0
      	if (F <= -9e-183)
      		tmp = Float64(Float64(-1.0 - x) / B);
      	elseif (F <= 2.1e-121)
      		tmp = Float64(Float64(-x) / B);
      	else
      		tmp = Float64(Float64(1.0 - x) / B);
      	end
      	return tmp
      end
      
      function tmp_2 = code(F, B, x)
      	tmp = 0.0;
      	if (F <= -9e-183)
      		tmp = (-1.0 - x) / B;
      	elseif (F <= 2.1e-121)
      		tmp = -x / B;
      	else
      		tmp = (1.0 - x) / B;
      	end
      	tmp_2 = tmp;
      end
      
      code[F_, B_, x_] := If[LessEqual[F, -9e-183], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.1e-121], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;F \leq -9 \cdot 10^{-183}:\\
      \;\;\;\;\frac{-1 - x}{B}\\
      
      \mathbf{elif}\;F \leq 2.1 \cdot 10^{-121}:\\
      \;\;\;\;\frac{-x}{B}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{1 - x}{B}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if F < -8.99999999999999942e-183

        1. Initial program 70.1%

          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in B around 0

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          2. sub-negN/A

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
          3. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
          4. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          5. /-lowering-/.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          6. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          7. associate-+l+N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          10. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          11. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          12. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          13. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          14. neg-lowering-neg.f6437.2

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
        5. Simplified37.2%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
        6. Taylor expanded in F around -inf

          \[\leadsto \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--.f6443.3

            \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
        8. Simplified43.3%

          \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]

        if -8.99999999999999942e-183 < F < 2.0999999999999999e-121

        1. Initial program 99.5%

          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in B around 0

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          2. sub-negN/A

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
          3. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
          4. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          5. /-lowering-/.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          6. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          7. associate-+l+N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          10. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          11. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          12. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          13. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          14. neg-lowering-neg.f6441.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}{-x}\right)}{B} \]
        5. Simplified41.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)}}, -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-lowering-neg.f6432.6

            \[\leadsto \frac{\color{blue}{-x}}{B} \]
        8. Simplified32.6%

          \[\leadsto \frac{\color{blue}{-x}}{B} \]

        if 2.0999999999999999e-121 < F

        1. Initial program 63.3%

          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in B around 0

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          2. sub-negN/A

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
          3. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
          4. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          5. /-lowering-/.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          6. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          7. associate-+l+N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          10. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          11. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          12. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          13. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          14. neg-lowering-neg.f6442.6

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
        5. Simplified42.6%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
        6. Taylor expanded in F around inf

          \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
        7. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
          2. --lowering--.f6449.4

            \[\leadsto \frac{\color{blue}{1 - x}}{B} \]
        8. Simplified49.4%

          \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 18: 30.1% accurate, 14.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;x \leq -4 \cdot 10^{-217}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{-27}:\\ \;\;\;\;\frac{1}{B}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (let* ((t_0 (/ (- x) B)))
         (if (<= x -4e-217) t_0 (if (<= x 5.6e-27) (/ 1.0 B) t_0))))
      double code(double F, double B, double x) {
      	double t_0 = -x / B;
      	double tmp;
      	if (x <= -4e-217) {
      		tmp = t_0;
      	} else if (x <= 5.6e-27) {
      		tmp = 1.0 / B;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      real(8) function code(f, b, x)
          real(8), intent (in) :: f
          real(8), intent (in) :: b
          real(8), intent (in) :: x
          real(8) :: t_0
          real(8) :: tmp
          t_0 = -x / b
          if (x <= (-4d-217)) then
              tmp = t_0
          else if (x <= 5.6d-27) then
              tmp = 1.0d0 / b
          else
              tmp = t_0
          end if
          code = tmp
      end function
      
      public static double code(double F, double B, double x) {
      	double t_0 = -x / B;
      	double tmp;
      	if (x <= -4e-217) {
      		tmp = t_0;
      	} else if (x <= 5.6e-27) {
      		tmp = 1.0 / B;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      def code(F, B, x):
      	t_0 = -x / B
      	tmp = 0
      	if x <= -4e-217:
      		tmp = t_0
      	elif x <= 5.6e-27:
      		tmp = 1.0 / B
      	else:
      		tmp = t_0
      	return tmp
      
      function code(F, B, x)
      	t_0 = Float64(Float64(-x) / B)
      	tmp = 0.0
      	if (x <= -4e-217)
      		tmp = t_0;
      	elseif (x <= 5.6e-27)
      		tmp = Float64(1.0 / B);
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(F, B, x)
      	t_0 = -x / B;
      	tmp = 0.0;
      	if (x <= -4e-217)
      		tmp = t_0;
      	elseif (x <= 5.6e-27)
      		tmp = 1.0 / B;
      	else
      		tmp = t_0;
      	end
      	tmp_2 = tmp;
      end
      
      code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[x, -4e-217], t$95$0, If[LessEqual[x, 5.6e-27], N[(1.0 / B), $MachinePrecision], t$95$0]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{-x}{B}\\
      \mathbf{if}\;x \leq -4 \cdot 10^{-217}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;x \leq 5.6 \cdot 10^{-27}:\\
      \;\;\;\;\frac{1}{B}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -4.00000000000000033e-217 or 5.5999999999999999e-27 < x

        1. Initial program 77.7%

          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in B around 0

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          2. sub-negN/A

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
          3. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
          4. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          5. /-lowering-/.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          6. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          7. associate-+l+N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          10. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          11. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          12. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          13. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          14. neg-lowering-neg.f6443.3

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
        5. Simplified43.3%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
        6. Taylor expanded in F around 0

          \[\leadsto \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-lowering-neg.f6436.6

            \[\leadsto \frac{\color{blue}{-x}}{B} \]
        8. Simplified36.6%

          \[\leadsto \frac{\color{blue}{-x}}{B} \]

        if -4.00000000000000033e-217 < x < 5.5999999999999999e-27

        1. Initial program 67.3%

          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in B around 0

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          2. sub-negN/A

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
          3. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
          4. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          5. /-lowering-/.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          6. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          7. associate-+l+N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          10. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          11. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          12. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          13. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          14. neg-lowering-neg.f6433.2

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
        5. Simplified33.2%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
        6. Taylor expanded in x around 0

          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
          2. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
          3. /-lowering-/.f64N/A

            \[\leadsto \frac{F \cdot \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}}{B} \]
          4. +-commutativeN/A

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{B} \]
          5. unpow2N/A

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{B} \]
          6. accelerator-lowering-fma.f6427.7

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}}{B} \]
        8. Simplified27.7%

          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}{B} \]
        9. Taylor expanded in F around inf

          \[\leadsto \color{blue}{\frac{1}{B}} \]
        10. Step-by-step derivation
          1. /-lowering-/.f6421.8

            \[\leadsto \color{blue}{\frac{1}{B}} \]
        11. Simplified21.8%

          \[\leadsto \color{blue}{\frac{1}{B}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 19: 17.5% accurate, 20.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.05 \cdot 10^{-282}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (if (<= F -3.05e-282) (/ -1.0 B) (/ 1.0 B)))
      double code(double F, double B, double x) {
      	double tmp;
      	if (F <= -3.05e-282) {
      		tmp = -1.0 / B;
      	} else {
      		tmp = 1.0 / 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 <= (-3.05d-282)) then
              tmp = (-1.0d0) / b
          else
              tmp = 1.0d0 / b
          end if
          code = tmp
      end function
      
      public static double code(double F, double B, double x) {
      	double tmp;
      	if (F <= -3.05e-282) {
      		tmp = -1.0 / B;
      	} else {
      		tmp = 1.0 / B;
      	}
      	return tmp;
      }
      
      def code(F, B, x):
      	tmp = 0
      	if F <= -3.05e-282:
      		tmp = -1.0 / B
      	else:
      		tmp = 1.0 / B
      	return tmp
      
      function code(F, B, x)
      	tmp = 0.0
      	if (F <= -3.05e-282)
      		tmp = Float64(-1.0 / B);
      	else
      		tmp = Float64(1.0 / B);
      	end
      	return tmp
      end
      
      function tmp_2 = code(F, B, x)
      	tmp = 0.0;
      	if (F <= -3.05e-282)
      		tmp = -1.0 / B;
      	else
      		tmp = 1.0 / B;
      	end
      	tmp_2 = tmp;
      end
      
      code[F_, B_, x_] := If[LessEqual[F, -3.05e-282], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;F \leq -3.05 \cdot 10^{-282}:\\
      \;\;\;\;\frac{-1}{B}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{1}{B}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if F < -3.0499999999999999e-282

        1. Initial program 75.1%

          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in B around 0

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          2. sub-negN/A

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
          3. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
          4. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          5. /-lowering-/.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          6. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          7. associate-+l+N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          10. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          11. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          12. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          13. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          14. neg-lowering-neg.f6440.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}{-x}\right)}{B} \]
        5. Simplified40.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)}}, -x\right)}{B}} \]
        6. Taylor expanded in x around 0

          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
          2. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
          3. /-lowering-/.f64N/A

            \[\leadsto \frac{F \cdot \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}}{B} \]
          4. +-commutativeN/A

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{B} \]
          5. unpow2N/A

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{B} \]
          6. accelerator-lowering-fma.f6412.9

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}}{B} \]
        8. Simplified12.9%

          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}{B} \]
        9. Taylor expanded in F around -inf

          \[\leadsto \color{blue}{\frac{-1}{B}} \]
        10. Step-by-step derivation
          1. /-lowering-/.f6417.4

            \[\leadsto \color{blue}{\frac{-1}{B}} \]
        11. Simplified17.4%

          \[\leadsto \color{blue}{\frac{-1}{B}} \]

        if -3.0499999999999999e-282 < F

        1. Initial program 74.1%

          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in B around 0

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          2. sub-negN/A

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
          3. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
          4. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          5. /-lowering-/.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          6. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          7. associate-+l+N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          10. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          11. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          12. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          13. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          14. neg-lowering-neg.f6439.6

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
        5. Simplified39.6%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
        6. Taylor expanded in x around 0

          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
          2. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
          3. /-lowering-/.f64N/A

            \[\leadsto \frac{F \cdot \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}}{B} \]
          4. +-commutativeN/A

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{B} \]
          5. unpow2N/A

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{B} \]
          6. accelerator-lowering-fma.f6416.0

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}}{B} \]
        8. Simplified16.0%

          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}{B} \]
        9. Taylor expanded in F around inf

          \[\leadsto \color{blue}{\frac{1}{B}} \]
        10. Step-by-step derivation
          1. /-lowering-/.f6418.0

            \[\leadsto \color{blue}{\frac{1}{B}} \]
        11. Simplified18.0%

          \[\leadsto \color{blue}{\frac{1}{B}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 20: 10.6% 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 74.5%

        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in B around 0

        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
        2. sub-negN/A

          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
        3. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-lowering-neg.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}{-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)}}, -x\right)}{B}} \]
      6. Taylor expanded in x around 0

        \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
        2. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{B} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \frac{F \cdot \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}}{B} \]
        4. +-commutativeN/A

          \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{B} \]
        5. unpow2N/A

          \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{B} \]
        6. accelerator-lowering-fma.f6414.6

          \[\leadsto \frac{F \cdot \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}}{B} \]
      8. Simplified14.6%

        \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}{B} \]
      9. Taylor expanded in F around -inf

        \[\leadsto \color{blue}{\frac{-1}{B}} \]
      10. Step-by-step derivation
        1. /-lowering-/.f649.5

          \[\leadsto \color{blue}{\frac{-1}{B}} \]
      11. Simplified9.5%

        \[\leadsto \color{blue}{\frac{-1}{B}} \]
      12. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2024204 
      (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))))))