VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.3% → 99.7%
Time: 15.1s
Alternatives: 31
Speedup: 2.0×

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 31 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: 77.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (+
  (- (* x (/ 1.0 (tan B))))
  (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
	return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
	return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x):
	return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x)
	return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0)))))
end
function tmp = code(F, B, x)
	tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0)));
end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}

Alternative 1: 99.7% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 41.5%

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

      \[\leadsto \left(-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}} \]
    6. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

    if -1.00000000000000002e64 < F < 1.1e8

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. 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. 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) \]
      5. associate-*l/N/A

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

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

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

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

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

    if 1.1e8 < F

    1. Initial program 58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 99.7% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2 \cdot 10^{+77}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 360000000:\\ \;\;\;\;\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}{\sin B} - t\_0\\ \end{array} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (let* ((t_0 (/ x (tan B))))
       (if (<= F -2e+77)
         (- (/ -1.0 (sin B)) t_0)
         (if (<= F 360000000.0)
           (fma
            (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))
            F
            (/ (- x) (tan B)))
           (- (/ 1.0 (sin B)) t_0)))))
    double code(double F, double B, double x) {
    	double t_0 = x / tan(B);
    	double tmp;
    	if (F <= -2e+77) {
    		tmp = (-1.0 / sin(B)) - t_0;
    	} else if (F <= 360000000.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 / sin(B)) - t_0;
    	}
    	return tmp;
    }
    
    function code(F, B, x)
    	t_0 = Float64(x / tan(B))
    	tmp = 0.0
    	if (F <= -2e+77)
    		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
    	elseif (F <= 360000000.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 / sin(B)) - t_0);
    	end
    	return tmp
    end
    
    code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+77], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 360000000.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[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{x}{\tan B}\\
    \mathbf{if}\;F \leq -2 \cdot 10^{+77}:\\
    \;\;\;\;\frac{-1}{\sin B} - t\_0\\
    
    \mathbf{elif}\;F \leq 360000000:\\
    \;\;\;\;\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}{\sin B} - t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if F < -1.99999999999999997e77

      1. Initial program 41.3%

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

        \[\leadsto \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}} \]
      6. Step-by-step derivation
        1. lift-+.f64N/A

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

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

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

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

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

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

      if -1.99999999999999997e77 < F < 3.6e8

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

      if 3.6e8 < F

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 99.7% accurate, 1.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 82000000:\\ \;\;\;\;\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}{\sin B} - t\_0\\ \end{array} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (let* ((t_0 (/ x (tan B))))
         (if (<= F -2e+84)
           (- (/ -1.0 (sin B)) t_0)
           (if (<= F 82000000.0)
             (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) (* (cos B) x)) (sin B))
             (- (/ 1.0 (sin B)) t_0)))))
      double code(double F, double B, double x) {
      	double t_0 = x / tan(B);
      	double tmp;
      	if (F <= -2e+84) {
      		tmp = (-1.0 / sin(B)) - t_0;
      	} else if (F <= 82000000.0) {
      		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 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(x / tan(B))
      	tmp = 0.0
      	if (F <= -2e+84)
      		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
      	elseif (F <= 82000000.0)
      		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 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[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+84], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 82000000.0], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $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{x}{\tan B}\\
      \mathbf{if}\;F \leq -2 \cdot 10^{+84}:\\
      \;\;\;\;\frac{-1}{\sin B} - t\_0\\
      
      \mathbf{elif}\;F \leq 82000000:\\
      \;\;\;\;\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}{\sin B} - t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if F < -2.00000000000000012e84

        1. Initial program 40.0%

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

          \[\leadsto \left(-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}} \]
        6. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

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

        if -2.00000000000000012e84 < F < 8.2e7

        1. Initial program 96.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. 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) \]
          5. associate-*l/N/A

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

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

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

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

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

        1. Initial program 58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 99.6% accurate, 1.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 82000000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 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 (/ x (tan B))))
           (if (<= F -2e+84)
             (- (/ -1.0 (sin B)) t_0)
             (if (<= F 82000000.0)
               (/ (- (/ F (sqrt (fma F F 2.0))) (* (cos B) x)) (sin B))
               (- (/ 1.0 (sin B)) t_0)))))
        double code(double F, double B, double x) {
        	double t_0 = x / tan(B);
        	double tmp;
        	if (F <= -2e+84) {
        		tmp = (-1.0 / sin(B)) - t_0;
        	} else if (F <= 82000000.0) {
        		tmp = ((F / sqrt(fma(F, F, 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(x / tan(B))
        	tmp = 0.0
        	if (F <= -2e+84)
        		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
        	elseif (F <= 82000000.0)
        		tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 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[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+84], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 82000000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 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{x}{\tan B}\\
        \mathbf{if}\;F \leq -2 \cdot 10^{+84}:\\
        \;\;\;\;\frac{-1}{\sin B} - t\_0\\
        
        \mathbf{elif}\;F \leq 82000000:\\
        \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 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.00000000000000012e84

          1. Initial program 40.0%

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

            \[\leadsto \left(-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}} \]
          6. Step-by-step derivation
            1. lift-+.f64N/A

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

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

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

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

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

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

          if -2.00000000000000012e84 < F < 8.2e7

          1. Initial program 96.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. 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) \]
            5. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

          if 8.2e7 < F

          1. Initial program 58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 5: 99.1% accurate, 1.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.8:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 1.4:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, 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 (/ x (tan B))))
             (if (<= F -2.8)
               (- (/ -1.0 (sin B)) t_0)
               (if (<= F 1.4)
                 (/ (- (/ F (sqrt (fma 2.0 x 2.0))) (* (cos B) x)) (sin B))
                 (- (/ 1.0 (sin B)) t_0)))))
          double code(double F, double B, double x) {
          	double t_0 = x / tan(B);
          	double tmp;
          	if (F <= -2.8) {
          		tmp = (-1.0 / sin(B)) - t_0;
          	} else if (F <= 1.4) {
          		tmp = ((F / sqrt(fma(2.0, x, 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(x / tan(B))
          	tmp = 0.0
          	if (F <= -2.8)
          		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
          	elseif (F <= 1.4)
          		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, 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[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + 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{x}{\tan B}\\
          \mathbf{if}\;F \leq -2.8:\\
          \;\;\;\;\frac{-1}{\sin B} - t\_0\\
          
          \mathbf{elif}\;F \leq 1.4:\\
          \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, 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.7999999999999998

            1. Initial program 48.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 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.f6498.1

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}} \]
            7. Applied rewrites98.3%

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

            if -2.7999999999999998 < F < 1.3999999999999999

            1. Initial program 99.4%

              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. 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. 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) \]
              5. associate-*l/N/A

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

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

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

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

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

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

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

            if 1.3999999999999999 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 85.2% accurate, 1.5× speedup?

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

              1. Initial program 35.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 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}} \]
              6. Taylor expanded in B around 0

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

                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot \color{blue}{B}} \]
                2. Step-by-step derivation
                  1. lift-neg.f64N/A

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

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

                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{1}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                  4. lift-neg.f64N/A

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

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

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

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

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

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

                    \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(\tan B\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right)}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                  11. remove-double-negN/A

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

                    \[\leadsto \frac{1}{\color{blue}{\frac{\mathsf{neg}\left(\tan B\right)}{x}}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                  13. lower-neg.f6480.9

                    \[\leadsto \frac{1}{\frac{\color{blue}{-\tan B}}{x}} + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                3. Applied rewrites80.9%

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

                if -3.0000000000000002e231 < F < -1.24999999999999997e37

                1. Initial program 50.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}} \]
                6. Step-by-step derivation
                  1. lift-+.f64N/A

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                8. Taylor expanded in B around 0

                  \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                9. Step-by-step derivation
                  1. lower-/.f6486.5

                    \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                10. Applied rewrites86.5%

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

                if -1.24999999999999997e37 < F < 2.9000000000000002e-144

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

                if 2.9000000000000002e-144 < F < 8.1999999999999994e-6

                1. Initial program 99.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. 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) \]
                  5. associate-*l/N/A

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

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

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

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

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

                  \[\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. +-commutativeN/A

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

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

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

                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{F \cdot F + \color{blue}{\left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{\sin B} \]
                  11. 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)}{\sin B} \]
                  12. +-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)}{\sin B} \]
                  13. 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)}{\sin B} \]
                  14. lower-neg.f6487.4

                    \[\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)}{\sin B} \]
                8. Applied rewrites87.4%

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

                if 8.1999999999999994e-6 < F

                1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                5. Applied rewrites98.7%

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{1}{\frac{\tan B}{x}}\\ \mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.9 \cdot 10^{-144}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}{B}, F, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \cos B \cdot x}{\sin B}\\ \end{array} \]
                9. Add Preprocessing

                Alternative 7: 92.1% accurate, 1.5× speedup?

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}} \]
                    5. lower--.f6499.0

                      \[\leadsto \color{blue}{\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}} \]
                  7. Applied rewrites99.2%

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

                  if -48 < F < 2.9000000000000002e-144

                  1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

                  if 2.9000000000000002e-144 < F < 8.1999999999999994e-6

                  1. Initial program 99.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. 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) \]
                    5. associate-*l/N/A

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

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

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

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

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

                    \[\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. +-commutativeN/A

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

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

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

                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{F \cdot F + \color{blue}{\left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{\sin B} \]
                    11. 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)}{\sin B} \]
                    12. +-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)}{\sin B} \]
                    13. 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)}{\sin B} \]
                    14. lower-neg.f6487.4

                      \[\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)}{\sin B} \]
                  8. Applied rewrites87.4%

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

                  if 8.1999999999999994e-6 < F

                  1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                  5. Applied rewrites98.7%

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

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

                  Alternative 8: 92.1% accurate, 1.5× speedup?

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

                    1. Initial program 48.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. 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) \]
                      5. associate-*l/N/A

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

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

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

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

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

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

                      if -48 < F < 2.9000000000000002e-144

                      1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

                      if 2.9000000000000002e-144 < F < 8.1999999999999994e-6

                      1. Initial program 99.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. 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) \]
                        5. associate-*l/N/A

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

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

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

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

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

                        \[\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. +-commutativeN/A

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

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

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

                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{F \cdot F + \color{blue}{\left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{\sin B} \]
                        11. 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)}{\sin B} \]
                        12. +-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)}{\sin B} \]
                        13. 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)}{\sin B} \]
                        14. lower-neg.f6487.4

                          \[\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)}{\sin B} \]
                      8. Applied rewrites87.4%

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

                      if 8.1999999999999994e-6 < F

                      1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                      5. Applied rewrites98.7%

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

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

                      Alternative 9: 92.1% accurate, 1.5× speedup?

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

                        1. Initial program 48.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. 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) \]
                          5. associate-*l/N/A

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

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

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

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

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

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

                          if -48 < F < 2.9000000000000002e-144

                          1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

                          if 2.9000000000000002e-144 < F < 8.1999999999999994e-6

                          1. Initial program 99.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. 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) \]
                            5. associate-*l/N/A

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

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

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

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

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

                            \[\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. +-commutativeN/A

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

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

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

                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{F \cdot F + \color{blue}{\left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{\sin B} \]
                            11. 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)}{\sin B} \]
                            12. +-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)}{\sin B} \]
                            13. 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)}{\sin B} \]
                            14. lower-neg.f6487.4

                              \[\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)}{\sin B} \]
                          8. Applied rewrites87.4%

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

                          if 8.1999999999999994e-6 < F

                          1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                          5. Applied rewrites98.7%

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

                              \[\leadsto \frac{1 - \cos B \cdot x}{\color{blue}{\sin B}} \]
                          7. Recombined 4 regimes into one program.
                          8. Add Preprocessing

                          Alternative 10: 72.0% accurate, 2.0× speedup?

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

                            1. Initial program 35.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 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}} \]
                            6. Taylor expanded in B around 0

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

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot \color{blue}{B}} \]
                              2. Step-by-step derivation
                                1. lift-neg.f64N/A

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

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

                                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{1}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                4. lift-neg.f64N/A

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

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

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

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

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

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

                                  \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(\tan B\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right)}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                11. remove-double-negN/A

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

                                  \[\leadsto \frac{1}{\color{blue}{\frac{\mathsf{neg}\left(\tan B\right)}{x}}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                13. lower-neg.f6480.9

                                  \[\leadsto \frac{1}{\frac{\color{blue}{-\tan B}}{x}} + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                              3. Applied rewrites80.9%

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

                              if -3.0000000000000002e231 < F < -2.50000000000000008e82

                              1. Initial program 45.5%

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

                                \[\leadsto \left(-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}} \]
                              6. Step-by-step derivation
                                1. lift-+.f64N/A

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

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

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

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

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

                                \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                              8. Taylor expanded in B around 0

                                \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                              9. Step-by-step derivation
                                1. lower-/.f6485.0

                                  \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                              10. Applied rewrites85.0%

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

                              if -2.50000000000000008e82 < F < -3.80000000000000025e-219 or 8.5000000000000001e-182 < F < 8.1999999999999994e-6

                              1. Initial program 94.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. 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) \]
                                5. associate-*l/N/A

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{F \cdot F + \color{blue}{\left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{\sin B} \]
                                11. 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)}{\sin B} \]
                                12. +-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)}{\sin B} \]
                                13. 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)}{\sin B} \]
                                14. lower-neg.f6483.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)}{\sin B} \]
                              8. Applied rewrites83.2%

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

                              if -3.80000000000000025e-219 < F < 8.5000000000000001e-182

                              1. Initial program 99.3%

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}} \]
                                5. lower--.f6440.1

                                  \[\leadsto \color{blue}{\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}} \]
                              7. Applied rewrites40.2%

                                \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                              8. Taylor expanded in B around 0

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

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

                                if 8.1999999999999994e-6 < F

                                1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                5. Applied rewrites98.7%

                                  \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                6. Taylor expanded in B around 0

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

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

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{1}{\frac{\tan B}{x}}\\ \mathbf{elif}\;F \leq -2.5 \cdot 10^{+82}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -3.8 \cdot 10^{-219}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{\sin B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-182}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, B \cdot B, -0.16666666666666666\right), B \cdot B, 1\right) \cdot B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
                                10. Add Preprocessing

                                Alternative 11: 72.0% accurate, 2.0× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{\sin B}\\ \mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B} - t\_0\\ \mathbf{elif}\;F \leq -2.5 \cdot 10^{+82}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -3.8 \cdot 10^{-219}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-182}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, B \cdot B, -0.16666666666666666\right), B \cdot B, 1\right) \cdot B} - t\_0\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
                                (FPCore (F B x)
                                 :precision binary64
                                 (let* ((t_0 (/ x (tan B)))
                                        (t_1
                                         (/ (fma (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0)))) F (- x)) (sin B))))
                                   (if (<= F -3e+231)
                                     (- (/ -1.0 (* (fma (* B B) -0.16666666666666666 1.0) B)) t_0)
                                     (if (<= F -2.5e+82)
                                       (- (/ -1.0 (sin B)) (/ x B))
                                       (if (<= F -3.8e-219)
                                         t_1
                                         (if (<= F 8.5e-182)
                                           (-
                                            (/
                                             -1.0
                                             (*
                                              (fma
                                               (fma 0.008333333333333333 (* B B) -0.16666666666666666)
                                               (* B B)
                                               1.0)
                                              B))
                                            t_0)
                                           (if (<= F 8.2e-6) t_1 (- (/ 1.0 (sin B)) (/ x B)))))))))
                                double code(double F, double B, double x) {
                                	double t_0 = x / tan(B);
                                	double t_1 = fma(sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0)))), F, -x) / sin(B);
                                	double tmp;
                                	if (F <= -3e+231) {
                                		tmp = (-1.0 / (fma((B * B), -0.16666666666666666, 1.0) * B)) - t_0;
                                	} else if (F <= -2.5e+82) {
                                		tmp = (-1.0 / sin(B)) - (x / B);
                                	} else if (F <= -3.8e-219) {
                                		tmp = t_1;
                                	} else if (F <= 8.5e-182) {
                                		tmp = (-1.0 / (fma(fma(0.008333333333333333, (B * B), -0.16666666666666666), (B * B), 1.0) * B)) - t_0;
                                	} else if (F <= 8.2e-6) {
                                		tmp = t_1;
                                	} else {
                                		tmp = (1.0 / sin(B)) - (x / B);
                                	}
                                	return tmp;
                                }
                                
                                function code(F, B, x)
                                	t_0 = Float64(x / tan(B))
                                	t_1 = Float64(fma(sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))), F, Float64(-x)) / sin(B))
                                	tmp = 0.0
                                	if (F <= -3e+231)
                                		tmp = Float64(Float64(-1.0 / Float64(fma(Float64(B * B), -0.16666666666666666, 1.0) * B)) - t_0);
                                	elseif (F <= -2.5e+82)
                                		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
                                	elseif (F <= -3.8e-219)
                                		tmp = t_1;
                                	elseif (F <= 8.5e-182)
                                		tmp = Float64(Float64(-1.0 / Float64(fma(fma(0.008333333333333333, Float64(B * B), -0.16666666666666666), Float64(B * B), 1.0) * B)) - t_0);
                                	elseif (F <= 8.2e-6)
                                		tmp = t_1;
                                	else
                                		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
                                	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[(N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F + (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e+231], N[(N[(-1.0 / N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.5e+82], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.8e-219], t$95$1, If[LessEqual[F, 8.5e-182], N[(N[(-1.0 / N[(N[(N[(0.008333333333333333 * N[(B * B), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.2e-6], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_0 := \frac{x}{\tan B}\\
                                t_1 := \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{\sin B}\\
                                \mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\
                                \;\;\;\;\frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B} - t\_0\\
                                
                                \mathbf{elif}\;F \leq -2.5 \cdot 10^{+82}:\\
                                \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
                                
                                \mathbf{elif}\;F \leq -3.8 \cdot 10^{-219}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;F \leq 8.5 \cdot 10^{-182}:\\
                                \;\;\;\;\frac{-1}{\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, B \cdot B, -0.16666666666666666\right), B \cdot B, 1\right) \cdot B} - t\_0\\
                                
                                \mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 5 regimes
                                2. if F < -3.0000000000000002e231

                                  1. Initial program 35.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 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}} \]
                                  6. Taylor expanded in B around 0

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

                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot \color{blue}{B}} \]
                                    2. Step-by-step derivation
                                      1. lift-+.f64N/A

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

                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                      3. lift-*.f64N/A

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

                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{1}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                      5. lift-neg.f64N/A

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

                                        \[\leadsto \left(-x\right) \cdot \color{blue}{\frac{1}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                      7. div-invN/A

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

                                        \[\leadsto \color{blue}{\frac{-x}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                    3. Applied rewrites80.8%

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

                                    if -3.0000000000000002e231 < F < -2.50000000000000008e82

                                    1. Initial program 45.5%

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

                                      \[\leadsto \left(-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}} \]
                                    6. Step-by-step derivation
                                      1. lift-+.f64N/A

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

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

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

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

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

                                      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                                    8. Taylor expanded in B around 0

                                      \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                    9. Step-by-step derivation
                                      1. lower-/.f6485.0

                                        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                    10. Applied rewrites85.0%

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

                                    if -2.50000000000000008e82 < F < -3.80000000000000025e-219 or 8.5000000000000001e-182 < F < 8.1999999999999994e-6

                                    1. Initial program 94.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. 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) \]
                                      5. associate-*l/N/A

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{F \cdot F + \color{blue}{\left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{\sin B} \]
                                      11. 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)}{\sin B} \]
                                      12. +-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)}{\sin B} \]
                                      13. 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)}{\sin B} \]
                                      14. lower-neg.f6483.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)}{\sin B} \]
                                    8. Applied rewrites83.2%

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

                                    if -3.80000000000000025e-219 < F < 8.5000000000000001e-182

                                    1. Initial program 99.3%

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

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

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

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

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

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

                                        \[\leadsto \color{blue}{\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}} \]
                                      5. lower--.f6440.1

                                        \[\leadsto \color{blue}{\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}} \]
                                    7. Applied rewrites40.2%

                                      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                                    8. Taylor expanded in B around 0

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

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

                                      if 8.1999999999999994e-6 < F

                                      1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                      5. Applied rewrites98.7%

                                        \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                      6. Taylor expanded in B around 0

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

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

                                      Alternative 12: 78.3% accurate, 2.0× speedup?

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

                                        1. Initial program 35.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 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}} \]
                                        6. Taylor expanded in B around 0

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

                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot \color{blue}{B}} \]
                                          2. Step-by-step derivation
                                            1. lift-neg.f64N/A

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

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

                                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{1}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                            4. lift-neg.f64N/A

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

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

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

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

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

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

                                              \[\leadsto \frac{1}{\frac{\mathsf{neg}\left(\tan B\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right)}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                            11. remove-double-negN/A

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

                                              \[\leadsto \frac{1}{\color{blue}{\frac{\mathsf{neg}\left(\tan B\right)}{x}}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                            13. lower-neg.f6480.9

                                              \[\leadsto \frac{1}{\frac{\color{blue}{-\tan B}}{x}} + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                                          3. Applied rewrites80.9%

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

                                          if -3.0000000000000002e231 < F < -1.24999999999999997e37

                                          1. Initial program 50.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}} \]
                                          6. Step-by-step derivation
                                            1. lift-+.f64N/A

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

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

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

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

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

                                            \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                                          8. Taylor expanded in B around 0

                                            \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                          9. Step-by-step derivation
                                            1. lower-/.f6486.5

                                              \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                          10. Applied rewrites86.5%

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

                                          if -1.24999999999999997e37 < F < 2.5e19

                                          1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

                                          if 2.5e19 < F

                                          1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                          6. Taylor expanded in B around 0

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

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

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

                                          Alternative 13: 64.2% accurate, 2.2× speedup?

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

                                            1. Initial program 35.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 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}} \]
                                            6. Taylor expanded in B around 0

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

                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot \color{blue}{B}} \]
                                              2. Step-by-step derivation
                                                1. lift-+.f64N/A

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

                                                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                3. lift-*.f64N/A

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

                                                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{1}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                5. lift-neg.f64N/A

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

                                                  \[\leadsto \left(-x\right) \cdot \color{blue}{\frac{1}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                7. div-invN/A

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

                                                  \[\leadsto \color{blue}{\frac{-x}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                              3. Applied rewrites80.8%

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

                                              if -3.0000000000000002e231 < F < -1.24999999999999997e37

                                              1. Initial program 50.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}} \]
                                              6. Step-by-step derivation
                                                1. lift-+.f64N/A

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

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

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

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

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

                                                \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                                              8. Taylor expanded in B around 0

                                                \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                              9. Step-by-step derivation
                                                1. lower-/.f6486.5

                                                  \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                              10. Applied rewrites86.5%

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

                                              if -1.24999999999999997e37 < F < 1.29999999999999995e-127

                                              1. Initial program 99.4%

                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in 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.f6442.6

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

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

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

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

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

                                                  \[\leadsto \color{blue}{\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}} \]
                                                5. lower--.f6442.6

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

                                                \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                                              8. Taylor expanded in B around 0

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

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

                                                if 1.29999999999999995e-127 < F < 8.1999999999999994e-6

                                                1. Initial program 99.0%

                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in x around 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.f6472.6

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

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

                                                if 8.1999999999999994e-6 < F

                                                1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                                5. Applied rewrites98.7%

                                                  \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                                6. Taylor expanded in B around 0

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

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

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.3 \cdot 10^{-127}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, B \cdot B, -0.16666666666666666\right), B \cdot B, 1\right) \cdot B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
                                                10. Add Preprocessing

                                                Alternative 14: 63.9% accurate, 2.2× speedup?

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

                                                  1. Initial program 84.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.f6455.9

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

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

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

                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot \color{blue}{B}} \]
                                                    2. Step-by-step derivation
                                                      1. lift-+.f64N/A

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

                                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                      3. lift-*.f64N/A

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

                                                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{1}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                      5. lift-neg.f64N/A

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

                                                        \[\leadsto \left(-x\right) \cdot \color{blue}{\frac{1}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                      7. div-invN/A

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

                                                        \[\leadsto \color{blue}{\frac{-x}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                    3. Applied rewrites63.9%

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

                                                    if -3.0000000000000002e231 < F < -1.24999999999999997e37

                                                    1. Initial program 50.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}} \]
                                                    6. Step-by-step derivation
                                                      1. lift-+.f64N/A

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

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

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

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

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

                                                      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                                                    8. Taylor expanded in B around 0

                                                      \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                                    9. Step-by-step derivation
                                                      1. lower-/.f6486.5

                                                        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                                    10. Applied rewrites86.5%

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

                                                    if 1.29999999999999995e-127 < F < 8.1999999999999994e-6

                                                    1. Initial program 99.0%

                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                    2. Add Preprocessing
                                                    3. Taylor expanded in x around 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.f6472.6

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

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

                                                    if 8.1999999999999994e-6 < F

                                                    1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                                    5. Applied rewrites98.7%

                                                      \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                                    6. Taylor expanded in B around 0

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

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

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.3 \cdot 10^{-127}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
                                                    10. Add Preprocessing

                                                    Alternative 15: 63.5% accurate, 2.2× speedup?

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

                                                      1. Initial program 83.8%

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

                                                        \[\leadsto \left(-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.f6456.6

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

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

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

                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot \color{blue}{B}} \]
                                                        2. Step-by-step derivation
                                                          1. lift-+.f64N/A

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

                                                            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                          3. lift-*.f64N/A

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

                                                            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{1}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                          5. lift-neg.f64N/A

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

                                                            \[\leadsto \left(-x\right) \cdot \color{blue}{\frac{1}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                          7. div-invN/A

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

                                                            \[\leadsto \color{blue}{\frac{-x}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                        3. Applied rewrites65.1%

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

                                                        if -3.0000000000000002e231 < F < -1.24999999999999997e37

                                                        1. Initial program 50.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}} \]
                                                        6. Step-by-step derivation
                                                          1. lift-+.f64N/A

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

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

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

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

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

                                                          \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                                                        8. Taylor expanded in B around 0

                                                          \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                                        9. Step-by-step derivation
                                                          1. lower-/.f6486.5

                                                            \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                                        10. Applied rewrites86.5%

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

                                                        if 2.79999999999999997e-180 < F < 0.0155

                                                        1. Initial program 99.1%

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

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

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

                                                        if 0.0155 < F

                                                        1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                                        5. Applied rewrites98.7%

                                                          \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                                        6. Taylor expanded in B around 0

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

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

                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{-180}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 0.0155:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.019444444444444445, 0.16666666666666666 \cdot F\right), \mathsf{fma}\left(0.022222222222222223, B \cdot B, 0.3333333333333333\right) \cdot x\right), B \cdot B, \mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
                                                        10. Add Preprocessing

                                                        Alternative 16: 62.2% accurate, 2.2× speedup?

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

                                                          1. Initial program 83.8%

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

                                                            \[\leadsto \left(-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.f6456.6

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

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

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

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

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

                                                              \[\leadsto \color{blue}{\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}} \]
                                                            5. lower--.f6456.6

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

                                                            \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                                                          8. Taylor expanded in B around 0

                                                            \[\leadsto \frac{-1}{\color{blue}{B}} - \frac{x}{\tan B} \]
                                                          9. Step-by-step derivation
                                                            1. Applied rewrites61.6%

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

                                                            if -3.0000000000000002e231 < F < -1.24999999999999997e37

                                                            1. Initial program 50.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}} \]
                                                            6. Step-by-step derivation
                                                              1. lift-+.f64N/A

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

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

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

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

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

                                                              \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                                                            8. Taylor expanded in B around 0

                                                              \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                                            9. Step-by-step derivation
                                                              1. lower-/.f6486.5

                                                                \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                                            10. Applied rewrites86.5%

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

                                                            if 2.79999999999999997e-180 < F < 0.0155

                                                            1. Initial program 99.1%

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

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

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

                                                            if 0.0155 < F

                                                            1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                                            5. Applied rewrites98.7%

                                                              \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                                            6. Taylor expanded in B around 0

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

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

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{-180}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 0.0155:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.019444444444444445, 0.16666666666666666 \cdot F\right), \mathsf{fma}\left(0.022222222222222223, B \cdot B, 0.3333333333333333\right) \cdot x\right), B \cdot B, \mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
                                                            10. Add Preprocessing

                                                            Alternative 17: 70.5% accurate, 2.4× speedup?

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

                                                              1. Initial program 81.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 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.f6486.7

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

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

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

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot \color{blue}{B}} \]
                                                                2. Step-by-step derivation
                                                                  1. lift-+.f64N/A

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

                                                                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                                  3. lift-*.f64N/A

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

                                                                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{1}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                                  5. lift-neg.f64N/A

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

                                                                    \[\leadsto \left(-x\right) \cdot \color{blue}{\frac{1}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                                  7. div-invN/A

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

                                                                    \[\leadsto \color{blue}{\frac{-x}{\tan B}} + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                                3. Applied rewrites88.8%

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

                                                                if -8.2000000000000004e-13 < x < 2.5499999999999998e-74

                                                                1. Initial program 66.5%

                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                2. Add Preprocessing
                                                                3. Step-by-step derivation
                                                                  1. 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. 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) \]
                                                                  5. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              Alternative 18: 62.2% accurate, 2.5× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{-180}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 0.0155:\\ \;\;\;\;\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}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
                                                              (FPCore (F B x)
                                                               :precision binary64
                                                               (let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
                                                                 (if (<= F -3e+231)
                                                                   t_0
                                                                   (if (<= F -1.25e+37)
                                                                     (- (/ -1.0 (sin B)) (/ x B))
                                                                     (if (<= F 2.8e-180)
                                                                       t_0
                                                                       (if (<= F 0.0155)
                                                                         (/
                                                                          (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)
                                                                         (- (/ 1.0 (sin B)) (/ x B))))))))
                                                              double code(double F, double B, double x) {
                                                              	double t_0 = (-1.0 / B) - (x / tan(B));
                                                              	double tmp;
                                                              	if (F <= -3e+231) {
                                                              		tmp = t_0;
                                                              	} else if (F <= -1.25e+37) {
                                                              		tmp = (-1.0 / sin(B)) - (x / B);
                                                              	} else if (F <= 2.8e-180) {
                                                              		tmp = t_0;
                                                              	} else if (F <= 0.0155) {
                                                              		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 = (1.0 / sin(B)) - (x / B);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              function code(F, B, x)
                                                              	t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B)))
                                                              	tmp = 0.0
                                                              	if (F <= -3e+231)
                                                              		tmp = t_0;
                                                              	elseif (F <= -1.25e+37)
                                                              		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
                                                              	elseif (F <= 2.8e-180)
                                                              		tmp = t_0;
                                                              	elseif (F <= 0.0155)
                                                              		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(Float64(1.0 / sin(B)) - Float64(x / B));
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e+231], t$95$0, If[LessEqual[F, -1.25e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e-180], t$95$0, If[LessEqual[F, 0.0155], 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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
                                                              \mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\
                                                              \;\;\;\;t\_0\\
                                                              
                                                              \mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\
                                                              \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
                                                              
                                                              \mathbf{elif}\;F \leq 2.8 \cdot 10^{-180}:\\
                                                              \;\;\;\;t\_0\\
                                                              
                                                              \mathbf{elif}\;F \leq 0.0155:\\
                                                              \;\;\;\;\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}:\\
                                                              \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 4 regimes
                                                              2. if F < -3.0000000000000002e231 or -1.24999999999999997e37 < F < 2.79999999999999997e-180

                                                                1. Initial program 83.8%

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

                                                                  \[\leadsto \left(-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.f6456.6

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

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

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

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

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

                                                                    \[\leadsto \color{blue}{\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}} \]
                                                                  5. lower--.f6456.6

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

                                                                  \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                                                                8. Taylor expanded in B around 0

                                                                  \[\leadsto \frac{-1}{\color{blue}{B}} - \frac{x}{\tan B} \]
                                                                9. Step-by-step derivation
                                                                  1. Applied rewrites61.6%

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

                                                                  if -3.0000000000000002e231 < F < -1.24999999999999997e37

                                                                  1. Initial program 50.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}} \]
                                                                  6. Step-by-step derivation
                                                                    1. lift-+.f64N/A

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

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

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

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

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

                                                                    \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                                                                  8. Taylor expanded in B around 0

                                                                    \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                                                  9. Step-by-step derivation
                                                                    1. lower-/.f6486.5

                                                                      \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
                                                                  10. Applied rewrites86.5%

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

                                                                  if 2.79999999999999997e-180 < F < 0.0155

                                                                  1. Initial program 99.1%

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

                                                                  1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                                                  5. Applied rewrites98.7%

                                                                    \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                                                  6. Taylor expanded in B around 0

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

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

                                                                  Alternative 19: 62.1% accurate, 2.7× speedup?

                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq 2.8 \cdot 10^{-180}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 0.0155:\\ \;\;\;\;\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}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
                                                                  (FPCore (F B x)
                                                                   :precision binary64
                                                                   (if (<= F 2.8e-180)
                                                                     (- (/ -1.0 B) (/ x (tan B)))
                                                                     (if (<= F 0.0155)
                                                                       (/
                                                                        (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)
                                                                       (- (/ 1.0 (sin B)) (/ x B)))))
                                                                  double code(double F, double B, double x) {
                                                                  	double tmp;
                                                                  	if (F <= 2.8e-180) {
                                                                  		tmp = (-1.0 / B) - (x / tan(B));
                                                                  	} else if (F <= 0.0155) {
                                                                  		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 = (1.0 / sin(B)) - (x / B);
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  function code(F, B, x)
                                                                  	tmp = 0.0
                                                                  	if (F <= 2.8e-180)
                                                                  		tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B)));
                                                                  	elseif (F <= 0.0155)
                                                                  		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(Float64(1.0 / sin(B)) - Float64(x / B));
                                                                  	end
                                                                  	return tmp
                                                                  end
                                                                  
                                                                  code[F_, B_, x_] := If[LessEqual[F, 2.8e-180], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0155], 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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
                                                                  
                                                                  \begin{array}{l}
                                                                  
                                                                  \\
                                                                  \begin{array}{l}
                                                                  \mathbf{if}\;F \leq 2.8 \cdot 10^{-180}:\\
                                                                  \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
                                                                  
                                                                  \mathbf{elif}\;F \leq 0.0155:\\
                                                                  \;\;\;\;\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}:\\
                                                                  \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 3 regimes
                                                                  2. if F < 2.79999999999999997e-180

                                                                    1. Initial program 75.0%

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

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

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

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

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

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

                                                                        \[\leadsto \color{blue}{\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}} \]
                                                                      5. lower--.f6468.1

                                                                        \[\leadsto \color{blue}{\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}} \]
                                                                    7. Applied rewrites68.2%

                                                                      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{\tan B}} \]
                                                                    8. Taylor expanded in B around 0

                                                                      \[\leadsto \frac{-1}{\color{blue}{B}} - \frac{x}{\tan B} \]
                                                                    9. Step-by-step derivation
                                                                      1. Applied rewrites62.0%

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

                                                                      if 2.79999999999999997e-180 < F < 0.0155

                                                                      1. Initial program 99.1%

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

                                                                      1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                                                      5. Applied rewrites98.7%

                                                                        \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                                                      6. Taylor expanded in B around 0

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

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

                                                                      Alternative 20: 57.1% accurate, 2.7× speedup?

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

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

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

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

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

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

                                                                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                                          3. Step-by-step derivation
                                                                            1. lower-/.f6446.2

                                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                                                                          4. Applied rewrites46.2%

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

                                                                          if -680 < F < 8.9999999999999998e-26

                                                                          1. Initial program 99.4%

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

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

                                                                              \[\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 rewrites46.8%

                                                                            \[\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. Applied rewrites46.9%

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

                                                                          if 8.9999999999999998e-26 < F

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

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

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

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

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

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

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

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

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

                                                                              \[\leadsto \frac{1}{\sin B} - \cos B \cdot \color{blue}{\frac{x}{\sin B}} \]
                                                                            9. lower-sin.f6497.4

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

                                                                            \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                                                          6. Taylor expanded in B around 0

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

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

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

                                                                          Alternative 21: 51.3% accurate, 3.0× speedup?

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

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

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

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

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

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

                                                                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                                              3. Step-by-step derivation
                                                                                1. lower-/.f6446.2

                                                                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                                                                              4. Applied rewrites46.2%

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

                                                                              if -680 < F < 0.0155

                                                                              1. Initial program 99.4%

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

                                                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                              4. Step-by-step derivation
                                                                                1. 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.f6446.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 rewrites46.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. Applied rewrites46.5%

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

                                                                              if 0.0155 < F

                                                                              1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                                                              5. Applied rewrites98.7%

                                                                                \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                                                              6. Taylor expanded in x around 0

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

                                                                                  \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                                                                              8. Recombined 3 regimes into one program.
                                                                              9. Final simplification50.0%

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

                                                                              Alternative 22: 50.8% accurate, 5.2× speedup?

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

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

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

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

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

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

                                                                                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                                                  3. Step-by-step derivation
                                                                                    1. lower-/.f6446.2

                                                                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                                                                                  4. Applied rewrites46.2%

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

                                                                                  if -680 < F < 8.1999999999999994e-6

                                                                                  1. Initial program 99.4%

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

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

                                                                                      \[\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 rewrites46.4%

                                                                                    \[\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. Applied rewrites46.5%

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

                                                                                  if 8.1999999999999994e-6 < F

                                                                                  1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

                                                                                      \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                                                                  5. Applied rewrites98.7%

                                                                                    \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                                                                  6. Taylor expanded in B around 0

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

                                                                                      \[\leadsto \frac{\mathsf{fma}\left(0.16666666666666666 + 0.3333333333333333 \cdot x, B \cdot B, 1\right) - x}{\color{blue}{B}} \]
                                                                                  8. Recombined 3 regimes into one program.
                                                                                  9. Final simplification46.5%

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

                                                                                  Alternative 23: 50.8% accurate, 6.1× speedup?

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

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

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

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

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

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

                                                                                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                                                                                      3. Step-by-step derivation
                                                                                        1. lower-/.f6446.2

                                                                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                                                                                      4. Applied rewrites46.2%

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

                                                                                      if -680 < F < 8.1999999999999994e-6

                                                                                      1. Initial program 99.4%

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

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

                                                                                          \[\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 rewrites46.4%

                                                                                        \[\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. Applied rewrites46.5%

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

                                                                                      if 8.1999999999999994e-6 < F

                                                                                      1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

                                                                                          \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                                                                      5. Applied rewrites98.7%

                                                                                        \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                                                                      6. Taylor expanded in B around 0

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

                                                                                          \[\leadsto \frac{\mathsf{fma}\left(0.16666666666666666 + 0.3333333333333333 \cdot x, B \cdot B, 1\right) - x}{\color{blue}{B}} \]
                                                                                      8. Recombined 3 regimes into one program.
                                                                                      9. Final simplification46.5%

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

                                                                                      Alternative 24: 50.4% accurate, 6.2× speedup?

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

                                                                                        1. Initial program 48.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.f6427.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 rewrites27.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 rewrites17.2%

                                                                                            \[\leadsto \frac{-x}{B} \]
                                                                                          2. Taylor expanded in F around -inf

                                                                                            \[\leadsto -1 \cdot \frac{1 + x}{B} + \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}}} \]
                                                                                          3. Step-by-step derivation
                                                                                            1. Applied rewrites46.0%

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

                                                                                            if -7 < F < 8.1999999999999994e-6

                                                                                            1. Initial program 99.4%

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

                                                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                            4. Step-by-step derivation
                                                                                              1. 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.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 rewrites45.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 rewrites45.9%

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

                                                                                              if 8.1999999999999994e-6 < F

                                                                                              1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

                                                                                                  \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                                                                              5. Applied rewrites98.7%

                                                                                                \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                                                                              6. Taylor expanded in B around 0

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

                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(0.16666666666666666 + 0.3333333333333333 \cdot x, B \cdot B, 1\right) - x}{\color{blue}{B}} \]
                                                                                              8. Recombined 3 regimes into one program.
                                                                                              9. Final simplification46.2%

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

                                                                                              Alternative 25: 50.4% accurate, 7.7× speedup?

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

                                                                                                1. Initial program 48.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.f6427.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 rewrites27.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 rewrites17.2%

                                                                                                    \[\leadsto \frac{-x}{B} \]
                                                                                                  2. Taylor expanded in F around -inf

                                                                                                    \[\leadsto -1 \cdot \frac{1 + x}{B} + \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}}} \]
                                                                                                  3. Step-by-step derivation
                                                                                                    1. Applied rewrites46.0%

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

                                                                                                    if -7 < F < 8.1999999999999994e-6

                                                                                                    1. Initial program 99.4%

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

                                                                                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                    4. Step-by-step derivation
                                                                                                      1. 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.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 rewrites45.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 rewrites45.9%

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

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{2}}, F, -x\right)}{B} \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites45.9%

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

                                                                                                        if 8.1999999999999994e-6 < F

                                                                                                        1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

                                                                                                            \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                                                                                        5. Applied rewrites98.7%

                                                                                                          \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                                                                                        6. Taylor expanded in B around 0

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

                                                                                                            \[\leadsto \frac{\mathsf{fma}\left(0.16666666666666666 + 0.3333333333333333 \cdot x, B \cdot B, 1\right) - x}{\color{blue}{B}} \]
                                                                                                        8. Recombined 3 regimes into one program.
                                                                                                        9. Final simplification46.2%

                                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7:\\ \;\;\;\;\frac{1 + x}{\left(F \cdot F\right) \cdot B} - \frac{1 + x}{B}\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{0.5}, F, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(0.3333333333333333 \cdot x + 0.16666666666666666, B \cdot B, 1\right) - x}{B}\\ \end{array} \]
                                                                                                        10. Add Preprocessing

                                                                                                        Alternative 26: 50.7% accurate, 8.0× speedup?

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

                                                                                                          1. Initial program 48.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.f6427.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 rewrites27.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 \cdot \left(1 + x\right)}{B} \]
                                                                                                          7. Step-by-step derivation
                                                                                                            1. Applied rewrites45.8%

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

                                                                                                            if -1.3999999999999999 < F < 8.1999999999999994e-6

                                                                                                            1. Initial program 99.4%

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

                                                                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                            4. Step-by-step derivation
                                                                                                              1. 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.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 rewrites45.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 rewrites45.9%

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

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{2}}, F, -x\right)}{B} \]
                                                                                                              3. Step-by-step derivation
                                                                                                                1. Applied rewrites45.9%

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

                                                                                                                if 8.1999999999999994e-6 < F

                                                                                                                1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

                                                                                                                    \[\leadsto \frac{1}{\sin B} - \cos B \cdot \frac{x}{\color{blue}{\sin B}} \]
                                                                                                                5. Applied rewrites98.7%

                                                                                                                  \[\leadsto \color{blue}{\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}} \]
                                                                                                                6. Taylor expanded in B around 0

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

                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(0.16666666666666666 + 0.3333333333333333 \cdot x, B \cdot B, 1\right) - x}{\color{blue}{B}} \]
                                                                                                                8. Recombined 3 regimes into one program.
                                                                                                                9. Final simplification46.2%

                                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.4:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{0.5}, F, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(0.3333333333333333 \cdot x + 0.16666666666666666, B \cdot B, 1\right) - x}{B}\\ \end{array} \]
                                                                                                                10. Add Preprocessing

                                                                                                                Alternative 27: 50.6% accurate, 8.8× speedup?

                                                                                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.4:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4200000:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{0.5}, F, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                                                                                (FPCore (F B x)
                                                                                                                 :precision binary64
                                                                                                                 (if (<= F -1.4)
                                                                                                                   (/ (- -1.0 x) B)
                                                                                                                   (if (<= F 4200000.0) (/ (fma (sqrt 0.5) F (- x)) B) (/ (- 1.0 x) B))))
                                                                                                                double code(double F, double B, double x) {
                                                                                                                	double tmp;
                                                                                                                	if (F <= -1.4) {
                                                                                                                		tmp = (-1.0 - x) / B;
                                                                                                                	} else if (F <= 4200000.0) {
                                                                                                                		tmp = fma(sqrt(0.5), F, -x) / B;
                                                                                                                	} else {
                                                                                                                		tmp = (1.0 - x) / B;
                                                                                                                	}
                                                                                                                	return tmp;
                                                                                                                }
                                                                                                                
                                                                                                                function code(F, B, x)
                                                                                                                	tmp = 0.0
                                                                                                                	if (F <= -1.4)
                                                                                                                		tmp = Float64(Float64(-1.0 - x) / B);
                                                                                                                	elseif (F <= 4200000.0)
                                                                                                                		tmp = Float64(fma(sqrt(0.5), F, Float64(-x)) / B);
                                                                                                                	else
                                                                                                                		tmp = Float64(Float64(1.0 - x) / B);
                                                                                                                	end
                                                                                                                	return tmp
                                                                                                                end
                                                                                                                
                                                                                                                code[F_, B_, x_] := If[LessEqual[F, -1.4], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4200000.0], N[(N[(N[Sqrt[0.5], $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.4:\\
                                                                                                                \;\;\;\;\frac{-1 - x}{B}\\
                                                                                                                
                                                                                                                \mathbf{elif}\;F \leq 4200000:\\
                                                                                                                \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{0.5}, F, -x\right)}{B}\\
                                                                                                                
                                                                                                                \mathbf{else}:\\
                                                                                                                \;\;\;\;\frac{1 - x}{B}\\
                                                                                                                
                                                                                                                
                                                                                                                \end{array}
                                                                                                                \end{array}
                                                                                                                
                                                                                                                Derivation
                                                                                                                1. Split input into 3 regimes
                                                                                                                2. if F < -1.3999999999999999

                                                                                                                  1. Initial program 48.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.f6427.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 rewrites27.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 \cdot \left(1 + x\right)}{B} \]
                                                                                                                  7. Step-by-step derivation
                                                                                                                    1. Applied rewrites45.8%

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

                                                                                                                    if -1.3999999999999999 < F < 4.2e6

                                                                                                                    1. Initial program 99.4%

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

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

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

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

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

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

                                                                                                                        if 4.2e6 < F

                                                                                                                        1. Initial program 58.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.f6438.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 rewrites38.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 - x}{B} \]
                                                                                                                        7. Step-by-step derivation
                                                                                                                          1. Applied rewrites47.5%

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

                                                                                                                        Alternative 28: 43.6% accurate, 13.6× speedup?

                                                                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6.1 \cdot 10^{-43}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 0.19:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                                                                                        (FPCore (F B x)
                                                                                                                         :precision binary64
                                                                                                                         (if (<= F -6.1e-43)
                                                                                                                           (/ (- -1.0 x) B)
                                                                                                                           (if (<= F 0.19) (/ (- x) B) (/ (- 1.0 x) B))))
                                                                                                                        double code(double F, double B, double x) {
                                                                                                                        	double tmp;
                                                                                                                        	if (F <= -6.1e-43) {
                                                                                                                        		tmp = (-1.0 - x) / B;
                                                                                                                        	} else if (F <= 0.19) {
                                                                                                                        		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 <= (-6.1d-43)) then
                                                                                                                                tmp = ((-1.0d0) - x) / b
                                                                                                                            else if (f <= 0.19d0) 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 <= -6.1e-43) {
                                                                                                                        		tmp = (-1.0 - x) / B;
                                                                                                                        	} else if (F <= 0.19) {
                                                                                                                        		tmp = -x / B;
                                                                                                                        	} else {
                                                                                                                        		tmp = (1.0 - x) / B;
                                                                                                                        	}
                                                                                                                        	return tmp;
                                                                                                                        }
                                                                                                                        
                                                                                                                        def code(F, B, x):
                                                                                                                        	tmp = 0
                                                                                                                        	if F <= -6.1e-43:
                                                                                                                        		tmp = (-1.0 - x) / B
                                                                                                                        	elif F <= 0.19:
                                                                                                                        		tmp = -x / B
                                                                                                                        	else:
                                                                                                                        		tmp = (1.0 - x) / B
                                                                                                                        	return tmp
                                                                                                                        
                                                                                                                        function code(F, B, x)
                                                                                                                        	tmp = 0.0
                                                                                                                        	if (F <= -6.1e-43)
                                                                                                                        		tmp = Float64(Float64(-1.0 - x) / B);
                                                                                                                        	elseif (F <= 0.19)
                                                                                                                        		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 <= -6.1e-43)
                                                                                                                        		tmp = (-1.0 - x) / B;
                                                                                                                        	elseif (F <= 0.19)
                                                                                                                        		tmp = -x / B;
                                                                                                                        	else
                                                                                                                        		tmp = (1.0 - x) / B;
                                                                                                                        	end
                                                                                                                        	tmp_2 = tmp;
                                                                                                                        end
                                                                                                                        
                                                                                                                        code[F_, B_, x_] := If[LessEqual[F, -6.1e-43], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.19], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                                                                                        
                                                                                                                        \begin{array}{l}
                                                                                                                        
                                                                                                                        \\
                                                                                                                        \begin{array}{l}
                                                                                                                        \mathbf{if}\;F \leq -6.1 \cdot 10^{-43}:\\
                                                                                                                        \;\;\;\;\frac{-1 - x}{B}\\
                                                                                                                        
                                                                                                                        \mathbf{elif}\;F \leq 0.19:\\
                                                                                                                        \;\;\;\;\frac{-x}{B}\\
                                                                                                                        
                                                                                                                        \mathbf{else}:\\
                                                                                                                        \;\;\;\;\frac{1 - x}{B}\\
                                                                                                                        
                                                                                                                        
                                                                                                                        \end{array}
                                                                                                                        \end{array}
                                                                                                                        
                                                                                                                        Derivation
                                                                                                                        1. Split input into 3 regimes
                                                                                                                        2. if F < -6.10000000000000037e-43

                                                                                                                          1. Initial program 52.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.f6431.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 rewrites31.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.4%

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

                                                                                                                            if -6.10000000000000037e-43 < F < 0.19

                                                                                                                            1. Initial program 99.3%

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

                                                                                                                                \[\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 rewrites43.4%

                                                                                                                              \[\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 rewrites28.4%

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

                                                                                                                              if 0.19 < F

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

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

                                                                                                                                \[\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 rewrites46.9%

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

                                                                                                                              Alternative 29: 30.3% accurate, 14.1× speedup?

                                                                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;x \leq -4 \cdot 10^{-141}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-30}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                                                                                                              (FPCore (F B x)
                                                                                                                               :precision binary64
                                                                                                                               (let* ((t_0 (/ (- x) B)))
                                                                                                                                 (if (<= x -4e-141) t_0 (if (<= x 1.4e-30) (/ -1.0 B) t_0))))
                                                                                                                              double code(double F, double B, double x) {
                                                                                                                              	double t_0 = -x / B;
                                                                                                                              	double tmp;
                                                                                                                              	if (x <= -4e-141) {
                                                                                                                              		tmp = t_0;
                                                                                                                              	} else if (x <= 1.4e-30) {
                                                                                                                              		tmp = -1.0 / B;
                                                                                                                              	} else {
                                                                                                                              		tmp = t_0;
                                                                                                                              	}
                                                                                                                              	return tmp;
                                                                                                                              }
                                                                                                                              
                                                                                                                              real(8) function code(f, b, x)
                                                                                                                                  real(8), intent (in) :: f
                                                                                                                                  real(8), intent (in) :: b
                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                  real(8) :: t_0
                                                                                                                                  real(8) :: tmp
                                                                                                                                  t_0 = -x / b
                                                                                                                                  if (x <= (-4d-141)) then
                                                                                                                                      tmp = t_0
                                                                                                                                  else if (x <= 1.4d-30) then
                                                                                                                                      tmp = (-1.0d0) / b
                                                                                                                                  else
                                                                                                                                      tmp = t_0
                                                                                                                                  end if
                                                                                                                                  code = tmp
                                                                                                                              end function
                                                                                                                              
                                                                                                                              public static double code(double F, double B, double x) {
                                                                                                                              	double t_0 = -x / B;
                                                                                                                              	double tmp;
                                                                                                                              	if (x <= -4e-141) {
                                                                                                                              		tmp = t_0;
                                                                                                                              	} else if (x <= 1.4e-30) {
                                                                                                                              		tmp = -1.0 / B;
                                                                                                                              	} else {
                                                                                                                              		tmp = t_0;
                                                                                                                              	}
                                                                                                                              	return tmp;
                                                                                                                              }
                                                                                                                              
                                                                                                                              def code(F, B, x):
                                                                                                                              	t_0 = -x / B
                                                                                                                              	tmp = 0
                                                                                                                              	if x <= -4e-141:
                                                                                                                              		tmp = t_0
                                                                                                                              	elif x <= 1.4e-30:
                                                                                                                              		tmp = -1.0 / B
                                                                                                                              	else:
                                                                                                                              		tmp = t_0
                                                                                                                              	return tmp
                                                                                                                              
                                                                                                                              function code(F, B, x)
                                                                                                                              	t_0 = Float64(Float64(-x) / B)
                                                                                                                              	tmp = 0.0
                                                                                                                              	if (x <= -4e-141)
                                                                                                                              		tmp = t_0;
                                                                                                                              	elseif (x <= 1.4e-30)
                                                                                                                              		tmp = Float64(-1.0 / B);
                                                                                                                              	else
                                                                                                                              		tmp = t_0;
                                                                                                                              	end
                                                                                                                              	return tmp
                                                                                                                              end
                                                                                                                              
                                                                                                                              function tmp_2 = code(F, B, x)
                                                                                                                              	t_0 = -x / B;
                                                                                                                              	tmp = 0.0;
                                                                                                                              	if (x <= -4e-141)
                                                                                                                              		tmp = t_0;
                                                                                                                              	elseif (x <= 1.4e-30)
                                                                                                                              		tmp = -1.0 / B;
                                                                                                                              	else
                                                                                                                              		tmp = t_0;
                                                                                                                              	end
                                                                                                                              	tmp_2 = tmp;
                                                                                                                              end
                                                                                                                              
                                                                                                                              code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[x, -4e-141], t$95$0, If[LessEqual[x, 1.4e-30], N[(-1.0 / B), $MachinePrecision], t$95$0]]]
                                                                                                                              
                                                                                                                              \begin{array}{l}
                                                                                                                              
                                                                                                                              \\
                                                                                                                              \begin{array}{l}
                                                                                                                              t_0 := \frac{-x}{B}\\
                                                                                                                              \mathbf{if}\;x \leq -4 \cdot 10^{-141}:\\
                                                                                                                              \;\;\;\;t\_0\\
                                                                                                                              
                                                                                                                              \mathbf{elif}\;x \leq 1.4 \cdot 10^{-30}:\\
                                                                                                                              \;\;\;\;\frac{-1}{B}\\
                                                                                                                              
                                                                                                                              \mathbf{else}:\\
                                                                                                                              \;\;\;\;t\_0\\
                                                                                                                              
                                                                                                                              
                                                                                                                              \end{array}
                                                                                                                              \end{array}
                                                                                                                              
                                                                                                                              Derivation
                                                                                                                              1. Split input into 2 regimes
                                                                                                                              2. if x < -4.0000000000000002e-141 or 1.39999999999999994e-30 < x

                                                                                                                                1. Initial program 82.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.f6446.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 rewrites46.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 rewrites39.1%

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

                                                                                                                                  if -4.0000000000000002e-141 < x < 1.39999999999999994e-30

                                                                                                                                  1. Initial program 61.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.f6427.4

                                                                                                                                      \[\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 rewrites27.4%

                                                                                                                                    \[\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 rewrites20.6%

                                                                                                                                      \[\leadsto \frac{-1 - x}{B} \]
                                                                                                                                    2. Taylor expanded in x around 0

                                                                                                                                      \[\leadsto \frac{-1}{B} \]
                                                                                                                                    3. Step-by-step derivation
                                                                                                                                      1. Applied rewrites20.6%

                                                                                                                                        \[\leadsto \frac{-1}{B} \]
                                                                                                                                    4. Recombined 2 regimes into one program.
                                                                                                                                    5. Add Preprocessing

                                                                                                                                    Alternative 30: 36.6% accurate, 17.5× speedup?

                                                                                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6.1 \cdot 10^{-43}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \end{array} \]
                                                                                                                                    (FPCore (F B x)
                                                                                                                                     :precision binary64
                                                                                                                                     (if (<= F -6.1e-43) (/ (- -1.0 x) B) (/ (- x) B)))
                                                                                                                                    double code(double F, double B, double x) {
                                                                                                                                    	double tmp;
                                                                                                                                    	if (F <= -6.1e-43) {
                                                                                                                                    		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 <= (-6.1d-43)) 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 <= -6.1e-43) {
                                                                                                                                    		tmp = (-1.0 - x) / B;
                                                                                                                                    	} else {
                                                                                                                                    		tmp = -x / B;
                                                                                                                                    	}
                                                                                                                                    	return tmp;
                                                                                                                                    }
                                                                                                                                    
                                                                                                                                    def code(F, B, x):
                                                                                                                                    	tmp = 0
                                                                                                                                    	if F <= -6.1e-43:
                                                                                                                                    		tmp = (-1.0 - x) / B
                                                                                                                                    	else:
                                                                                                                                    		tmp = -x / B
                                                                                                                                    	return tmp
                                                                                                                                    
                                                                                                                                    function code(F, B, x)
                                                                                                                                    	tmp = 0.0
                                                                                                                                    	if (F <= -6.1e-43)
                                                                                                                                    		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 <= -6.1e-43)
                                                                                                                                    		tmp = (-1.0 - x) / B;
                                                                                                                                    	else
                                                                                                                                    		tmp = -x / B;
                                                                                                                                    	end
                                                                                                                                    	tmp_2 = tmp;
                                                                                                                                    end
                                                                                                                                    
                                                                                                                                    code[F_, B_, x_] := If[LessEqual[F, -6.1e-43], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
                                                                                                                                    
                                                                                                                                    \begin{array}{l}
                                                                                                                                    
                                                                                                                                    \\
                                                                                                                                    \begin{array}{l}
                                                                                                                                    \mathbf{if}\;F \leq -6.1 \cdot 10^{-43}:\\
                                                                                                                                    \;\;\;\;\frac{-1 - x}{B}\\
                                                                                                                                    
                                                                                                                                    \mathbf{else}:\\
                                                                                                                                    \;\;\;\;\frac{-x}{B}\\
                                                                                                                                    
                                                                                                                                    
                                                                                                                                    \end{array}
                                                                                                                                    \end{array}
                                                                                                                                    
                                                                                                                                    Derivation
                                                                                                                                    1. Split input into 2 regimes
                                                                                                                                    2. if F < -6.10000000000000037e-43

                                                                                                                                      1. Initial program 52.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.f6431.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 rewrites31.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.4%

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

                                                                                                                                        if -6.10000000000000037e-43 < F

                                                                                                                                        1. Initial program 83.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.f6441.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 rewrites41.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 rewrites25.6%

                                                                                                                                            \[\leadsto \frac{-x}{B} \]
                                                                                                                                        8. Recombined 2 regimes into one program.
                                                                                                                                        9. Add Preprocessing

                                                                                                                                        Alternative 31: 10.6% accurate, 30.7× speedup?

                                                                                                                                        \[\begin{array}{l} \\ \frac{-1}{B} \end{array} \]
                                                                                                                                        (FPCore (F B x) :precision binary64 (/ -1.0 B))
                                                                                                                                        double code(double F, double B, double x) {
                                                                                                                                        	return -1.0 / B;
                                                                                                                                        }
                                                                                                                                        
                                                                                                                                        real(8) function code(f, b, x)
                                                                                                                                            real(8), intent (in) :: f
                                                                                                                                            real(8), intent (in) :: b
                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                            code = (-1.0d0) / b
                                                                                                                                        end function
                                                                                                                                        
                                                                                                                                        public static double code(double F, double B, double x) {
                                                                                                                                        	return -1.0 / B;
                                                                                                                                        }
                                                                                                                                        
                                                                                                                                        def code(F, B, x):
                                                                                                                                        	return -1.0 / B
                                                                                                                                        
                                                                                                                                        function code(F, B, x)
                                                                                                                                        	return Float64(-1.0 / B)
                                                                                                                                        end
                                                                                                                                        
                                                                                                                                        function tmp = code(F, B, x)
                                                                                                                                        	tmp = -1.0 / B;
                                                                                                                                        end
                                                                                                                                        
                                                                                                                                        code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
                                                                                                                                        
                                                                                                                                        \begin{array}{l}
                                                                                                                                        
                                                                                                                                        \\
                                                                                                                                        \frac{-1}{B}
                                                                                                                                        \end{array}
                                                                                                                                        
                                                                                                                                        Derivation
                                                                                                                                        1. Initial program 73.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.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 rewrites37.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 \cdot \left(1 + x\right)}{B} \]
                                                                                                                                        7. Step-by-step derivation
                                                                                                                                          1. Applied rewrites28.2%

                                                                                                                                            \[\leadsto \frac{-1 - x}{B} \]
                                                                                                                                          2. Taylor expanded in x around 0

                                                                                                                                            \[\leadsto \frac{-1}{B} \]
                                                                                                                                          3. Step-by-step derivation
                                                                                                                                            1. Applied rewrites12.1%

                                                                                                                                              \[\leadsto \frac{-1}{B} \]
                                                                                                                                            2. Add Preprocessing

                                                                                                                                            Reproduce

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