VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.4% → 99.6%
Time: 13.6s
Alternatives: 23
Speedup: 2.1×

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 23 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.4% 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.0× speedup?

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

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

\mathbf{elif}\;F \leq 50000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, F, \frac{-x}{\tan B}\right)\\

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


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

    1. Initial program 52.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(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

    if -1.1e70 < F < 5e7

    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. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

    if 5e7 < F

    1. Initial program 55.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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{1} - \cos B \cdot x}{\sin B} \]
    7. Step-by-step derivation
      1. Applied rewrites99.8%

        \[\leadsto \frac{\color{blue}{1} - \cos B \cdot x}{\sin B} \]
    8. Recombined 3 regimes into one program.
    9. Final simplification99.7%

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

    Alternative 2: 99.6% accurate, 1.4× speedup?

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

      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(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
      4. Step-by-step derivation
        1. lower-/.f64N/A

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

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

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

      if -2.49999999999999985e38 < F < 5e7

      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. Step-by-step derivation
        1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}}, F, \frac{-x}{\tan B}\right) \]
        18. div-invN/A

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

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

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

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

      if 5e7 < F

      1. Initial program 55.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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{1} - \cos B \cdot x}{\sin B} \]
      7. Step-by-step derivation
        1. Applied rewrites99.8%

          \[\leadsto \frac{\color{blue}{1} - \cos B \cdot x}{\sin B} \]
      8. Recombined 3 regimes into one program.
      9. Final simplification99.6%

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

      Alternative 3: 99.6% accurate, 1.4× speedup?

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

        1. Initial program 57.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(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
        4. Step-by-step derivation
          1. lower-/.f64N/A

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

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

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

        if -4.9999999999999997e32 < F < 5e7

        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. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

        if 5e7 < F

        1. Initial program 55.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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{1} - \cos B \cdot x}{\sin B} \]
        7. Step-by-step derivation
          1. Applied rewrites99.8%

            \[\leadsto \frac{\color{blue}{1} - \cos B \cdot x}{\sin B} \]
        8. Recombined 3 regimes into one program.
        9. Final simplification99.6%

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

        Alternative 4: 98.8% accurate, 1.4× speedup?

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

          1. Initial program 57.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(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

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

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

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

          if -2.4e11 < F < 1.6000000000000001

          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. Step-by-step derivation
            1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\frac{F}{\sqrt{\color{blue}{x \cdot 2} + 2}} - \cos B \cdot x}{\sin B} \]
            4. lower-fma.f6497.1

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

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

          if 1.6000000000000001 < F

          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. Taylor expanded in F around inf

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

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

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

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

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

        Alternative 5: 98.8% accurate, 1.4× speedup?

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

          1. Initial program 57.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(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

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

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

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

          if -2.4e11 < F < 1.3999999999999999

          1. Initial program 99.5%

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

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

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

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

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

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

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

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

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2}} \]
          7. Step-by-step derivation
            1. Applied rewrites97.1%

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

            if 1.3999999999999999 < F

            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. Taylor expanded in F around inf

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

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

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

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

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

          Alternative 6: 91.5% accurate, 1.5× speedup?

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

            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(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
            4. Step-by-step derivation
              1. lower-/.f64N/A

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

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

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

            if -2.49999999999999985e38 < F < 7.5e-35

            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. Step-by-step derivation
              1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 7.5e-35 < F < 3.8e5

            1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}}, F, \frac{-x}{\tan B}\right) \]
              18. div-invN/A

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

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

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

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

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

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

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

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

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

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

            if 3.8e5 < F

            1. Initial program 56.7%

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

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

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

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

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

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

          Alternative 7: 91.5% accurate, 1.5× speedup?

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

            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(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
            4. Step-by-step derivation
              1. lower-/.f64N/A

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

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

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

            if -2.49999999999999985e38 < F < 7.5e-35

            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. Step-by-step derivation
              1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 7.5e-35 < F < 3.8e5

            1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}}, F, \frac{-x}{\tan B}\right) \]
              18. div-invN/A

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

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

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

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

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

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

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

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

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

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

            if 3.8e5 < F

            1. Initial program 56.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{1} - \cos B \cdot x}{\sin B} \]
            7. Step-by-step derivation
              1. Applied rewrites99.7%

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

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

            Alternative 8: 91.5% accurate, 1.5× speedup?

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

              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. Step-by-step derivation
                1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\color{blue}{-1} - \cos B \cdot x}{\sin B} \]
              7. Step-by-step derivation
                1. Applied rewrites99.7%

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

                if -2.49999999999999985e38 < F < 7.5e-35

                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. Step-by-step derivation
                  1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 7.5e-35 < F < 3.8e5

                1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}}, F, \frac{-x}{\tan B}\right) \]
                  18. div-invN/A

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

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

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

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

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

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

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

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

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

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

                if 3.8e5 < F

                1. Initial program 56.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\color{blue}{1} - \cos B \cdot x}{\sin B} \]
                7. Step-by-step derivation
                  1. Applied rewrites99.7%

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

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

                Alternative 9: 83.9% accurate, 1.6× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(2, x, F \cdot F\right) + 2\\ t_1 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -2.5 \cdot 10^{+38}:\\ \;\;\;\;\frac{-1 - \cos B \cdot x}{\sin B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-35}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\sqrt{\frac{1}{t\_0}}}{B}, F, t\_1\right)\\ \mathbf{elif}\;F \leq 1.8 \cdot 10^{+98}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, -x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 4.8 \cdot 10^{+159}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\sqrt{t\_0} \cdot B}, F, t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.16666666666666666, B, \frac{1}{B}\right) - \frac{1}{\tan B} \cdot x\\ \end{array} \end{array} \]
                (FPCore (F B x)
                 :precision binary64
                 (let* ((t_0 (+ (fma 2.0 x (* F F)) 2.0)) (t_1 (/ (- x) (tan B))))
                   (if (<= F -2.5e+38)
                     (/ (- -1.0 (* (cos B) x)) (sin B))
                     (if (<= F 7.5e-35)
                       (fma (/ (sqrt (/ 1.0 t_0)) B) F t_1)
                       (if (<= F 1.8e+98)
                         (/ (fma (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) F (- x)) (sin B))
                         (if (<= F 4.8e+159)
                           (fma (/ 1.0 (* (sqrt t_0) B)) F t_1)
                           (-
                            (fma 0.16666666666666666 B (/ 1.0 B))
                            (* (/ 1.0 (tan B)) x))))))))
                double code(double F, double B, double x) {
                	double t_0 = fma(2.0, x, (F * F)) + 2.0;
                	double t_1 = -x / tan(B);
                	double tmp;
                	if (F <= -2.5e+38) {
                		tmp = (-1.0 - (cos(B) * x)) / sin(B);
                	} else if (F <= 7.5e-35) {
                		tmp = fma((sqrt((1.0 / t_0)) / B), F, t_1);
                	} else if (F <= 1.8e+98) {
                		tmp = fma(sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))), F, -x) / sin(B);
                	} else if (F <= 4.8e+159) {
                		tmp = fma((1.0 / (sqrt(t_0) * B)), F, t_1);
                	} else {
                		tmp = fma(0.16666666666666666, B, (1.0 / B)) - ((1.0 / tan(B)) * x);
                	}
                	return tmp;
                }
                
                function code(F, B, x)
                	t_0 = Float64(fma(2.0, x, Float64(F * F)) + 2.0)
                	t_1 = Float64(Float64(-x) / tan(B))
                	tmp = 0.0
                	if (F <= -2.5e+38)
                		tmp = Float64(Float64(-1.0 - Float64(cos(B) * x)) / sin(B));
                	elseif (F <= 7.5e-35)
                		tmp = fma(Float64(sqrt(Float64(1.0 / t_0)) / B), F, t_1);
                	elseif (F <= 1.8e+98)
                		tmp = Float64(fma(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))), F, Float64(-x)) / sin(B));
                	elseif (F <= 4.8e+159)
                		tmp = fma(Float64(1.0 / Float64(sqrt(t_0) * B)), F, t_1);
                	else
                		tmp = Float64(fma(0.16666666666666666, B, Float64(1.0 / B)) - Float64(Float64(1.0 / tan(B)) * x));
                	end
                	return tmp
                end
                
                code[F_, B_, x_] := Block[{t$95$0 = N[(N[(2.0 * x + N[(F * F), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]}, Block[{t$95$1 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.5e+38], N[(N[(-1.0 - N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.5e-35], N[(N[(N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision] * F + t$95$1), $MachinePrecision], If[LessEqual[F, 1.8e+98], N[(N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F + (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e+159], N[(N[(1.0 / N[(N[Sqrt[t$95$0], $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] * F + t$95$1), $MachinePrecision], N[(N[(0.16666666666666666 * B + N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := \mathsf{fma}\left(2, x, F \cdot F\right) + 2\\
                t_1 := \frac{-x}{\tan B}\\
                \mathbf{if}\;F \leq -2.5 \cdot 10^{+38}:\\
                \;\;\;\;\frac{-1 - \cos B \cdot x}{\sin B}\\
                
                \mathbf{elif}\;F \leq 7.5 \cdot 10^{-35}:\\
                \;\;\;\;\mathsf{fma}\left(\frac{\sqrt{\frac{1}{t\_0}}}{B}, F, t\_1\right)\\
                
                \mathbf{elif}\;F \leq 1.8 \cdot 10^{+98}:\\
                \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, -x\right)}{\sin B}\\
                
                \mathbf{elif}\;F \leq 4.8 \cdot 10^{+159}:\\
                \;\;\;\;\mathsf{fma}\left(\frac{1}{\sqrt{t\_0} \cdot B}, F, t\_1\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\mathsf{fma}\left(0.16666666666666666, B, \frac{1}{B}\right) - \frac{1}{\tan B} \cdot x\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 5 regimes
                2. if F < -2.49999999999999985e38

                  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. Step-by-step derivation
                    1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\color{blue}{-1} - \cos B \cdot x}{\sin B} \]
                  7. Step-by-step derivation
                    1. Applied rewrites99.7%

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

                    if -2.49999999999999985e38 < F < 7.5e-35

                    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. Step-by-step derivation
                      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 7.5e-35 < F < 1.7999999999999999e98

                    1. Initial program 94.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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{\sin B} \]
                    7. Step-by-step derivation
                      1. 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)}}{\sin B} \]
                      2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 1.7999999999999999e98 < F < 4.8e159

                    1. Initial program 71.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}}, F, \frac{-x}{\tan B}\right) \]
                      18. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 4.8e159 < F

                    1. Initial program 34.4%

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

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

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

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

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

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

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{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)\right)}}{B} \]
                      6. lower-/.f64N/A

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{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)\right)}{B}} \]
                    5. Applied rewrites30.6%

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

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

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

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \left(\frac{1}{6} \cdot B + \frac{1}{\color{blue}{B}}\right) \]
                      3. Step-by-step derivation
                        1. Applied rewrites71.4%

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \mathsf{fma}\left(0.16666666666666666, B, \frac{1}{B}\right) \]
                      4. Recombined 5 regimes into one program.
                      5. Final simplification90.5%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.5 \cdot 10^{+38}:\\ \;\;\;\;\frac{-1 - \cos B \cdot x}{\sin B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-35}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}}}{B}, F, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 1.8 \cdot 10^{+98}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, -x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 4.8 \cdot 10^{+159}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, x, F \cdot F\right) + 2} \cdot B}, F, \frac{-x}{\tan B}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.16666666666666666, B, \frac{1}{B}\right) - \frac{1}{\tan B} \cdot x\\ \end{array} \]
                      6. Add Preprocessing

                      Alternative 10: 77.8% accurate, 2.1× speedup?

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

                        1. Initial program 81.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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}}, F, \frac{-x}{\tan B}\right) \]
                          18. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -4.4000000000000002e-80 < x < 1.2499999999999999e-130

                        1. Initial program 74.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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{\sin B} \]
                        7. Step-by-step derivation
                          1. 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)}}{\sin B} \]
                          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.2499999999999999e-130 < 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. Step-by-step derivation
                          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 11: 77.8% accurate, 2.1× speedup?

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

                        1. Initial program 78.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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}}, F, \frac{-x}{\tan B}\right) \]
                          18. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -4.4000000000000002e-80 < x < 1.2499999999999999e-130

                        1. Initial program 74.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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{\sin B} \]
                        7. Step-by-step derivation
                          1. 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)}}{\sin B} \]
                          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 12: 69.2% accurate, 2.2× speedup?

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

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

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

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

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

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

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{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)\right)}}{B} \]
                          6. lower-/.f64N/A

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{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)\right)}{B}} \]
                        5. Applied rewrites34.9%

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                        7. Step-by-step derivation
                          1. Applied rewrites61.0%

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B} \]

                          if -2.70000000000000013e123 < F < 9.5000000000000006e155

                          1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{\sin B} \]
                          7. Step-by-step derivation
                            1. 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)}}{\sin B} \]
                            2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 9.5000000000000006e155 < F

                          1. Initial program 37.8%

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

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

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

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

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

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

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{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)\right)}}{B} \]
                            6. lower-/.f64N/A

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{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)\right)}{B}} \]
                          5. Applied rewrites29.0%

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

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \left(\frac{-1}{2} \cdot \frac{\left(1 + \frac{1}{6} \cdot {B}^{2}\right) \cdot \left(2 + 2 \cdot x\right)}{B \cdot {F}^{2}} + \color{blue}{\left(\frac{1}{6} \cdot B + \frac{1}{B}\right)}\right) \]
                          7. Step-by-step derivation
                            1. Applied rewrites67.6%

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

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \left(\frac{1}{6} \cdot B + \frac{1}{\color{blue}{B}}\right) \]
                            3. Step-by-step derivation
                              1. Applied rewrites70.3%

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \mathsf{fma}\left(0.16666666666666666, B, \frac{1}{B}\right) \]
                            4. Recombined 3 regimes into one program.
                            5. Final simplification69.7%

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

                            Alternative 13: 50.7% accurate, 2.4× speedup?

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

                              1. Initial program 74.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{\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + \frac{1}{3} \cdot x\right)\right) - x}{B}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

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

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

                              if 0.00239999999999999979 < B < 4.8000000000000003e160

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

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

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

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

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

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{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)\right)}}{B} \]
                                6. lower-/.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{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)\right)}{B}} \]
                              5. Applied rewrites28.8%

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

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \left(\frac{-1}{2} \cdot \frac{\left(1 + \frac{1}{6} \cdot {B}^{2}\right) \cdot \left(2 + 2 \cdot x\right)}{B \cdot {F}^{2}} + \color{blue}{\left(\frac{1}{6} \cdot B + \frac{1}{B}\right)}\right) \]
                              7. Step-by-step derivation
                                1. Applied rewrites29.6%

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

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \left(\frac{1}{6} \cdot B + \frac{1}{\color{blue}{B}}\right) \]
                                3. Step-by-step derivation
                                  1. Applied rewrites46.6%

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \mathsf{fma}\left(0.16666666666666666, B, \frac{1}{B}\right) \]

                                  if 4.8000000000000003e160 < B

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

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

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

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

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

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

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

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

                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \cdot \frac{F}{\sin B} \]
                                    8. lower-/.f64N/A

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

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

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

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

                                Alternative 14: 48.5% accurate, 2.6× speedup?

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

                                  1. Initial program 74.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{\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + \frac{1}{3} \cdot x\right)\right) - x}{B}} \]
                                  4. Step-by-step derivation
                                    1. lower-/.f64N/A

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

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

                                  if 0.00239999999999999979 < B

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

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

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

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

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

                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{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)\right)}}{B} \]
                                    6. lower-/.f64N/A

                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{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)\right)}{B}} \]
                                  5. Applied rewrites16.6%

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

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \left(\frac{-1}{2} \cdot \frac{\left(1 + \frac{1}{6} \cdot {B}^{2}\right) \cdot \left(2 + 2 \cdot x\right)}{B \cdot {F}^{2}} + \color{blue}{\left(\frac{1}{6} \cdot B + \frac{1}{B}\right)}\right) \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites16.8%

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

                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \left(\frac{1}{6} \cdot B + \frac{1}{\color{blue}{B}}\right) \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites28.3%

                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \mathsf{fma}\left(0.16666666666666666, B, \frac{1}{B}\right) \]
                                    4. Recombined 2 regimes into one program.
                                    5. Final simplification52.0%

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

                                    Alternative 15: 51.1% accurate, 2.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites47.4%

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

                                        if -2.8e13 < F < 8.20000000000000032e157

                                        1. Initial program 95.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. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if 8.20000000000000032e157 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{1 - x}{B} \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites54.8%

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

                                        Alternative 16: 51.1% accurate, 4.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                          6. Taylor expanded in F around -inf

                                            \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites47.4%

                                              \[\leadsto \frac{-1 - x}{B} \]

                                            if -1.79999999999999992e24 < F < 8.20000000000000032e157

                                            1. Initial program 95.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. lift-+.f64N/A

                                                \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                              2. +-commutativeN/A

                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                              3. lift-*.f64N/A

                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                              4. *-commutativeN/A

                                                \[\leadsto \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \frac{F}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                              5. lift-/.f64N/A

                                                \[\leadsto {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \color{blue}{\frac{F}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                              6. clear-numN/A

                                                \[\leadsto {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\frac{\sin B}{F}}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                              7. associate-/r/N/A

                                                \[\leadsto {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                              8. associate-*r*N/A

                                                \[\leadsto \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \frac{1}{\sin B}\right) \cdot F} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                              9. div-invN/A

                                                \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} \cdot F + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                              10. lower-fma.f64N/A

                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, F, -x \cdot \frac{1}{\tan B}\right)} \]
                                            4. Applied rewrites99.0%

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, F, \frac{-x}{\tan B}\right)} \]
                                            5. Step-by-step derivation
                                              1. lift-/.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}}, F, \frac{-x}{\tan B}\right) \]
                                              2. clear-numN/A

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}}, F, \frac{-x}{\tan B}\right) \]
                                              3. lower-/.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}}, F, \frac{-x}{\tan B}\right) \]
                                              4. lift-pow.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}}, F, \frac{-x}{\tan B}\right) \]
                                              5. metadata-evalN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}}}, F, \frac{-x}{\tan B}\right) \]
                                              6. sqrt-pow1N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\color{blue}{\sqrt{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-1}}}}}, F, \frac{-x}{\tan B}\right) \]
                                              7. lift-fma.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\sqrt{{\color{blue}{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}}^{-1}}}}, F, \frac{-x}{\tan B}\right) \]
                                              8. +-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\sqrt{{\color{blue}{\left(\mathsf{fma}\left(F, F, 2\right) + x \cdot 2\right)}}^{-1}}}}, F, \frac{-x}{\tan B}\right) \]
                                              9. lift-fma.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\sqrt{{\left(\color{blue}{\left(F \cdot F + 2\right)} + x \cdot 2\right)}^{-1}}}}, F, \frac{-x}{\tan B}\right) \]
                                              10. *-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\sqrt{{\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{-1}}}}, F, \frac{-x}{\tan B}\right) \]
                                              11. associate-+l+N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\sqrt{{\color{blue}{\left(F \cdot F + \left(2 + 2 \cdot x\right)\right)}}^{-1}}}}, F, \frac{-x}{\tan B}\right) \]
                                              12. +-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\sqrt{{\left(F \cdot F + \color{blue}{\left(2 \cdot x + 2\right)}\right)}^{-1}}}}, F, \frac{-x}{\tan B}\right) \]
                                              13. lift-fma.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\sqrt{{\left(F \cdot F + \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}^{-1}}}}, F, \frac{-x}{\tan B}\right) \]
                                              14. lift-fma.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\sqrt{{\color{blue}{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}}^{-1}}}}, F, \frac{-x}{\tan B}\right) \]
                                              15. inv-powN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\sqrt{\color{blue}{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}}, F, \frac{-x}{\tan B}\right) \]
                                              16. lift-/.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\sqrt{\color{blue}{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}}, F, \frac{-x}{\tan B}\right) \]
                                              17. lift-sqrt.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\frac{\sin B}{\color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}}, F, \frac{-x}{\tan B}\right) \]
                                              18. div-invN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{\sin B \cdot \frac{1}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}}, F, \frac{-x}{\tan B}\right) \]
                                              19. metadata-evalN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \frac{\color{blue}{\sqrt{1}}}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}, F, \frac{-x}{\tan B}\right) \]
                                              20. lift-sqrt.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}}, F, \frac{-x}{\tan B}\right) \]
                                            6. Applied rewrites98.9%

                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}, F, \frac{-x}{\tan B}\right) \]
                                            7. Taylor expanded in B around 0

                                              \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, \color{blue}{\frac{-1 \cdot x + \frac{1}{3} \cdot \left({B}^{2} \cdot x\right)}{B}}\right) \]
                                            8. Step-by-step derivation
                                              1. mul-1-negN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, \frac{\color{blue}{\left(\mathsf{neg}\left(x\right)\right)} + \frac{1}{3} \cdot \left({B}^{2} \cdot x\right)}{B}\right) \]
                                              2. +-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, \frac{\color{blue}{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B}\right) \]
                                              3. sub-negN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, \frac{\color{blue}{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}}{B}\right) \]
                                              4. lower-/.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}}\right) \]
                                              5. lower--.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, \frac{\color{blue}{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}}{B}\right) \]
                                              6. *-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, \frac{\color{blue}{\left({B}^{2} \cdot x\right) \cdot \frac{1}{3}} - x}{B}\right) \]
                                              7. lower-*.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, \frac{\color{blue}{\left({B}^{2} \cdot x\right) \cdot \frac{1}{3}} - x}{B}\right) \]
                                              8. lower-*.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, \frac{\color{blue}{\left({B}^{2} \cdot x\right)} \cdot \frac{1}{3} - x}{B}\right) \]
                                              9. unpow2N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, \frac{\left(\color{blue}{\left(B \cdot B\right)} \cdot x\right) \cdot \frac{1}{3} - x}{B}\right) \]
                                              10. lower-*.f6458.3

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, \frac{\left(\color{blue}{\left(B \cdot B\right)} \cdot x\right) \cdot 0.3333333333333333 - x}{B}\right) \]
                                            9. Applied rewrites58.3%

                                              \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, F, \color{blue}{\frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot 0.3333333333333333 - x}{B}}\right) \]
                                            10. Taylor expanded in B around 0

                                              \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{B \cdot \sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot \frac{1}{3} - x}{B}\right) \]
                                            11. Step-by-step derivation
                                              1. *-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)} \cdot B}}, F, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot \frac{1}{3} - x}{B}\right) \]
                                              2. lower-*.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)} \cdot B}}, F, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot \frac{1}{3} - x}{B}\right) \]
                                              3. lower-sqrt.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot B}, F, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot \frac{1}{3} - x}{B}\right) \]
                                              4. +-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sqrt{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}} \cdot B}, F, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot \frac{1}{3} - x}{B}\right) \]
                                              5. associate-+l+N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sqrt{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}} \cdot B}, F, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot \frac{1}{3} - x}{B}\right) \]
                                              6. *-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sqrt{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)} \cdot B}, F, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot \frac{1}{3} - x}{B}\right) \]
                                              7. +-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sqrt{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}} \cdot B}, F, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot \frac{1}{3} - x}{B}\right) \]
                                              8. lower-fma.f64N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sqrt{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}} \cdot B}, F, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot \frac{1}{3} - x}{B}\right) \]
                                              9. +-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)} \cdot B}, F, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot \frac{1}{3} - x}{B}\right) \]
                                              10. unpow2N/A

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)} \cdot B}, F, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot \frac{1}{3} - x}{B}\right) \]
                                              11. lower-fma.f6453.9

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)} \cdot B}, F, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot 0.3333333333333333 - x}{B}\right) \]
                                            12. Applied rewrites53.9%

                                              \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B}}, F, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot 0.3333333333333333 - x}{B}\right) \]

                                            if 8.20000000000000032e157 < F

                                            1. Initial program 36.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. lower-/.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. *-commutativeN/A

                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                              4. lower-fma.f64N/A

                                                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                              5. lower-sqrt.f64N/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              6. lower-/.f64N/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              7. associate-+r+N/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              8. +-commutativeN/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              9. unpow2N/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              10. lower-fma.f64N/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              11. +-commutativeN/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              12. lower-fma.f64N/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              13. lower-neg.f6428.9

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                            5. Applied rewrites28.9%

                                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                            6. Taylor expanded in F around inf

                                              \[\leadsto \frac{1 - x}{B} \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites54.8%

                                                \[\leadsto \frac{1 - x}{B} \]
                                            8. Recombined 3 regimes into one program.
                                            9. Add Preprocessing

                                            Alternative 17: 51.3% accurate, 5.7× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1 \cdot 10^{+76}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 8200:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                            (FPCore (F B x)
                                             :precision binary64
                                             (if (<= F -1e+76)
                                               (/ (- -1.0 x) B)
                                               (if (<= F 8200.0)
                                                 (/ (fma (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0)))) F (- x)) B)
                                                 (/ (- 1.0 x) B))))
                                            double code(double F, double B, double x) {
                                            	double tmp;
                                            	if (F <= -1e+76) {
                                            		tmp = (-1.0 - x) / B;
                                            	} else if (F <= 8200.0) {
                                            		tmp = fma(sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0)))), F, -x) / B;
                                            	} else {
                                            		tmp = (1.0 - x) / B;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            function code(F, B, x)
                                            	tmp = 0.0
                                            	if (F <= -1e+76)
                                            		tmp = Float64(Float64(-1.0 - x) / B);
                                            	elseif (F <= 8200.0)
                                            		tmp = Float64(fma(sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))), F, Float64(-x)) / B);
                                            	else
                                            		tmp = Float64(Float64(1.0 - x) / B);
                                            	end
                                            	return tmp
                                            end
                                            
                                            code[F_, B_, x_] := If[LessEqual[F, -1e+76], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8200.0], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;F \leq -1 \cdot 10^{+76}:\\
                                            \;\;\;\;\frac{-1 - x}{B}\\
                                            
                                            \mathbf{elif}\;F \leq 8200:\\
                                            \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\frac{1 - x}{B}\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if F < -1e76

                                              1. Initial program 52.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. lower-/.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. *-commutativeN/A

                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                4. lower-fma.f64N/A

                                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                5. lower-sqrt.f64N/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                6. lower-/.f64N/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                7. associate-+r+N/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                8. +-commutativeN/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                9. unpow2N/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                10. lower-fma.f64N/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                11. +-commutativeN/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                12. lower-fma.f64N/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                13. lower-neg.f6433.2

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                              5. Applied rewrites33.2%

                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                              6. Taylor expanded in F around -inf

                                                \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites47.8%

                                                  \[\leadsto \frac{-1 - x}{B} \]

                                                if -1e76 < F < 8200

                                                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. lower-/.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. *-commutativeN/A

                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                  4. lower-fma.f64N/A

                                                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                  5. lower-sqrt.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  6. lower-/.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  7. associate-+r+N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  8. +-commutativeN/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  9. unpow2N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  10. lower-fma.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  11. +-commutativeN/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  12. lower-fma.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  13. lower-neg.f6454.9

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                5. Applied rewrites54.9%

                                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]

                                                if 8200 < F

                                                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. 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. lower-/.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. *-commutativeN/A

                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                  4. lower-fma.f64N/A

                                                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                  5. lower-sqrt.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  6. lower-/.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  7. associate-+r+N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  8. +-commutativeN/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  9. unpow2N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  10. lower-fma.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  11. +-commutativeN/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  12. lower-fma.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  13. lower-neg.f6437.6

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                5. Applied rewrites37.6%

                                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                6. Taylor expanded in F around inf

                                                  \[\leadsto \frac{1 - x}{B} \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites51.1%

                                                    \[\leadsto \frac{1 - x}{B} \]
                                                8. Recombined 3 regimes into one program.
                                                9. Add Preprocessing

                                                Alternative 18: 51.3% accurate, 6.1× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -8.2 \cdot 10^{+154}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 8200:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                (FPCore (F B x)
                                                 :precision binary64
                                                 (if (<= F -8.2e+154)
                                                   (/ (- -1.0 x) B)
                                                   (if (<= F 8200.0)
                                                     (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
                                                     (/ (- 1.0 x) B))))
                                                double code(double F, double B, double x) {
                                                	double tmp;
                                                	if (F <= -8.2e+154) {
                                                		tmp = (-1.0 - x) / B;
                                                	} else if (F <= 8200.0) {
                                                		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
                                                	} else {
                                                		tmp = (1.0 - x) / B;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(F, B, x)
                                                	tmp = 0.0
                                                	if (F <= -8.2e+154)
                                                		tmp = Float64(Float64(-1.0 - x) / B);
                                                	elseif (F <= 8200.0)
                                                		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B);
                                                	else
                                                		tmp = Float64(Float64(1.0 - x) / B);
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[F_, B_, x_] := If[LessEqual[F, -8.2e+154], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8200.0], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;F \leq -8.2 \cdot 10^{+154}:\\
                                                \;\;\;\;\frac{-1 - x}{B}\\
                                                
                                                \mathbf{elif}\;F \leq 8200:\\
                                                \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\frac{1 - x}{B}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 3 regimes
                                                2. if F < -8.2e154

                                                  1. Initial program 36.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. lower-/.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. *-commutativeN/A

                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                    4. lower-fma.f64N/A

                                                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                    5. lower-sqrt.f64N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    6. lower-/.f64N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    7. associate-+r+N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    8. +-commutativeN/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    9. unpow2N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    10. lower-fma.f64N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    11. +-commutativeN/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    12. lower-fma.f64N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    13. lower-neg.f6426.2

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                  5. Applied rewrites26.2%

                                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                  6. Taylor expanded in F around -inf

                                                    \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites47.1%

                                                      \[\leadsto \frac{-1 - x}{B} \]

                                                    if -8.2e154 < F < 8200

                                                    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. lower-/.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. *-commutativeN/A

                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                      4. lower-fma.f64N/A

                                                        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                      5. lower-sqrt.f64N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      6. lower-/.f64N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      7. associate-+r+N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      8. +-commutativeN/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      9. unpow2N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      10. lower-fma.f64N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      11. +-commutativeN/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      12. lower-fma.f64N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      13. lower-neg.f6454.2

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                    5. Applied rewrites54.2%

                                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                    6. Step-by-step derivation
                                                      1. Applied rewrites54.2%

                                                        \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                                                      if 8200 < F

                                                      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. 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. lower-/.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. *-commutativeN/A

                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                        4. lower-fma.f64N/A

                                                          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                        5. lower-sqrt.f64N/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        6. lower-/.f64N/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        7. associate-+r+N/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        8. +-commutativeN/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        9. unpow2N/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        10. lower-fma.f64N/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        11. +-commutativeN/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        12. lower-fma.f64N/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        13. lower-neg.f6437.6

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                      5. Applied rewrites37.6%

                                                        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                      6. Taylor expanded in F around inf

                                                        \[\leadsto \frac{1 - x}{B} \]
                                                      7. Step-by-step derivation
                                                        1. Applied rewrites51.1%

                                                          \[\leadsto \frac{1 - x}{B} \]
                                                      8. Recombined 3 regimes into one program.
                                                      9. Add Preprocessing

                                                      Alternative 19: 50.3% accurate, 6.2× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -240000000000:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.85 \cdot 10^{+28}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}, F, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(1 - \frac{1}{F \cdot F}\right) - x}{B}\\ \end{array} \end{array} \]
                                                      (FPCore (F B x)
                                                       :precision binary64
                                                       (if (<= F -240000000000.0)
                                                         (/ (- -1.0 x) B)
                                                         (if (<= F 1.85e+28)
                                                           (/ (fma (sqrt (/ 1.0 (fma 2.0 x 2.0))) F (- x)) B)
                                                           (/ (- (- 1.0 (/ 1.0 (* F F))) x) B))))
                                                      double code(double F, double B, double x) {
                                                      	double tmp;
                                                      	if (F <= -240000000000.0) {
                                                      		tmp = (-1.0 - x) / B;
                                                      	} else if (F <= 1.85e+28) {
                                                      		tmp = fma(sqrt((1.0 / fma(2.0, x, 2.0))), F, -x) / B;
                                                      	} else {
                                                      		tmp = ((1.0 - (1.0 / (F * F))) - x) / B;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      function code(F, B, x)
                                                      	tmp = 0.0
                                                      	if (F <= -240000000000.0)
                                                      		tmp = Float64(Float64(-1.0 - x) / B);
                                                      	elseif (F <= 1.85e+28)
                                                      		tmp = Float64(fma(sqrt(Float64(1.0 / fma(2.0, x, 2.0))), F, Float64(-x)) / B);
                                                      	else
                                                      		tmp = Float64(Float64(Float64(1.0 - Float64(1.0 / Float64(F * F))) - x) / B);
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      code[F_, B_, x_] := If[LessEqual[F, -240000000000.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.85e+28], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(1.0 - N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;F \leq -240000000000:\\
                                                      \;\;\;\;\frac{-1 - x}{B}\\
                                                      
                                                      \mathbf{elif}\;F \leq 1.85 \cdot 10^{+28}:\\
                                                      \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}, F, -x\right)}{B}\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;\frac{\left(1 - \frac{1}{F \cdot F}\right) - x}{B}\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 3 regimes
                                                      2. if F < -2.4e11

                                                        1. Initial program 57.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. lower-/.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. *-commutativeN/A

                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                          4. lower-fma.f64N/A

                                                            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                          5. lower-sqrt.f64N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          6. lower-/.f64N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          7. associate-+r+N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          8. +-commutativeN/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          9. unpow2N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          10. lower-fma.f64N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          11. +-commutativeN/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          12. lower-fma.f64N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          13. lower-neg.f6434.5

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                        5. Applied rewrites34.5%

                                                          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                        6. Taylor expanded in F around -inf

                                                          \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites47.4%

                                                            \[\leadsto \frac{-1 - x}{B} \]

                                                          if -2.4e11 < F < 1.85e28

                                                          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. lower-/.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. *-commutativeN/A

                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                            4. lower-fma.f64N/A

                                                              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                            5. lower-sqrt.f64N/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            6. lower-/.f64N/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            7. associate-+r+N/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            8. +-commutativeN/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            9. unpow2N/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            10. lower-fma.f64N/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            11. +-commutativeN/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            12. lower-fma.f64N/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            13. lower-neg.f6453.9

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                          5. Applied rewrites53.9%

                                                            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                          6. Taylor expanded in F around 0

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{2 + 2 \cdot x}}, F, -x\right)}{B} \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites52.3%

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}, F, -x\right)}{B} \]

                                                            if 1.85e28 < F

                                                            1. Initial program 54.8%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Add Preprocessing
                                                            3. Taylor expanded in B around 0

                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                            4. Step-by-step derivation
                                                              1. lower-/.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. *-commutativeN/A

                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                              4. lower-fma.f64N/A

                                                                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                              5. lower-sqrt.f64N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              6. lower-/.f64N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              7. associate-+r+N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              8. +-commutativeN/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              9. unpow2N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              10. lower-fma.f64N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              11. +-commutativeN/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              12. lower-fma.f64N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              13. lower-neg.f6439.5

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                            5. Applied rewrites39.5%

                                                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                            6. Taylor expanded in F around inf

                                                              \[\leadsto \frac{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B} \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites53.8%

                                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{-0.5}{F}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F}, 1\right) - x}{B} \]
                                                              2. Taylor expanded in x around 0

                                                                \[\leadsto \frac{\left(1 - \frac{1}{{F}^{2}}\right) - x}{B} \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites53.8%

                                                                  \[\leadsto \frac{\left(1 - \frac{1}{F \cdot F}\right) - x}{B} \]
                                                              4. Recombined 3 regimes into one program.
                                                              5. Add Preprocessing

                                                              Alternative 20: 42.9% accurate, 13.6× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.1 \cdot 10^{+54}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.12 \cdot 10^{-21}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                              (FPCore (F B x)
                                                               :precision binary64
                                                               (if (<= F -2.1e+54)
                                                                 (/ (- -1.0 x) B)
                                                                 (if (<= F 1.12e-21) (/ (- x) B) (/ (- 1.0 x) B))))
                                                              double code(double F, double B, double x) {
                                                              	double tmp;
                                                              	if (F <= -2.1e+54) {
                                                              		tmp = (-1.0 - x) / B;
                                                              	} else if (F <= 1.12e-21) {
                                                              		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 <= (-2.1d+54)) then
                                                                      tmp = ((-1.0d0) - x) / b
                                                                  else if (f <= 1.12d-21) 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 <= -2.1e+54) {
                                                              		tmp = (-1.0 - x) / B;
                                                              	} else if (F <= 1.12e-21) {
                                                              		tmp = -x / B;
                                                              	} else {
                                                              		tmp = (1.0 - x) / B;
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              def code(F, B, x):
                                                              	tmp = 0
                                                              	if F <= -2.1e+54:
                                                              		tmp = (-1.0 - x) / B
                                                              	elif F <= 1.12e-21:
                                                              		tmp = -x / B
                                                              	else:
                                                              		tmp = (1.0 - x) / B
                                                              	return tmp
                                                              
                                                              function code(F, B, x)
                                                              	tmp = 0.0
                                                              	if (F <= -2.1e+54)
                                                              		tmp = Float64(Float64(-1.0 - x) / B);
                                                              	elseif (F <= 1.12e-21)
                                                              		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 <= -2.1e+54)
                                                              		tmp = (-1.0 - x) / B;
                                                              	elseif (F <= 1.12e-21)
                                                              		tmp = -x / B;
                                                              	else
                                                              		tmp = (1.0 - x) / B;
                                                              	end
                                                              	tmp_2 = tmp;
                                                              end
                                                              
                                                              code[F_, B_, x_] := If[LessEqual[F, -2.1e+54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.12e-21], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              \mathbf{if}\;F \leq -2.1 \cdot 10^{+54}:\\
                                                              \;\;\;\;\frac{-1 - x}{B}\\
                                                              
                                                              \mathbf{elif}\;F \leq 1.12 \cdot 10^{-21}:\\
                                                              \;\;\;\;\frac{-x}{B}\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\frac{1 - x}{B}\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 3 regimes
                                                              2. if F < -2.09999999999999986e54

                                                                1. Initial program 53.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. lower-/.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. *-commutativeN/A

                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  4. lower-fma.f64N/A

                                                                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                  5. lower-sqrt.f64N/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  6. lower-/.f64N/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  7. associate-+r+N/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  8. +-commutativeN/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  9. unpow2N/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  10. lower-fma.f64N/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  11. +-commutativeN/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  12. lower-fma.f64N/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  13. lower-neg.f6435.6

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                5. Applied rewrites35.6%

                                                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                6. Taylor expanded in F around -inf

                                                                  \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites49.6%

                                                                    \[\leadsto \frac{-1 - x}{B} \]

                                                                  if -2.09999999999999986e54 < F < 1.11999999999999998e-21

                                                                  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. lower-/.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. *-commutativeN/A

                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                    4. lower-fma.f64N/A

                                                                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                    5. lower-sqrt.f64N/A

                                                                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                    6. lower-/.f64N/A

                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                    7. associate-+r+N/A

                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                    8. +-commutativeN/A

                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                    9. unpow2N/A

                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                    10. lower-fma.f64N/A

                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                    11. +-commutativeN/A

                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                    12. lower-fma.f64N/A

                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                    13. lower-neg.f6454.5

                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                  5. Applied rewrites54.5%

                                                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                  6. Taylor expanded in F around 0

                                                                    \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites41.1%

                                                                      \[\leadsto \frac{-x}{B} \]

                                                                    if 1.11999999999999998e-21 < F

                                                                    1. Initial program 64.4%

                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    2. Add Preprocessing
                                                                    3. Taylor expanded in B around 0

                                                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                    4. Step-by-step derivation
                                                                      1. lower-/.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. *-commutativeN/A

                                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      4. lower-fma.f64N/A

                                                                        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                      5. lower-sqrt.f64N/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      6. lower-/.f64N/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      7. associate-+r+N/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      8. +-commutativeN/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      9. unpow2N/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      10. lower-fma.f64N/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      11. +-commutativeN/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      12. lower-fma.f64N/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      13. lower-neg.f6440.1

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                    5. Applied rewrites40.1%

                                                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                    6. Taylor expanded in F around inf

                                                                      \[\leadsto \frac{1 - x}{B} \]
                                                                    7. Step-by-step derivation
                                                                      1. Applied rewrites45.4%

                                                                        \[\leadsto \frac{1 - x}{B} \]
                                                                    8. Recombined 3 regimes into one program.
                                                                    9. Add Preprocessing

                                                                    Alternative 21: 35.6% accurate, 17.5× speedup?

                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.1 \cdot 10^{+54}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \end{array} \]
                                                                    (FPCore (F B x)
                                                                     :precision binary64
                                                                     (if (<= F -2.1e+54) (/ (- -1.0 x) B) (/ (- x) B)))
                                                                    double code(double F, double B, double x) {
                                                                    	double tmp;
                                                                    	if (F <= -2.1e+54) {
                                                                    		tmp = (-1.0 - x) / B;
                                                                    	} else {
                                                                    		tmp = -x / B;
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    real(8) function code(f, b, x)
                                                                        real(8), intent (in) :: f
                                                                        real(8), intent (in) :: b
                                                                        real(8), intent (in) :: x
                                                                        real(8) :: tmp
                                                                        if (f <= (-2.1d+54)) then
                                                                            tmp = ((-1.0d0) - x) / b
                                                                        else
                                                                            tmp = -x / b
                                                                        end if
                                                                        code = tmp
                                                                    end function
                                                                    
                                                                    public static double code(double F, double B, double x) {
                                                                    	double tmp;
                                                                    	if (F <= -2.1e+54) {
                                                                    		tmp = (-1.0 - x) / B;
                                                                    	} else {
                                                                    		tmp = -x / B;
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    def code(F, B, x):
                                                                    	tmp = 0
                                                                    	if F <= -2.1e+54:
                                                                    		tmp = (-1.0 - x) / B
                                                                    	else:
                                                                    		tmp = -x / B
                                                                    	return tmp
                                                                    
                                                                    function code(F, B, x)
                                                                    	tmp = 0.0
                                                                    	if (F <= -2.1e+54)
                                                                    		tmp = Float64(Float64(-1.0 - x) / B);
                                                                    	else
                                                                    		tmp = Float64(Float64(-x) / B);
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    function tmp_2 = code(F, B, x)
                                                                    	tmp = 0.0;
                                                                    	if (F <= -2.1e+54)
                                                                    		tmp = (-1.0 - x) / B;
                                                                    	else
                                                                    		tmp = -x / B;
                                                                    	end
                                                                    	tmp_2 = tmp;
                                                                    end
                                                                    
                                                                    code[F_, B_, x_] := If[LessEqual[F, -2.1e+54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
                                                                    
                                                                    \begin{array}{l}
                                                                    
                                                                    \\
                                                                    \begin{array}{l}
                                                                    \mathbf{if}\;F \leq -2.1 \cdot 10^{+54}:\\
                                                                    \;\;\;\;\frac{-1 - x}{B}\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;\frac{-x}{B}\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 2 regimes
                                                                    2. if F < -2.09999999999999986e54

                                                                      1. Initial program 53.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. lower-/.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. *-commutativeN/A

                                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                        4. lower-fma.f64N/A

                                                                          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                        5. lower-sqrt.f64N/A

                                                                          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                        6. lower-/.f64N/A

                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                        7. associate-+r+N/A

                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                        8. +-commutativeN/A

                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                        9. unpow2N/A

                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                        10. lower-fma.f64N/A

                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                        11. +-commutativeN/A

                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                        12. lower-fma.f64N/A

                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                        13. lower-neg.f6435.6

                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                      5. Applied rewrites35.6%

                                                                        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                      6. Taylor expanded in F around -inf

                                                                        \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                                      7. Step-by-step derivation
                                                                        1. Applied rewrites49.6%

                                                                          \[\leadsto \frac{-1 - x}{B} \]

                                                                        if -2.09999999999999986e54 < F

                                                                        1. Initial program 84.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. lower-/.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. *-commutativeN/A

                                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                          4. lower-fma.f64N/A

                                                                            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                          5. lower-sqrt.f64N/A

                                                                            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                          6. lower-/.f64N/A

                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                          7. associate-+r+N/A

                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                          8. +-commutativeN/A

                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                          9. unpow2N/A

                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                          10. lower-fma.f64N/A

                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                          11. +-commutativeN/A

                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                          12. lower-fma.f64N/A

                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                          13. lower-neg.f6448.1

                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                        5. Applied rewrites48.1%

                                                                          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                        6. Taylor expanded in F around 0

                                                                          \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                        7. Step-by-step derivation
                                                                          1. Applied rewrites33.4%

                                                                            \[\leadsto \frac{-x}{B} \]
                                                                        8. Recombined 2 regimes into one program.
                                                                        9. Add Preprocessing

                                                                        Alternative 22: 29.7% accurate, 18.4× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.2 \cdot 10^{+54}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \end{array} \]
                                                                        (FPCore (F B x)
                                                                         :precision binary64
                                                                         (if (<= F -3.2e+54) (/ -1.0 B) (/ (- x) B)))
                                                                        double code(double F, double B, double x) {
                                                                        	double tmp;
                                                                        	if (F <= -3.2e+54) {
                                                                        		tmp = -1.0 / B;
                                                                        	} else {
                                                                        		tmp = -x / B;
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        real(8) function code(f, b, x)
                                                                            real(8), intent (in) :: f
                                                                            real(8), intent (in) :: b
                                                                            real(8), intent (in) :: x
                                                                            real(8) :: tmp
                                                                            if (f <= (-3.2d+54)) then
                                                                                tmp = (-1.0d0) / b
                                                                            else
                                                                                tmp = -x / b
                                                                            end if
                                                                            code = tmp
                                                                        end function
                                                                        
                                                                        public static double code(double F, double B, double x) {
                                                                        	double tmp;
                                                                        	if (F <= -3.2e+54) {
                                                                        		tmp = -1.0 / B;
                                                                        	} else {
                                                                        		tmp = -x / B;
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        def code(F, B, x):
                                                                        	tmp = 0
                                                                        	if F <= -3.2e+54:
                                                                        		tmp = -1.0 / B
                                                                        	else:
                                                                        		tmp = -x / B
                                                                        	return tmp
                                                                        
                                                                        function code(F, B, x)
                                                                        	tmp = 0.0
                                                                        	if (F <= -3.2e+54)
                                                                        		tmp = Float64(-1.0 / B);
                                                                        	else
                                                                        		tmp = Float64(Float64(-x) / B);
                                                                        	end
                                                                        	return tmp
                                                                        end
                                                                        
                                                                        function tmp_2 = code(F, B, x)
                                                                        	tmp = 0.0;
                                                                        	if (F <= -3.2e+54)
                                                                        		tmp = -1.0 / B;
                                                                        	else
                                                                        		tmp = -x / B;
                                                                        	end
                                                                        	tmp_2 = tmp;
                                                                        end
                                                                        
                                                                        code[F_, B_, x_] := If[LessEqual[F, -3.2e+54], N[(-1.0 / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
                                                                        
                                                                        \begin{array}{l}
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        \mathbf{if}\;F \leq -3.2 \cdot 10^{+54}:\\
                                                                        \;\;\;\;\frac{-1}{B}\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;\frac{-x}{B}\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 2 regimes
                                                                        2. if F < -3.2e54

                                                                          1. Initial program 53.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. lower-/.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. *-commutativeN/A

                                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            4. lower-fma.f64N/A

                                                                              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                            5. lower-sqrt.f64N/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            6. lower-/.f64N/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            7. associate-+r+N/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            8. +-commutativeN/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            9. unpow2N/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            10. lower-fma.f64N/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            11. +-commutativeN/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            12. lower-fma.f64N/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            13. lower-neg.f6435.6

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                          5. Applied rewrites35.6%

                                                                            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                          6. Taylor expanded in F around -inf

                                                                            \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                                          7. Step-by-step derivation
                                                                            1. Applied rewrites49.6%

                                                                              \[\leadsto \frac{-1 - x}{B} \]
                                                                            2. Taylor expanded in x around 0

                                                                              \[\leadsto \frac{-1}{B} \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites30.5%

                                                                                \[\leadsto \frac{-1}{B} \]

                                                                              if -3.2e54 < F

                                                                              1. Initial program 84.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. lower-/.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. *-commutativeN/A

                                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                4. lower-fma.f64N/A

                                                                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                5. lower-sqrt.f64N/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                6. lower-/.f64N/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                7. associate-+r+N/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                8. +-commutativeN/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                9. unpow2N/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                10. lower-fma.f64N/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                11. +-commutativeN/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                12. lower-fma.f64N/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                13. lower-neg.f6448.1

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                              5. Applied rewrites48.1%

                                                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                              6. Taylor expanded in F around 0

                                                                                \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                              7. Step-by-step derivation
                                                                                1. Applied rewrites33.4%

                                                                                  \[\leadsto \frac{-x}{B} \]
                                                                              8. Recombined 2 regimes into one program.
                                                                              9. Add Preprocessing

                                                                              Alternative 23: 10.9% 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 77.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. lower-/.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. *-commutativeN/A

                                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                4. lower-fma.f64N/A

                                                                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                5. lower-sqrt.f64N/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                6. lower-/.f64N/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                7. associate-+r+N/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                8. +-commutativeN/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                9. unpow2N/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                10. lower-fma.f64N/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                11. +-commutativeN/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                12. lower-fma.f64N/A

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                13. lower-neg.f6445.3

                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                              5. Applied rewrites45.3%

                                                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                              6. Taylor expanded in F around -inf

                                                                                \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                                              7. Step-by-step derivation
                                                                                1. Applied rewrites28.6%

                                                                                  \[\leadsto \frac{-1 - x}{B} \]
                                                                                2. Taylor expanded in x around 0

                                                                                  \[\leadsto \frac{-1}{B} \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites9.7%

                                                                                    \[\leadsto \frac{-1}{B} \]
                                                                                  2. Add Preprocessing

                                                                                  Reproduce

                                                                                  ?
                                                                                  herbie shell --seed 2024248 
                                                                                  (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))))))