VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.1% → 99.7%
Time: 17.8s
Alternatives: 28
Speedup: 1.6×

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 28 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 76.1% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := -\frac{x}{\tan B}\\
\mathbf{if}\;F \leq -400000000:\\
\;\;\;\;-\frac{\mathsf{fma}\left(x, \cos B, 1\right)}{\sin B}\\

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

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


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

    1. Initial program 49.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. Applied rewrites69.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x, \cos B, 1\right)}{\color{blue}{\mathsf{neg}\left(\sin B\right)}} \]
      9. lower-sin.f6499.8

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

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

    if -4e8 < F < 2e7

    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-tan.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e7 < F

    1. Initial program 62.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. Applied rewrites77.7%

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

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

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

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

    Alternative 2: 77.5% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ t_1 := t\_0 + \frac{F}{\sin B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{\left(\frac{-1}{2}\right)}\\ t_2 := \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, x \cdot 2\right)}} \cdot \frac{F}{B}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;t\_1 \leq -400:\\ \;\;\;\;t\_2 - \frac{x}{\tan B}\\ \mathbf{elif}\;t\_1 \leq 10^{-153}:\\ \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\ \mathbf{elif}\;t\_1 \leq 10^{-18}:\\ \;\;\;\;t\_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}\\ \mathbf{elif}\;t\_1 \leq 20:\\ \;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+297}:\\ \;\;\;\;t\_2 + \frac{-1}{\frac{\tan B}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\_0 + \frac{\frac{1}{F} \cdot \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right)}{B}\\ \end{array} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (let* ((t_0 (* x (/ -1.0 (tan B))))
            (t_1
             (+
              t_0
              (* (/ F (sin B)) (pow (+ (* x 2.0) (+ 2.0 (* F F))) (/ -1.0 2.0)))))
            (t_2 (* (sqrt (/ 1.0 (+ 2.0 (fma F F (* x 2.0))))) (/ F B))))
       (if (<= t_1 (- INFINITY))
         (/ (- -1.0 x) B)
         (if (<= t_1 -400.0)
           (- t_2 (/ x (tan B)))
           (if (<= t_1 1e-153)
             (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B)))
             (if (<= t_1 1e-18)
               (+ t_0 (* (/ F B) (sqrt (/ 1.0 (fma 2.0 x 2.0)))))
               (if (<= t_1 20.0)
                 (/ 1.0 (/ (* (sin B) (sqrt (fma F F 2.0))) F))
                 (if (<= t_1 5e+297)
                   (+ t_2 (/ -1.0 (/ (tan B) x)))
                   (+
                    t_0
                    (/
                     (* (/ 1.0 F) (fma 0.16666666666666666 (* F (* B B)) F))
                     B))))))))))
    double code(double F, double B, double x) {
    	double t_0 = x * (-1.0 / tan(B));
    	double t_1 = t_0 + ((F / sin(B)) * pow(((x * 2.0) + (2.0 + (F * F))), (-1.0 / 2.0)));
    	double t_2 = sqrt((1.0 / (2.0 + fma(F, F, (x * 2.0))))) * (F / B);
    	double tmp;
    	if (t_1 <= -((double) INFINITY)) {
    		tmp = (-1.0 - x) / B;
    	} else if (t_1 <= -400.0) {
    		tmp = t_2 - (x / tan(B));
    	} else if (t_1 <= 1e-153) {
    		tmp = F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B));
    	} else if (t_1 <= 1e-18) {
    		tmp = t_0 + ((F / B) * sqrt((1.0 / fma(2.0, x, 2.0))));
    	} else if (t_1 <= 20.0) {
    		tmp = 1.0 / ((sin(B) * sqrt(fma(F, F, 2.0))) / F);
    	} else if (t_1 <= 5e+297) {
    		tmp = t_2 + (-1.0 / (tan(B) / x));
    	} else {
    		tmp = t_0 + (((1.0 / F) * fma(0.16666666666666666, (F * (B * B)), F)) / B);
    	}
    	return tmp;
    }
    
    function code(F, B, x)
    	t_0 = Float64(x * Float64(-1.0 / tan(B)))
    	t_1 = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(x * 2.0) + Float64(2.0 + Float64(F * F))) ^ Float64(-1.0 / 2.0))))
    	t_2 = Float64(sqrt(Float64(1.0 / Float64(2.0 + fma(F, F, Float64(x * 2.0))))) * Float64(F / B))
    	tmp = 0.0
    	if (t_1 <= Float64(-Inf))
    		tmp = Float64(Float64(-1.0 - x) / B);
    	elseif (t_1 <= -400.0)
    		tmp = Float64(t_2 - Float64(x / tan(B)));
    	elseif (t_1 <= 1e-153)
    		tmp = Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B)));
    	elseif (t_1 <= 1e-18)
    		tmp = Float64(t_0 + Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(2.0, x, 2.0)))));
    	elseif (t_1 <= 20.0)
    		tmp = Float64(1.0 / Float64(Float64(sin(B) * sqrt(fma(F, F, 2.0))) / F));
    	elseif (t_1 <= 5e+297)
    		tmp = Float64(t_2 + Float64(-1.0 / Float64(tan(B) / x)));
    	else
    		tmp = Float64(t_0 + Float64(Float64(Float64(1.0 / F) * fma(0.16666666666666666, Float64(F * Float64(B * B)), F)) / B));
    	end
    	return tmp
    end
    
    code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(x * 2.0), $MachinePrecision] + N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(F * F + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[t$95$1, -400.0], N[(t$95$2 - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-153], N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-18], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 20.0], N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+297], N[(t$95$2 + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(N[(1.0 / F), $MachinePrecision] * N[(0.16666666666666666 * N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision] + F), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := x \cdot \frac{-1}{\tan B}\\
    t_1 := t\_0 + \frac{F}{\sin B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{\left(\frac{-1}{2}\right)}\\
    t_2 := \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, x \cdot 2\right)}} \cdot \frac{F}{B}\\
    \mathbf{if}\;t\_1 \leq -\infty:\\
    \;\;\;\;\frac{-1 - x}{B}\\
    
    \mathbf{elif}\;t\_1 \leq -400:\\
    \;\;\;\;t\_2 - \frac{x}{\tan B}\\
    
    \mathbf{elif}\;t\_1 \leq 10^{-153}:\\
    \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\
    
    \mathbf{elif}\;t\_1 \leq 10^{-18}:\\
    \;\;\;\;t\_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}\\
    
    \mathbf{elif}\;t\_1 \leq 20:\\
    \;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\
    
    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+297}:\\
    \;\;\;\;t\_2 + \frac{-1}{\frac{\tan B}{x}}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0 + \frac{\frac{1}{F} \cdot \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right)}{B}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 7 regimes
    2. if (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -inf.0

      1. Initial program 62.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. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
        7. lower--.f6473.4

          \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
      8. Applied rewrites73.4%

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

      if -inf.0 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -400

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
      5. Applied rewrites68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -400 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 1.00000000000000004e-153

      1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.00000000000000004e-153 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 1.0000000000000001e-18

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.0000000000000001e-18 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 20

      1. Initial program 94.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. Applied rewrites95.0%

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{\frac{\sin B \cdot \sqrt{\color{blue}{F \cdot F} + 2}}{F}} \]
        8. lower-fma.f6483.9

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

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

      if 20 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 4.9999999999999998e297

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
      5. Applied rewrites79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.9999999999999998e297 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))))))

      1. Initial program 12.7%

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

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
      5. Applied rewrites71.4%

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

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{\frac{1}{F}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
      7. Step-by-step derivation
        1. lower-/.f6479.5

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

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

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

    Alternative 3: 77.6% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ t_1 := t\_0 + \frac{F}{\sin B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{\left(\frac{-1}{2}\right)}\\ t_2 := \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, x \cdot 2\right)}} \cdot \frac{F}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;t\_1 \leq -400:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{-153}:\\ \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\ \mathbf{elif}\;t\_1 \leq 10^{-18}:\\ \;\;\;\;t\_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}\\ \mathbf{elif}\;t\_1 \leq 20:\\ \;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+297}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_0 + \frac{\frac{1}{F} \cdot \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right)}{B}\\ \end{array} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (let* ((t_0 (* x (/ -1.0 (tan B))))
            (t_1
             (+
              t_0
              (* (/ F (sin B)) (pow (+ (* x 2.0) (+ 2.0 (* F F))) (/ -1.0 2.0)))))
            (t_2
             (-
              (* (sqrt (/ 1.0 (+ 2.0 (fma F F (* x 2.0))))) (/ F B))
              (/ x (tan B)))))
       (if (<= t_1 (- INFINITY))
         (/ (- -1.0 x) B)
         (if (<= t_1 -400.0)
           t_2
           (if (<= t_1 1e-153)
             (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B)))
             (if (<= t_1 1e-18)
               (+ t_0 (* (/ F B) (sqrt (/ 1.0 (fma 2.0 x 2.0)))))
               (if (<= t_1 20.0)
                 (/ 1.0 (/ (* (sin B) (sqrt (fma F F 2.0))) F))
                 (if (<= t_1 5e+297)
                   t_2
                   (+
                    t_0
                    (/
                     (* (/ 1.0 F) (fma 0.16666666666666666 (* F (* B B)) F))
                     B))))))))))
    double code(double F, double B, double x) {
    	double t_0 = x * (-1.0 / tan(B));
    	double t_1 = t_0 + ((F / sin(B)) * pow(((x * 2.0) + (2.0 + (F * F))), (-1.0 / 2.0)));
    	double t_2 = (sqrt((1.0 / (2.0 + fma(F, F, (x * 2.0))))) * (F / B)) - (x / tan(B));
    	double tmp;
    	if (t_1 <= -((double) INFINITY)) {
    		tmp = (-1.0 - x) / B;
    	} else if (t_1 <= -400.0) {
    		tmp = t_2;
    	} else if (t_1 <= 1e-153) {
    		tmp = F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B));
    	} else if (t_1 <= 1e-18) {
    		tmp = t_0 + ((F / B) * sqrt((1.0 / fma(2.0, x, 2.0))));
    	} else if (t_1 <= 20.0) {
    		tmp = 1.0 / ((sin(B) * sqrt(fma(F, F, 2.0))) / F);
    	} else if (t_1 <= 5e+297) {
    		tmp = t_2;
    	} else {
    		tmp = t_0 + (((1.0 / F) * fma(0.16666666666666666, (F * (B * B)), F)) / B);
    	}
    	return tmp;
    }
    
    function code(F, B, x)
    	t_0 = Float64(x * Float64(-1.0 / tan(B)))
    	t_1 = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(x * 2.0) + Float64(2.0 + Float64(F * F))) ^ Float64(-1.0 / 2.0))))
    	t_2 = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + fma(F, F, Float64(x * 2.0))))) * Float64(F / B)) - Float64(x / tan(B)))
    	tmp = 0.0
    	if (t_1 <= Float64(-Inf))
    		tmp = Float64(Float64(-1.0 - x) / B);
    	elseif (t_1 <= -400.0)
    		tmp = t_2;
    	elseif (t_1 <= 1e-153)
    		tmp = Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B)));
    	elseif (t_1 <= 1e-18)
    		tmp = Float64(t_0 + Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(2.0, x, 2.0)))));
    	elseif (t_1 <= 20.0)
    		tmp = Float64(1.0 / Float64(Float64(sin(B) * sqrt(fma(F, F, 2.0))) / F));
    	elseif (t_1 <= 5e+297)
    		tmp = t_2;
    	else
    		tmp = Float64(t_0 + Float64(Float64(Float64(1.0 / F) * fma(0.16666666666666666, Float64(F * Float64(B * B)), F)) / B));
    	end
    	return tmp
    end
    
    code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(x * 2.0), $MachinePrecision] + N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(F * F + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[t$95$1, -400.0], t$95$2, If[LessEqual[t$95$1, 1e-153], N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-18], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 20.0], N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+297], t$95$2, N[(t$95$0 + N[(N[(N[(1.0 / F), $MachinePrecision] * N[(0.16666666666666666 * N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision] + F), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := x \cdot \frac{-1}{\tan B}\\
    t_1 := t\_0 + \frac{F}{\sin B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{\left(\frac{-1}{2}\right)}\\
    t_2 := \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, x \cdot 2\right)}} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
    \mathbf{if}\;t\_1 \leq -\infty:\\
    \;\;\;\;\frac{-1 - x}{B}\\
    
    \mathbf{elif}\;t\_1 \leq -400:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq 10^{-153}:\\
    \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\
    
    \mathbf{elif}\;t\_1 \leq 10^{-18}:\\
    \;\;\;\;t\_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}\\
    
    \mathbf{elif}\;t\_1 \leq 20:\\
    \;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\
    
    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+297}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0 + \frac{\frac{1}{F} \cdot \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right)}{B}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 6 regimes
    2. if (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -inf.0

      1. Initial program 62.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. lower-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
        7. lower--.f6473.4

          \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
      8. Applied rewrites73.4%

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

      if -inf.0 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -400 or 20 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 4.9999999999999998e297

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
      5. Applied rewrites73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -400 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 1.00000000000000004e-153

      1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.00000000000000004e-153 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 1.0000000000000001e-18

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.0000000000000001e-18 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 20

      1. Initial program 94.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. Applied rewrites95.0%

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{\frac{\sin B \cdot \sqrt{\color{blue}{F \cdot F} + 2}}{F}} \]
        8. lower-fma.f6483.9

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

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

      if 4.9999999999999998e297 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))))))

      1. Initial program 12.7%

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

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
      5. Applied rewrites71.4%

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

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{\frac{1}{F}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
      7. Step-by-step derivation
        1. lower-/.f6479.5

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

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

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

    Alternative 4: 99.1% accurate, 1.4× speedup?

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

      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. Applied rewrites70.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.5 < F < 0.0290000000000000015

      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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 0.0290000000000000015 < F

      1. Initial program 64.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. Applied rewrites79.1%

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

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

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

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

      Alternative 5: 92.6% accurate, 1.5× speedup?

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

        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. Applied rewrites70.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -26.5 < F < 1.65999999999999996e-15

        1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.65999999999999996e-15 < F < 2.59999999999999981e-10

        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. Applied rewrites99.1%

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

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

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

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

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

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

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

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

            \[\leadsto \frac{1}{\frac{\sin B \cdot \sqrt{\color{blue}{F \cdot F} + 2}}{F}} \]
          8. lower-fma.f64100.0

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

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

        if 2.59999999999999981e-10 < F

        1. Initial program 65.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. Applied rewrites79.7%

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

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

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

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

        Alternative 6: 92.6% accurate, 1.5× speedup?

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

          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. Applied rewrites70.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -26.5 < F < 1.65999999999999996e-15

          1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.65999999999999996e-15 < F < 2.59999999999999981e-10

          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. Applied rewrites99.1%

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1}{\frac{\sin B \cdot \sqrt{\color{blue}{F \cdot F} + 2}}{F}} \]
            8. lower-fma.f64100.0

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

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

          if 2.59999999999999981e-10 < F

          1. Initial program 65.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. Applied rewrites79.7%

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

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

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

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

              \[\leadsto \frac{\color{blue}{\cos B \cdot \left(-1 \cdot x\right) + \cos B \cdot \frac{1}{\cos B}}}{\sin B} \]
            3. rgt-mult-inverseN/A

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

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

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

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

              \[\leadsto \frac{\mathsf{fma}\left(\cos B, \color{blue}{\mathsf{neg}\left(x\right)}, 1\right)}{\sin B} \]
            8. lower-sin.f6499.3

              \[\leadsto \frac{\mathsf{fma}\left(\cos B, -x, 1\right)}{\color{blue}{\sin B}} \]
          7. Applied rewrites99.3%

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

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

        Alternative 7: 73.0% accurate, 1.6× speedup?

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

          1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

          if -8.8e5 < x < -7.9999999999999999e-197

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -7.9999999999999999e-197 < x < 7.5999999999999997e-81

          1. Initial program 67.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. Applied rewrites67.8%

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1}{\frac{\sin B \cdot \sqrt{\color{blue}{F \cdot F} + 2}}{F}} \]
            8. lower-fma.f6465.5

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

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

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

        Alternative 8: 82.2% accurate, 1.6× speedup?

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

          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. Applied rewrites70.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -26.5 < F < 5e79

          1. Initial program 98.7%

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

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites62.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 5e79 < F

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites44.8%

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

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

            \[\leadsto \color{blue}{\frac{1 + \frac{1}{6} \cdot {B}^{2}}{B}} - \frac{x}{\tan B} \]
          8. Step-by-step derivation
            1. lower-/.f64N/A

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

              \[\leadsto \frac{\color{blue}{\frac{1}{6} \cdot {B}^{2} + 1}}{B} - \frac{x}{\tan B} \]
            3. *-commutativeN/A

              \[\leadsto \frac{\color{blue}{{B}^{2} \cdot \frac{1}{6}} + 1}{B} - \frac{x}{\tan B} \]
            4. lower-fma.f64N/A

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

              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{6}, 1\right)}{B} - \frac{x}{\tan B} \]
            6. lower-*.f6462.7

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

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

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

        Alternative 9: 71.1% accurate, 2.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;x \leq -4.2 \cdot 10^{-13}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-81}:\\ \;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+15}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
           (if (<= x -4.2e-13)
             t_0
             (if (<= x 7e-81)
               (/ 1.0 (/ (* (sin B) (sqrt (fma F F 2.0))) F))
               (if (<= x 1.05e+15)
                 (+ (* x (/ -1.0 (tan B))) (* (/ F B) (sqrt (/ 1.0 (fma 2.0 x 2.0)))))
                 t_0)))))
        double code(double F, double B, double x) {
        	double t_0 = (-1.0 / B) - (x / tan(B));
        	double tmp;
        	if (x <= -4.2e-13) {
        		tmp = t_0;
        	} else if (x <= 7e-81) {
        		tmp = 1.0 / ((sin(B) * sqrt(fma(F, F, 2.0))) / F);
        	} else if (x <= 1.05e+15) {
        		tmp = (x * (-1.0 / tan(B))) + ((F / B) * sqrt((1.0 / fma(2.0, x, 2.0))));
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B)))
        	tmp = 0.0
        	if (x <= -4.2e-13)
        		tmp = t_0;
        	elseif (x <= 7e-81)
        		tmp = Float64(1.0 / Float64(Float64(sin(B) * sqrt(fma(F, F, 2.0))) / F));
        	elseif (x <= 1.05e+15)
        		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(2.0, x, 2.0)))));
        	else
        		tmp = t_0;
        	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[x, -4.2e-13], t$95$0, If[LessEqual[x, 7e-81], N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+15], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
        \mathbf{if}\;x \leq -4.2 \cdot 10^{-13}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;x \leq 7 \cdot 10^{-81}:\\
        \;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\
        
        \mathbf{elif}\;x \leq 1.05 \cdot 10^{+15}:\\
        \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if x < -4.19999999999999977e-13 or 1.05e15 < 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 \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
          11. Step-by-step derivation
            1. lower-/.f6498.9

              \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
          12. Applied rewrites98.9%

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

          if -4.19999999999999977e-13 < x < 6.99999999999999973e-81

          1. Initial program 68.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. Applied rewrites68.5%

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

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

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

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

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

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

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

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

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

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

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

          if 6.99999999999999973e-81 < x < 1.05e15

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 10: 70.6% accurate, 2.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{-1}{B} - t\_0\\ \mathbf{if}\;x \leq -4.2 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{-55}:\\ \;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+15}:\\ \;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{0.5}{x}} - t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 B) t_0)))
           (if (<= x -4.2e-13)
             t_1
             (if (<= x 1.45e-55)
               (/ 1.0 (/ (* (sin B) (sqrt (fma F F 2.0))) F))
               (if (<= x 1.05e+15) (- (* (/ F B) (sqrt (/ 0.5 x))) t_0) t_1)))))
        double code(double F, double B, double x) {
        	double t_0 = x / tan(B);
        	double t_1 = (-1.0 / B) - t_0;
        	double tmp;
        	if (x <= -4.2e-13) {
        		tmp = t_1;
        	} else if (x <= 1.45e-55) {
        		tmp = 1.0 / ((sin(B) * sqrt(fma(F, F, 2.0))) / F);
        	} else if (x <= 1.05e+15) {
        		tmp = ((F / B) * sqrt((0.5 / x))) - t_0;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	t_0 = Float64(x / tan(B))
        	t_1 = Float64(Float64(-1.0 / B) - t_0)
        	tmp = 0.0
        	if (x <= -4.2e-13)
        		tmp = t_1;
        	elseif (x <= 1.45e-55)
        		tmp = Float64(1.0 / Float64(Float64(sin(B) * sqrt(fma(F, F, 2.0))) / F));
        	elseif (x <= 1.05e+15)
        		tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(0.5 / x))) - t_0);
        	else
        		tmp = t_1;
        	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[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[x, -4.2e-13], t$95$1, If[LessEqual[x, 1.45e-55], N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+15], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(0.5 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], t$95$1]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{x}{\tan B}\\
        t_1 := \frac{-1}{B} - t\_0\\
        \mathbf{if}\;x \leq -4.2 \cdot 10^{-13}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;x \leq 1.45 \cdot 10^{-55}:\\
        \;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\
        
        \mathbf{elif}\;x \leq 1.05 \cdot 10^{+15}:\\
        \;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{0.5}{x}} - t\_0\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if x < -4.19999999999999977e-13 or 1.05e15 < 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 \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
          11. Step-by-step derivation
            1. lower-/.f6498.9

              \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
          12. Applied rewrites98.9%

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

          if -4.19999999999999977e-13 < x < 1.45e-55

          1. Initial program 67.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. Applied rewrites68.0%

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1}{\frac{\sin B \cdot \sqrt{\color{blue}{F \cdot F} + 2}}{F}} \]
            8. lower-fma.f6457.3

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

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

          if 1.45e-55 < x < 1.05e15

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites82.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \sqrt{\color{blue}{\frac{\frac{1}{2}}{x}}} \cdot \frac{F}{B} - \frac{x}{\tan B} \]
          11. Step-by-step derivation
            1. lower-/.f6483.1

              \[\leadsto \sqrt{\color{blue}{\frac{0.5}{x}}} \cdot \frac{F}{B} - \frac{x}{\tan B} \]
          12. Applied rewrites83.1%

            \[\leadsto \sqrt{\color{blue}{\frac{0.5}{x}}} \cdot \frac{F}{B} - \frac{x}{\tan B} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification75.1%

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

        Alternative 11: 71.0% accurate, 2.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;x \leq -4.2 \cdot 10^{-13}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 7.6 \cdot 10^{-81}:\\ \;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+15}:\\ \;\;\;\;\frac{\frac{x}{F}}{\tan B \cdot \frac{-1}{F}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
           (if (<= x -4.2e-13)
             t_0
             (if (<= x 7.6e-81)
               (/ 1.0 (/ (* (sin B) (sqrt (fma F F 2.0))) F))
               (if (<= x 1.05e+15) (/ (/ x F) (* (tan B) (/ -1.0 F))) t_0)))))
        double code(double F, double B, double x) {
        	double t_0 = (-1.0 / B) - (x / tan(B));
        	double tmp;
        	if (x <= -4.2e-13) {
        		tmp = t_0;
        	} else if (x <= 7.6e-81) {
        		tmp = 1.0 / ((sin(B) * sqrt(fma(F, F, 2.0))) / F);
        	} else if (x <= 1.05e+15) {
        		tmp = (x / F) / (tan(B) * (-1.0 / F));
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B)))
        	tmp = 0.0
        	if (x <= -4.2e-13)
        		tmp = t_0;
        	elseif (x <= 7.6e-81)
        		tmp = Float64(1.0 / Float64(Float64(sin(B) * sqrt(fma(F, F, 2.0))) / F));
        	elseif (x <= 1.05e+15)
        		tmp = Float64(Float64(x / F) / Float64(tan(B) * Float64(-1.0 / F)));
        	else
        		tmp = t_0;
        	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[x, -4.2e-13], t$95$0, If[LessEqual[x, 7.6e-81], N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+15], N[(N[(x / F), $MachinePrecision] / N[(N[Tan[B], $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
        \mathbf{if}\;x \leq -4.2 \cdot 10^{-13}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;x \leq 7.6 \cdot 10^{-81}:\\
        \;\;\;\;\frac{1}{\frac{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}}\\
        
        \mathbf{elif}\;x \leq 1.05 \cdot 10^{+15}:\\
        \;\;\;\;\frac{\frac{x}{F}}{\tan B \cdot \frac{-1}{F}}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if x < -4.19999999999999977e-13 or 1.05e15 < 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 \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
          11. Step-by-step derivation
            1. lower-/.f6498.9

              \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
          12. Applied rewrites98.9%

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

          if -4.19999999999999977e-13 < x < 7.5999999999999997e-81

          1. Initial program 68.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. Applied rewrites68.5%

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

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

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

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

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

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

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

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

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

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

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

          if 7.5999999999999997e-81 < x < 1.05e15

          1. Initial program 79.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. Applied rewrites83.8%

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

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

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

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

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

              \[\leadsto \frac{\frac{x}{\color{blue}{-1 \cdot F}}}{\frac{1}{F} \cdot \tan B} \]
            4. lower-/.f64N/A

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

              \[\leadsto \frac{\frac{x}{\color{blue}{\mathsf{neg}\left(F\right)}}}{\frac{1}{F} \cdot \tan B} \]
            6. lower-neg.f6468.2

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

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

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

        Alternative 12: 70.9% accurate, 2.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;x \leq -4.2 \cdot 10^{-13}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 7.6 \cdot 10^{-81}:\\ \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+15}:\\ \;\;\;\;\frac{\frac{x}{F}}{\tan B \cdot \frac{-1}{F}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
           (if (<= x -4.2e-13)
             t_0
             (if (<= x 7.6e-81)
               (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B)))
               (if (<= x 1.05e+15) (/ (/ x F) (* (tan B) (/ -1.0 F))) t_0)))))
        double code(double F, double B, double x) {
        	double t_0 = (-1.0 / B) - (x / tan(B));
        	double tmp;
        	if (x <= -4.2e-13) {
        		tmp = t_0;
        	} else if (x <= 7.6e-81) {
        		tmp = F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B));
        	} else if (x <= 1.05e+15) {
        		tmp = (x / F) / (tan(B) * (-1.0 / F));
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B)))
        	tmp = 0.0
        	if (x <= -4.2e-13)
        		tmp = t_0;
        	elseif (x <= 7.6e-81)
        		tmp = Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B)));
        	elseif (x <= 1.05e+15)
        		tmp = Float64(Float64(x / F) / Float64(tan(B) * Float64(-1.0 / F)));
        	else
        		tmp = t_0;
        	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[x, -4.2e-13], t$95$0, If[LessEqual[x, 7.6e-81], N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+15], N[(N[(x / F), $MachinePrecision] / N[(N[Tan[B], $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
        \mathbf{if}\;x \leq -4.2 \cdot 10^{-13}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;x \leq 7.6 \cdot 10^{-81}:\\
        \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\
        
        \mathbf{elif}\;x \leq 1.05 \cdot 10^{+15}:\\
        \;\;\;\;\frac{\frac{x}{F}}{\tan B \cdot \frac{-1}{F}}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if x < -4.19999999999999977e-13 or 1.05e15 < 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 \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
          11. Step-by-step derivation
            1. lower-/.f6498.9

              \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
          12. Applied rewrites98.9%

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

          if -4.19999999999999977e-13 < x < 7.5999999999999997e-81

          1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 7.5999999999999997e-81 < x < 1.05e15

          1. Initial program 79.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. Applied rewrites83.8%

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

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

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

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

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

              \[\leadsto \frac{\frac{x}{\color{blue}{-1 \cdot F}}}{\frac{1}{F} \cdot \tan B} \]
            4. lower-/.f64N/A

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

              \[\leadsto \frac{\frac{x}{\color{blue}{\mathsf{neg}\left(F\right)}}}{\frac{1}{F} \cdot \tan B} \]
            6. lower-neg.f6468.2

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

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

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

        Alternative 13: 57.3% accurate, 2.5× speedup?

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

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites67.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 0.13 < B

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites20.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{1}{F}} \cdot \frac{F}{B} - \frac{x}{\tan B} \]
          11. Step-by-step derivation
            1. lower-/.f6450.3

              \[\leadsto \color{blue}{\frac{1}{F}} \cdot \frac{F}{B} - \frac{x}{\tan B} \]
          12. Applied rewrites50.3%

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

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

        Alternative 14: 56.2% accurate, 2.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 4 \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{\frac{x}{F}}{\tan B \cdot \frac{-1}{F}}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (if (<= B 4e-6)
           (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
           (/ (/ x F) (* (tan B) (/ -1.0 F)))))
        double code(double F, double B, double x) {
        	double tmp;
        	if (B <= 4e-6) {
        		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
        	} else {
        		tmp = (x / F) / (tan(B) * (-1.0 / F));
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	tmp = 0.0
        	if (B <= 4e-6)
        		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B);
        	else
        		tmp = Float64(Float64(x / F) / Float64(tan(B) * Float64(-1.0 / F)));
        	end
        	return tmp
        end
        
        code[F_, B_, x_] := If[LessEqual[B, 4e-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[(x / F), $MachinePrecision] / N[(N[Tan[B], $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;B \leq 4 \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{\frac{x}{F}}{\tan B \cdot \frac{-1}{F}}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if B < 3.99999999999999982e-6

          1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 3.99999999999999982e-6 < B

          1. Initial program 79.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. Applied rewrites79.1%

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

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

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

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

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

              \[\leadsto \frac{\frac{x}{\color{blue}{-1 \cdot F}}}{\frac{1}{F} \cdot \tan B} \]
            4. lower-/.f64N/A

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

              \[\leadsto \frac{\frac{x}{\color{blue}{\mathsf{neg}\left(F\right)}}}{\frac{1}{F} \cdot \tan B} \]
            6. lower-neg.f6448.5

              \[\leadsto \frac{\frac{x}{\color{blue}{-F}}}{\frac{1}{F} \cdot \tan B} \]
          7. Applied rewrites48.5%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 4 \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{\frac{x}{F}}{\tan B \cdot \frac{-1}{F}}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 15: 55.9% accurate, 2.8× speedup?

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

          1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.18e-45 < B

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites28.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
          11. Step-by-step derivation
            1. lower-/.f6448.7

              \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]
          12. Applied rewrites48.7%

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

        Alternative 16: 49.4% accurate, 2.9× speedup?

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

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites67.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 0.13500000000000001 < B

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
            6. lower-/.f64N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites20.0%

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(0.16666666666666666, \left(B \cdot B\right) \cdot F, F\right)}{B}} \]
          6. Applied rewrites19.9%

            \[\leadsto \color{blue}{\frac{1 \cdot \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right)}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B} - \frac{x}{\tan B}} \]
          7. Taylor expanded in F around inf

            \[\leadsto \frac{1 \cdot \mathsf{fma}\left(\frac{1}{6}, F \cdot \left(B \cdot B\right), F\right)}{\color{blue}{B \cdot F}} - \frac{x}{\tan B} \]
          8. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{1 \cdot \mathsf{fma}\left(\frac{1}{6}, F \cdot \left(B \cdot B\right), F\right)}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
            2. lower-*.f6411.1

              \[\leadsto \frac{1 \cdot \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right)}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
          9. Applied rewrites11.1%

            \[\leadsto \frac{1 \cdot \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right)}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
          10. Taylor expanded in B around inf

            \[\leadsto \color{blue}{\frac{1}{6} \cdot B} - \frac{x}{\tan B} \]
          11. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{B \cdot \frac{1}{6}} - \frac{x}{\tan B} \]
            2. lower-*.f6418.0

              \[\leadsto \color{blue}{B \cdot 0.16666666666666666} - \frac{x}{\tan B} \]
          12. Applied rewrites18.0%

            \[\leadsto \color{blue}{B \cdot 0.16666666666666666} - \frac{x}{\tan B} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 17: 52.4% accurate, 3.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\ \mathbf{if}\;F \leq -110:\\ \;\;\;\;\frac{\mathsf{fma}\left(0.5, t\_0, -1 - x\right)}{B}\\ \mathbf{elif}\;F \leq 3000000:\\ \;\;\;\;\frac{\mathsf{fma}\left(F, \mathsf{fma}\left(-0.5 \cdot \left(F \cdot F\right), \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right) \cdot \left(\mathsf{fma}\left(2, x, 2\right) \cdot \mathsf{fma}\left(2, x, 2\right)\right)}}, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}\right), -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.5, t\_0, 1\right) - x}{B}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (let* ((t_0 (/ (fma 2.0 x 2.0) (* F F))))
           (if (<= F -110.0)
             (/ (fma 0.5 t_0 (- -1.0 x)) B)
             (if (<= F 3000000.0)
               (/
                (fma
                 F
                 (fma
                  (* -0.5 (* F F))
                  (sqrt
                   (/ 1.0 (* (fma 2.0 x 2.0) (* (fma 2.0 x 2.0) (fma 2.0 x 2.0)))))
                  (sqrt (/ 1.0 (fma 2.0 x 2.0))))
                 (- x))
                B)
               (/ (- (fma -0.5 t_0 1.0) x) B)))))
        double code(double F, double B, double x) {
        	double t_0 = fma(2.0, x, 2.0) / (F * F);
        	double tmp;
        	if (F <= -110.0) {
        		tmp = fma(0.5, t_0, (-1.0 - x)) / B;
        	} else if (F <= 3000000.0) {
        		tmp = fma(F, fma((-0.5 * (F * F)), sqrt((1.0 / (fma(2.0, x, 2.0) * (fma(2.0, x, 2.0) * fma(2.0, x, 2.0))))), sqrt((1.0 / fma(2.0, x, 2.0)))), -x) / B;
        	} else {
        		tmp = (fma(-0.5, t_0, 1.0) - x) / B;
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	t_0 = Float64(fma(2.0, x, 2.0) / Float64(F * F))
        	tmp = 0.0
        	if (F <= -110.0)
        		tmp = Float64(fma(0.5, t_0, Float64(-1.0 - x)) / B);
        	elseif (F <= 3000000.0)
        		tmp = Float64(fma(F, fma(Float64(-0.5 * Float64(F * F)), sqrt(Float64(1.0 / Float64(fma(2.0, x, 2.0) * Float64(fma(2.0, x, 2.0) * fma(2.0, x, 2.0))))), sqrt(Float64(1.0 / fma(2.0, x, 2.0)))), Float64(-x)) / B);
        	else
        		tmp = Float64(Float64(fma(-0.5, t_0, 1.0) - x) / B);
        	end
        	return tmp
        end
        
        code[F_, B_, x_] := Block[{t$95$0 = N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -110.0], N[(N[(0.5 * t$95$0 + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3000000.0], N[(N[(F * N[(N[(-0.5 * N[(F * F), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(N[(2.0 * x + 2.0), $MachinePrecision] * N[(N[(2.0 * x + 2.0), $MachinePrecision] * N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[Sqrt[N[(1.0 / N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(-0.5 * t$95$0 + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\
        \mathbf{if}\;F \leq -110:\\
        \;\;\;\;\frac{\mathsf{fma}\left(0.5, t\_0, -1 - x\right)}{B}\\
        
        \mathbf{elif}\;F \leq 3000000:\\
        \;\;\;\;\frac{\mathsf{fma}\left(F, \mathsf{fma}\left(-0.5 \cdot \left(F \cdot F\right), \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right) \cdot \left(\mathsf{fma}\left(2, x, 2\right) \cdot \mathsf{fma}\left(2, x, 2\right)\right)}}, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}\right), -x\right)}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(-0.5, t\_0, 1\right) - x}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if F < -110

          1. Initial program 49.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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6446.5

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites46.5%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around -inf

            \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}}{B} \]
          7. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
            2. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{2}, \frac{2 + 2 \cdot x}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
            3. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{{F}^{2}}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            4. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            5. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            6. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            7. lower-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            8. distribute-neg-inN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}\right)}{B} \]
            9. metadata-evalN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)\right)}{B} \]
            10. unsub-negN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1 - x}\right)}{B} \]
            11. lower--.f6455.6

              \[\leadsto \frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1 - x}\right)}{B} \]
          8. Applied rewrites55.6%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1 - x\right)}}{B} \]

          if -110 < F < 3e6

          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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6447.3

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites47.3%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around 0

            \[\leadsto \frac{\color{blue}{F \cdot \left(\sqrt{\frac{1}{2 + 2 \cdot x}} + \frac{-1}{2} \cdot \left({F}^{2} \cdot \sqrt{\frac{1}{{\left(2 + 2 \cdot x\right)}^{3}}}\right)\right) - x}}{B} \]
          7. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto \frac{\color{blue}{F \cdot \left(\sqrt{\frac{1}{2 + 2 \cdot x}} + \frac{-1}{2} \cdot \left({F}^{2} \cdot \sqrt{\frac{1}{{\left(2 + 2 \cdot x\right)}^{3}}}\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
            2. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + 2 \cdot x}} + \frac{-1}{2} \cdot \left({F}^{2} \cdot \sqrt{\frac{1}{{\left(2 + 2 \cdot x\right)}^{3}}}\right), \mathsf{neg}\left(x\right)\right)}}{B} \]
          8. Applied rewrites47.3%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \mathsf{fma}\left(-0.5 \cdot \left(F \cdot F\right), \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right) \cdot \left(\mathsf{fma}\left(2, x, 2\right) \cdot \mathsf{fma}\left(2, x, 2\right)\right)}}, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}\right), -x\right)}}{B} \]

          if 3e6 < F

          1. Initial program 63.3%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          4. Step-by-step derivation
            1. 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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6447.5

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites47.5%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around inf

            \[\leadsto \frac{\color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}}{B} \]
          7. Step-by-step derivation
            1. lower--.f64N/A

              \[\leadsto \frac{\color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}}{B} \]
            2. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{\left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + 1\right)} - x}{B} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \frac{2 + 2 \cdot x}{{F}^{2}}, 1\right)} - x}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{{F}^{2}}}, 1\right) - x}{B} \]
            5. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, 1\right) - x}{B} \]
            6. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{{F}^{2}}, 1\right) - x}{B} \]
            7. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, 1\right) - x}{B} \]
            8. lower-*.f6455.5

              \[\leadsto \frac{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, 1\right) - x}{B} \]
          8. Applied rewrites55.5%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, 1\right) - x}}{B} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 18: 52.5% accurate, 4.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\ \mathbf{if}\;F \leq -106:\\ \;\;\;\;\frac{\mathsf{fma}\left(0.5, t\_0, -1 - x\right)}{B}\\ \mathbf{elif}\;F \leq 58000000000000:\\ \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0.3333333333333333 \cdot \left(x \cdot \left(B \cdot B\right)\right) - x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.5, t\_0, 1\right) - x}{B}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (let* ((t_0 (/ (fma 2.0 x 2.0) (* F F))))
           (if (<= F -106.0)
             (/ (fma 0.5 t_0 (- -1.0 x)) B)
             (if (<= F 58000000000000.0)
               (/
                (fma
                 F
                 (sqrt (/ 1.0 (fma 2.0 x (fma F F 2.0))))
                 (- (* 0.3333333333333333 (* x (* B B))) x))
                B)
               (/ (- (fma -0.5 t_0 1.0) x) B)))))
        double code(double F, double B, double x) {
        	double t_0 = fma(2.0, x, 2.0) / (F * F);
        	double tmp;
        	if (F <= -106.0) {
        		tmp = fma(0.5, t_0, (-1.0 - x)) / B;
        	} else if (F <= 58000000000000.0) {
        		tmp = fma(F, sqrt((1.0 / fma(2.0, x, fma(F, F, 2.0)))), ((0.3333333333333333 * (x * (B * B))) - x)) / B;
        	} else {
        		tmp = (fma(-0.5, t_0, 1.0) - x) / B;
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	t_0 = Float64(fma(2.0, x, 2.0) / Float64(F * F))
        	tmp = 0.0
        	if (F <= -106.0)
        		tmp = Float64(fma(0.5, t_0, Float64(-1.0 - x)) / B);
        	elseif (F <= 58000000000000.0)
        		tmp = Float64(fma(F, sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))), Float64(Float64(0.3333333333333333 * Float64(x * Float64(B * B))) - x)) / B);
        	else
        		tmp = Float64(Float64(fma(-0.5, t_0, 1.0) - x) / B);
        	end
        	return tmp
        end
        
        code[F_, B_, x_] := Block[{t$95$0 = N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -106.0], N[(N[(0.5 * t$95$0 + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 58000000000000.0], N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(N[(0.3333333333333333 * N[(x * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(-0.5 * t$95$0 + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\
        \mathbf{if}\;F \leq -106:\\
        \;\;\;\;\frac{\mathsf{fma}\left(0.5, t\_0, -1 - x\right)}{B}\\
        
        \mathbf{elif}\;F \leq 58000000000000:\\
        \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0.3333333333333333 \cdot \left(x \cdot \left(B \cdot B\right)\right) - x\right)}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(-0.5, t\_0, 1\right) - x}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if F < -106

          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 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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6445.9

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites45.9%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around -inf

            \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}}{B} \]
          7. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
            2. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{2}, \frac{2 + 2 \cdot x}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
            3. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{{F}^{2}}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            4. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            5. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            6. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            7. lower-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            8. distribute-neg-inN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}\right)}{B} \]
            9. metadata-evalN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)\right)}{B} \]
            10. unsub-negN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1 - x}\right)}{B} \]
            11. lower--.f6454.9

              \[\leadsto \frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1 - x}\right)}{B} \]
          8. Applied rewrites54.9%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1 - x\right)}}{B} \]

          if -106 < F < 5.8e13

          1. Initial program 99.5%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in B around 0

            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
            2. *-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
            3. associate-*l*N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
            4. associate-*r*N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
            5. *-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
            6. lower-/.f64N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites62.4%

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(0.16666666666666666, \left(B \cdot B\right) \cdot F, F\right)}{B}} \]
          6. Applied rewrites62.5%

            \[\leadsto \color{blue}{\frac{1 \cdot \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right)}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B} - \frac{x}{\tan B}} \]
          7. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} - \frac{x}{\tan B} \]
          8. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} - \frac{x}{\tan B} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} - \frac{x}{\tan B} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} - \frac{x}{\tan B} \]
            4. lower-/.f64N/A

              \[\leadsto \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} - \frac{x}{\tan B} \]
            5. lower-+.f64N/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} - \frac{x}{\tan B} \]
            6. +-commutativeN/A

              \[\leadsto \sqrt{\frac{1}{2 + \color{blue}{\left({F}^{2} + 2 \cdot x\right)}}} \cdot \frac{F}{B} - \frac{x}{\tan B} \]
            7. unpow2N/A

              \[\leadsto \sqrt{\frac{1}{2 + \left(\color{blue}{F \cdot F} + 2 \cdot x\right)}} \cdot \frac{F}{B} - \frac{x}{\tan B} \]
            8. lower-fma.f64N/A

              \[\leadsto \sqrt{\frac{1}{2 + \color{blue}{\mathsf{fma}\left(F, F, 2 \cdot x\right)}}} \cdot \frac{F}{B} - \frac{x}{\tan B} \]
            9. lower-*.f64N/A

              \[\leadsto \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, \color{blue}{2 \cdot x}\right)}} \cdot \frac{F}{B} - \frac{x}{\tan B} \]
            10. lower-/.f6478.9

              \[\leadsto \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, 2 \cdot x\right)}} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{\tan B} \]
          9. Applied rewrites78.9%

            \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, 2 \cdot x\right)}} \cdot \frac{F}{B}} - \frac{x}{\tan B} \]
          10. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{\left(\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) - x}{B}} \]
          11. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\left(\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) - x}{B}} \]
          12. Applied rewrites47.4%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0.3333333333333333 \cdot \left(x \cdot \left(B \cdot B\right)\right) - x\right)}{B}} \]

          if 5.8e13 < F

          1. Initial program 61.7%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          4. Step-by-step derivation
            1. 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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6448.0

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites48.0%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around inf

            \[\leadsto \frac{\color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}}{B} \]
          7. Step-by-step derivation
            1. lower--.f64N/A

              \[\leadsto \frac{\color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}}{B} \]
            2. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{\left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + 1\right)} - x}{B} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \frac{2 + 2 \cdot x}{{F}^{2}}, 1\right)} - x}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{{F}^{2}}}, 1\right) - x}{B} \]
            5. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, 1\right) - x}{B} \]
            6. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{{F}^{2}}, 1\right) - x}{B} \]
            7. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, 1\right) - x}{B} \]
            8. lower-*.f6456.4

              \[\leadsto \frac{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, 1\right) - x}{B} \]
          8. Applied rewrites56.4%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, 1\right) - x}}{B} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 19: 52.5% accurate, 6.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\ \mathbf{if}\;F \leq -106:\\ \;\;\;\;\frac{\mathsf{fma}\left(0.5, t\_0, -1 - x\right)}{B}\\ \mathbf{elif}\;F \leq 0.33:\\ \;\;\;\;\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.5, t\_0, 1\right) - x}{B}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (let* ((t_0 (/ (fma 2.0 x 2.0) (* F F))))
           (if (<= F -106.0)
             (/ (fma 0.5 t_0 (- -1.0 x)) B)
             (if (<= F 0.33)
               (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
               (/ (- (fma -0.5 t_0 1.0) x) B)))))
        double code(double F, double B, double x) {
        	double t_0 = fma(2.0, x, 2.0) / (F * F);
        	double tmp;
        	if (F <= -106.0) {
        		tmp = fma(0.5, t_0, (-1.0 - x)) / B;
        	} else if (F <= 0.33) {
        		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
        	} else {
        		tmp = (fma(-0.5, t_0, 1.0) - x) / B;
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	t_0 = Float64(fma(2.0, x, 2.0) / Float64(F * F))
        	tmp = 0.0
        	if (F <= -106.0)
        		tmp = Float64(fma(0.5, t_0, Float64(-1.0 - x)) / B);
        	elseif (F <= 0.33)
        		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B);
        	else
        		tmp = Float64(Float64(fma(-0.5, t_0, 1.0) - x) / B);
        	end
        	return tmp
        end
        
        code[F_, B_, x_] := Block[{t$95$0 = N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -106.0], N[(N[(0.5 * t$95$0 + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.33], 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[(-0.5 * t$95$0 + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\
        \mathbf{if}\;F \leq -106:\\
        \;\;\;\;\frac{\mathsf{fma}\left(0.5, t\_0, -1 - x\right)}{B}\\
        
        \mathbf{elif}\;F \leq 0.33:\\
        \;\;\;\;\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.5, t\_0, 1\right) - x}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if F < -106

          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 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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6445.9

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites45.9%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around -inf

            \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}}{B} \]
          7. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
            2. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{2}, \frac{2 + 2 \cdot x}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
            3. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{{F}^{2}}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            4. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            5. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            6. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            7. lower-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            8. distribute-neg-inN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}\right)}{B} \]
            9. metadata-evalN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)\right)}{B} \]
            10. unsub-negN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1 - x}\right)}{B} \]
            11. lower--.f6454.9

              \[\leadsto \frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1 - x}\right)}{B} \]
          8. Applied rewrites54.9%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1 - x\right)}}{B} \]

          if -106 < F < 0.330000000000000016

          1. Initial program 99.5%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
            2. sub-negN/A

              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6447.7

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites47.7%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Applied rewrites47.7%

            \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

          if 0.330000000000000016 < F

          1. Initial program 64.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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6447.6

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites47.6%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around inf

            \[\leadsto \frac{\color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}}{B} \]
          7. Step-by-step derivation
            1. lower--.f64N/A

              \[\leadsto \frac{\color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}}{B} \]
            2. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{\left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + 1\right)} - x}{B} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \frac{2 + 2 \cdot x}{{F}^{2}}, 1\right)} - x}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{{F}^{2}}}, 1\right) - x}{B} \]
            5. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, 1\right) - x}{B} \]
            6. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{{F}^{2}}, 1\right) - x}{B} \]
            7. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, 1\right) - x}{B} \]
            8. lower-*.f6455.4

              \[\leadsto \frac{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, 1\right) - x}{B} \]
          8. Applied rewrites55.4%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, 1\right) - x}}{B} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 20: 52.4% accurate, 6.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\ \mathbf{if}\;F \leq -37:\\ \;\;\;\;\frac{\mathsf{fma}\left(0.5, t\_0, -1 - x\right)}{B}\\ \mathbf{elif}\;F \leq 0.33:\\ \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.5, t\_0, 1\right) - x}{B}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (let* ((t_0 (/ (fma 2.0 x 2.0) (* F F))))
           (if (<= F -37.0)
             (/ (fma 0.5 t_0 (- -1.0 x)) B)
             (if (<= F 0.33)
               (/ (fma F (sqrt (/ 1.0 (fma 2.0 x 2.0))) (- x)) B)
               (/ (- (fma -0.5 t_0 1.0) x) B)))))
        double code(double F, double B, double x) {
        	double t_0 = fma(2.0, x, 2.0) / (F * F);
        	double tmp;
        	if (F <= -37.0) {
        		tmp = fma(0.5, t_0, (-1.0 - x)) / B;
        	} else if (F <= 0.33) {
        		tmp = fma(F, sqrt((1.0 / fma(2.0, x, 2.0))), -x) / B;
        	} else {
        		tmp = (fma(-0.5, t_0, 1.0) - x) / B;
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	t_0 = Float64(fma(2.0, x, 2.0) / Float64(F * F))
        	tmp = 0.0
        	if (F <= -37.0)
        		tmp = Float64(fma(0.5, t_0, Float64(-1.0 - x)) / B);
        	elseif (F <= 0.33)
        		tmp = Float64(fma(F, sqrt(Float64(1.0 / fma(2.0, x, 2.0))), Float64(-x)) / B);
        	else
        		tmp = Float64(Float64(fma(-0.5, t_0, 1.0) - x) / B);
        	end
        	return tmp
        end
        
        code[F_, B_, x_] := Block[{t$95$0 = N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -37.0], N[(N[(0.5 * t$95$0 + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.33], N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(-0.5 * t$95$0 + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\
        \mathbf{if}\;F \leq -37:\\
        \;\;\;\;\frac{\mathsf{fma}\left(0.5, t\_0, -1 - x\right)}{B}\\
        
        \mathbf{elif}\;F \leq 0.33:\\
        \;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}, -x\right)}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(-0.5, t\_0, 1\right) - x}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if F < -37

          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 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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6445.9

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites45.9%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around -inf

            \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}}{B} \]
          7. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + \left(\mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
            2. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{2}, \frac{2 + 2 \cdot x}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}}{B} \]
            3. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{{F}^{2}}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            4. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            5. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{{F}^{2}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            6. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            7. lower-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, \mathsf{neg}\left(\left(1 + x\right)\right)\right)}{B} \]
            8. distribute-neg-inN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}\right)}{B} \]
            9. metadata-evalN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)\right)}{B} \]
            10. unsub-negN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1 - x}\right)}{B} \]
            11. lower--.f6454.9

              \[\leadsto \frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, \color{blue}{-1 - x}\right)}{B} \]
          8. Applied rewrites54.9%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1 - x\right)}}{B} \]

          if -37 < F < 0.330000000000000016

          1. Initial program 99.5%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
            2. sub-negN/A

              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6447.7

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites47.7%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around 0

            \[\leadsto \color{blue}{-1 \cdot \frac{x}{B} + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + -1 \cdot \frac{x}{B}} \]
            2. mul-1-negN/A

              \[\leadsto \frac{F}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
            3. sub-negN/A

              \[\leadsto \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - \frac{x}{B}} \]
            4. associate-*l/N/A

              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}}{B}} - \frac{x}{B} \]
            5. div-subN/A

              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x}{B}} \]
            6. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x}{B}} \]
            7. sub-negN/A

              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
            8. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + 2 \cdot x}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            9. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + 2 \cdot x}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + 2 \cdot x}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-neg.f6447.7

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}, \color{blue}{-x}\right)}{B} \]
          8. Applied rewrites47.7%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}, -x\right)}{B}} \]

          if 0.330000000000000016 < F

          1. Initial program 64.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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6447.6

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites47.6%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around inf

            \[\leadsto \frac{\color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}}{B} \]
          7. Step-by-step derivation
            1. lower--.f64N/A

              \[\leadsto \frac{\color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}}{B} \]
            2. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{\left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + 1\right)} - x}{B} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \frac{2 + 2 \cdot x}{{F}^{2}}, 1\right)} - x}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{{F}^{2}}}, 1\right) - x}{B} \]
            5. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, 1\right) - x}{B} \]
            6. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{{F}^{2}}, 1\right) - x}{B} \]
            7. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, 1\right) - x}{B} \]
            8. lower-*.f6455.4

              \[\leadsto \frac{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, 1\right) - x}{B} \]
          8. Applied rewrites55.4%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, 1\right) - x}}{B} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 21: 44.7% accurate, 6.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3000000:\\ \;\;\;\;\left(-x\right) \cdot \mathsf{fma}\left(B, -0.3333333333333333, \frac{1}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, 1\right) - x}{B}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (if (<= F -6.2e-54)
           (/ (- -1.0 x) B)
           (if (<= F 3000000.0)
             (* (- x) (fma B -0.3333333333333333 (/ 1.0 B)))
             (/ (- (fma -0.5 (/ (fma 2.0 x 2.0) (* F F)) 1.0) x) B))))
        double code(double F, double B, double x) {
        	double tmp;
        	if (F <= -6.2e-54) {
        		tmp = (-1.0 - x) / B;
        	} else if (F <= 3000000.0) {
        		tmp = -x * fma(B, -0.3333333333333333, (1.0 / B));
        	} else {
        		tmp = (fma(-0.5, (fma(2.0, x, 2.0) / (F * F)), 1.0) - x) / B;
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	tmp = 0.0
        	if (F <= -6.2e-54)
        		tmp = Float64(Float64(-1.0 - x) / B);
        	elseif (F <= 3000000.0)
        		tmp = Float64(Float64(-x) * fma(B, -0.3333333333333333, Float64(1.0 / B)));
        	else
        		tmp = Float64(Float64(fma(-0.5, Float64(fma(2.0, x, 2.0) / Float64(F * F)), 1.0) - x) / B);
        	end
        	return tmp
        end
        
        code[F_, B_, x_] := If[LessEqual[F, -6.2e-54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3000000.0], N[((-x) * N[(B * -0.3333333333333333 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.5 * N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\
        \;\;\;\;\frac{-1 - x}{B}\\
        
        \mathbf{elif}\;F \leq 3000000:\\
        \;\;\;\;\left(-x\right) \cdot \mathsf{fma}\left(B, -0.3333333333333333, \frac{1}{B}\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, 1\right) - x}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if F < -6.20000000000000008e-54

          1. Initial program 53.0%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. 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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6446.2

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites46.2%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around -inf

            \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
          7. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
            2. mul-1-negN/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
            3. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
            4. distribute-neg-inN/A

              \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
            5. metadata-evalN/A

              \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
            6. unsub-negN/A

              \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
            7. lower--.f6452.4

              \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
          8. Applied rewrites52.4%

            \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]

          if -6.20000000000000008e-54 < F < 3e6

          1. Initial program 99.5%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in B around 0

            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
            2. *-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
            3. associate-*l*N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
            4. associate-*r*N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
            5. *-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
            6. lower-/.f64N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites63.6%

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(0.16666666666666666, \left(B \cdot B\right) \cdot F, F\right)}{B}} \]
          6. Taylor expanded in B around 0

            \[\leadsto \left(\mathsf{neg}\left(x \cdot \color{blue}{\frac{1 + \frac{-1}{3} \cdot {B}^{2}}{B}}\right)\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
          7. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \color{blue}{\frac{1 + \frac{-1}{3} \cdot {B}^{2}}{B}}\right)\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
            2. +-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{\color{blue}{\frac{-1}{3} \cdot {B}^{2} + 1}}{B}\right)\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
            3. *-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{\color{blue}{{B}^{2} \cdot \frac{-1}{3}} + 1}{B}\right)\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
            4. lower-fma.f64N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{\color{blue}{\mathsf{fma}\left({B}^{2}, \frac{-1}{3}, 1\right)}}{B}\right)\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
            5. unpow2N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{-1}{3}, 1\right)}{B}\right)\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
            6. lower-*.f6447.0

              \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, -0.3333333333333333, 1\right)}{B}\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(0.16666666666666666, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
          8. Applied rewrites47.0%

            \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(B \cdot B, -0.3333333333333333, 1\right)}{B}}\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(0.16666666666666666, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
          9. Taylor expanded in x around inf

            \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(\frac{-1}{3} \cdot B + \frac{1}{B}\right)\right)} \]
          10. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(x \cdot \left(\frac{-1}{3} \cdot B + \frac{1}{B}\right)\right)} \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\frac{-1}{3} \cdot B + \frac{1}{B}\right) \cdot x}\right) \]
            3. distribute-rgt-neg-inN/A

              \[\leadsto \color{blue}{\left(\frac{-1}{3} \cdot B + \frac{1}{B}\right) \cdot \left(\mathsf{neg}\left(x\right)\right)} \]
            4. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(\frac{-1}{3} \cdot B + \frac{1}{B}\right) \cdot \left(\mathsf{neg}\left(x\right)\right)} \]
            5. *-commutativeN/A

              \[\leadsto \left(\color{blue}{B \cdot \frac{-1}{3}} + \frac{1}{B}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            6. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(B, \frac{-1}{3}, \frac{1}{B}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            7. lower-/.f64N/A

              \[\leadsto \mathsf{fma}\left(B, \frac{-1}{3}, \color{blue}{\frac{1}{B}}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            8. lower-neg.f6438.9

              \[\leadsto \mathsf{fma}\left(B, -0.3333333333333333, \frac{1}{B}\right) \cdot \color{blue}{\left(-x\right)} \]
          11. Applied rewrites38.9%

            \[\leadsto \color{blue}{\mathsf{fma}\left(B, -0.3333333333333333, \frac{1}{B}\right) \cdot \left(-x\right)} \]

          if 3e6 < F

          1. Initial program 63.3%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          4. Step-by-step derivation
            1. 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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6447.5

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites47.5%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around inf

            \[\leadsto \frac{\color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}}{B} \]
          7. Step-by-step derivation
            1. lower--.f64N/A

              \[\leadsto \frac{\color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}}{B} \]
            2. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{\left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + 1\right)} - x}{B} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \frac{2 + 2 \cdot x}{{F}^{2}}, 1\right)} - x}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \color{blue}{\frac{2 + 2 \cdot x}{{F}^{2}}}, 1\right) - x}{B} \]
            5. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{2 \cdot x + 2}}{{F}^{2}}, 1\right) - x}{B} \]
            6. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}{{F}^{2}}, 1\right) - x}{B} \]
            7. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{2}, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, 1\right) - x}{B} \]
            8. lower-*.f6455.5

              \[\leadsto \frac{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{\color{blue}{F \cdot F}}, 1\right) - x}{B} \]
          8. Applied rewrites55.5%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, 1\right) - x}}{B} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification47.7%

          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3000000:\\ \;\;\;\;\left(-x\right) \cdot \mathsf{fma}\left(B, -0.3333333333333333, \frac{1}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, 1\right) - x}{B}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 22: 44.7% accurate, 9.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3000000:\\ \;\;\;\;\left(-x\right) \cdot \mathsf{fma}\left(B, -0.3333333333333333, \frac{1}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (if (<= F -6.2e-54)
           (/ (- -1.0 x) B)
           (if (<= F 3000000.0)
             (* (- x) (fma B -0.3333333333333333 (/ 1.0 B)))
             (/ (- 1.0 x) B))))
        double code(double F, double B, double x) {
        	double tmp;
        	if (F <= -6.2e-54) {
        		tmp = (-1.0 - x) / B;
        	} else if (F <= 3000000.0) {
        		tmp = -x * fma(B, -0.3333333333333333, (1.0 / B));
        	} else {
        		tmp = (1.0 - x) / B;
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	tmp = 0.0
        	if (F <= -6.2e-54)
        		tmp = Float64(Float64(-1.0 - x) / B);
        	elseif (F <= 3000000.0)
        		tmp = Float64(Float64(-x) * fma(B, -0.3333333333333333, Float64(1.0 / B)));
        	else
        		tmp = Float64(Float64(1.0 - x) / B);
        	end
        	return tmp
        end
        
        code[F_, B_, x_] := If[LessEqual[F, -6.2e-54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3000000.0], N[((-x) * N[(B * -0.3333333333333333 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\
        \;\;\;\;\frac{-1 - x}{B}\\
        
        \mathbf{elif}\;F \leq 3000000:\\
        \;\;\;\;\left(-x\right) \cdot \mathsf{fma}\left(B, -0.3333333333333333, \frac{1}{B}\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{1 - x}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if F < -6.20000000000000008e-54

          1. Initial program 53.0%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. 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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6446.2

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites46.2%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around -inf

            \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
          7. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
            2. mul-1-negN/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
            3. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
            4. distribute-neg-inN/A

              \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
            5. metadata-evalN/A

              \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
            6. unsub-negN/A

              \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
            7. lower--.f6452.4

              \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
          8. Applied rewrites52.4%

            \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]

          if -6.20000000000000008e-54 < F < 3e6

          1. Initial program 99.5%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in B around 0

            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
            2. *-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
            3. associate-*l*N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
            4. associate-*r*N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
            5. *-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
            6. lower-/.f64N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
          5. Applied rewrites63.6%

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(0.16666666666666666, \left(B \cdot B\right) \cdot F, F\right)}{B}} \]
          6. Taylor expanded in B around 0

            \[\leadsto \left(\mathsf{neg}\left(x \cdot \color{blue}{\frac{1 + \frac{-1}{3} \cdot {B}^{2}}{B}}\right)\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
          7. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \color{blue}{\frac{1 + \frac{-1}{3} \cdot {B}^{2}}{B}}\right)\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
            2. +-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{\color{blue}{\frac{-1}{3} \cdot {B}^{2} + 1}}{B}\right)\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
            3. *-commutativeN/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{\color{blue}{{B}^{2} \cdot \frac{-1}{3}} + 1}{B}\right)\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
            4. lower-fma.f64N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{\color{blue}{\mathsf{fma}\left({B}^{2}, \frac{-1}{3}, 1\right)}}{B}\right)\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
            5. unpow2N/A

              \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{-1}{3}, 1\right)}{B}\right)\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(\frac{1}{6}, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
            6. lower-*.f6447.0

              \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, -0.3333333333333333, 1\right)}{B}\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(0.16666666666666666, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
          8. Applied rewrites47.0%

            \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(B \cdot B, -0.3333333333333333, 1\right)}{B}}\right) + \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(0.16666666666666666, \left(B \cdot B\right) \cdot F, F\right)}{B} \]
          9. Taylor expanded in x around inf

            \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(\frac{-1}{3} \cdot B + \frac{1}{B}\right)\right)} \]
          10. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(x \cdot \left(\frac{-1}{3} \cdot B + \frac{1}{B}\right)\right)} \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\frac{-1}{3} \cdot B + \frac{1}{B}\right) \cdot x}\right) \]
            3. distribute-rgt-neg-inN/A

              \[\leadsto \color{blue}{\left(\frac{-1}{3} \cdot B + \frac{1}{B}\right) \cdot \left(\mathsf{neg}\left(x\right)\right)} \]
            4. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(\frac{-1}{3} \cdot B + \frac{1}{B}\right) \cdot \left(\mathsf{neg}\left(x\right)\right)} \]
            5. *-commutativeN/A

              \[\leadsto \left(\color{blue}{B \cdot \frac{-1}{3}} + \frac{1}{B}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            6. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(B, \frac{-1}{3}, \frac{1}{B}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            7. lower-/.f64N/A

              \[\leadsto \mathsf{fma}\left(B, \frac{-1}{3}, \color{blue}{\frac{1}{B}}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            8. lower-neg.f6438.9

              \[\leadsto \mathsf{fma}\left(B, -0.3333333333333333, \frac{1}{B}\right) \cdot \color{blue}{\left(-x\right)} \]
          11. Applied rewrites38.9%

            \[\leadsto \color{blue}{\mathsf{fma}\left(B, -0.3333333333333333, \frac{1}{B}\right) \cdot \left(-x\right)} \]

          if 3e6 < F

          1. Initial program 63.3%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          4. Step-by-step derivation
            1. 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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6447.5

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites47.5%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around inf

            \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
          7. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
            2. lower--.f6455.3

              \[\leadsto \frac{\color{blue}{1 - x}}{B} \]
          8. Applied rewrites55.3%

            \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification47.7%

          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3000000:\\ \;\;\;\;\left(-x\right) \cdot \mathsf{fma}\left(B, -0.3333333333333333, \frac{1}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 23: 37.7% accurate, 11.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 2.2 \cdot 10^{+17}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{+154}:\\ \;\;\;\;\frac{1}{B}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (let* ((t_0 (/ (- x) B)))
           (if (<= F -6.2e-54)
             (/ (- -1.0 x) B)
             (if (<= F 2.2e+17) t_0 (if (<= F 8.2e+154) (/ 1.0 B) t_0)))))
        double code(double F, double B, double x) {
        	double t_0 = -x / B;
        	double tmp;
        	if (F <= -6.2e-54) {
        		tmp = (-1.0 - x) / B;
        	} else if (F <= 2.2e+17) {
        		tmp = t_0;
        	} else if (F <= 8.2e+154) {
        		tmp = 1.0 / B;
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        real(8) function code(f, b, x)
            real(8), intent (in) :: f
            real(8), intent (in) :: b
            real(8), intent (in) :: x
            real(8) :: t_0
            real(8) :: tmp
            t_0 = -x / b
            if (f <= (-6.2d-54)) then
                tmp = ((-1.0d0) - x) / b
            else if (f <= 2.2d+17) then
                tmp = t_0
            else if (f <= 8.2d+154) then
                tmp = 1.0d0 / b
            else
                tmp = t_0
            end if
            code = tmp
        end function
        
        public static double code(double F, double B, double x) {
        	double t_0 = -x / B;
        	double tmp;
        	if (F <= -6.2e-54) {
        		tmp = (-1.0 - x) / B;
        	} else if (F <= 2.2e+17) {
        		tmp = t_0;
        	} else if (F <= 8.2e+154) {
        		tmp = 1.0 / B;
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        def code(F, B, x):
        	t_0 = -x / B
        	tmp = 0
        	if F <= -6.2e-54:
        		tmp = (-1.0 - x) / B
        	elif F <= 2.2e+17:
        		tmp = t_0
        	elif F <= 8.2e+154:
        		tmp = 1.0 / B
        	else:
        		tmp = t_0
        	return tmp
        
        function code(F, B, x)
        	t_0 = Float64(Float64(-x) / B)
        	tmp = 0.0
        	if (F <= -6.2e-54)
        		tmp = Float64(Float64(-1.0 - x) / B);
        	elseif (F <= 2.2e+17)
        		tmp = t_0;
        	elseif (F <= 8.2e+154)
        		tmp = Float64(1.0 / B);
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        function tmp_2 = code(F, B, x)
        	t_0 = -x / B;
        	tmp = 0.0;
        	if (F <= -6.2e-54)
        		tmp = (-1.0 - x) / B;
        	elseif (F <= 2.2e+17)
        		tmp = t_0;
        	elseif (F <= 8.2e+154)
        		tmp = 1.0 / B;
        	else
        		tmp = t_0;
        	end
        	tmp_2 = tmp;
        end
        
        code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[F, -6.2e-54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.2e+17], t$95$0, If[LessEqual[F, 8.2e+154], N[(1.0 / B), $MachinePrecision], t$95$0]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{-x}{B}\\
        \mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\
        \;\;\;\;\frac{-1 - x}{B}\\
        
        \mathbf{elif}\;F \leq 2.2 \cdot 10^{+17}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;F \leq 8.2 \cdot 10^{+154}:\\
        \;\;\;\;\frac{1}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if F < -6.20000000000000008e-54

          1. Initial program 53.0%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. 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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6446.2

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites46.2%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around -inf

            \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
          7. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
            2. mul-1-negN/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
            3. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
            4. distribute-neg-inN/A

              \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
            5. metadata-evalN/A

              \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
            6. unsub-negN/A

              \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
            7. lower--.f6452.4

              \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
          8. Applied rewrites52.4%

            \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]

          if -6.20000000000000008e-54 < F < 2.2e17 or 8.2e154 < F

          1. Initial program 85.0%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
            2. sub-negN/A

              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6444.4

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites44.4%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around 0

            \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
          7. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
            2. mul-1-negN/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{B} \]
            3. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{B}} \]
            4. lower-neg.f6437.1

              \[\leadsto \frac{\color{blue}{-x}}{B} \]
          8. Applied rewrites37.1%

            \[\leadsto \color{blue}{\frac{-x}{B}} \]

          if 2.2e17 < F < 8.2e154

          1. Initial program 83.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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6459.7

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites59.7%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B}} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{B} \]
            5. +-commutativeN/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}} \cdot \frac{F}{B} \]
            6. unpow2N/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}} \cdot \frac{F}{B} \]
            7. lower-fma.f64N/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \cdot \frac{F}{B} \]
            8. lower-/.f6432.8

              \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \color{blue}{\frac{F}{B}} \]
          8. Applied rewrites32.8%

            \[\leadsto \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B}} \]
          9. Taylor expanded in F around inf

            \[\leadsto \color{blue}{\frac{1}{B}} \]
          10. Step-by-step derivation
            1. lower-/.f6446.1

              \[\leadsto \color{blue}{\frac{1}{B}} \]
          11. Applied rewrites46.1%

            \[\leadsto \color{blue}{\frac{1}{B}} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 24: 31.9% accurate, 11.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;x \leq -8.2 \cdot 10^{-89}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-280}:\\ \;\;\;\;\frac{1}{B}\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-129}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (let* ((t_0 (/ (- x) B)))
           (if (<= x -8.2e-89)
             t_0
             (if (<= x 1.05e-280) (/ 1.0 B) (if (<= x 6.2e-129) (/ -1.0 B) t_0)))))
        double code(double F, double B, double x) {
        	double t_0 = -x / B;
        	double tmp;
        	if (x <= -8.2e-89) {
        		tmp = t_0;
        	} else if (x <= 1.05e-280) {
        		tmp = 1.0 / B;
        	} else if (x <= 6.2e-129) {
        		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 <= (-8.2d-89)) then
                tmp = t_0
            else if (x <= 1.05d-280) then
                tmp = 1.0d0 / b
            else if (x <= 6.2d-129) 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 <= -8.2e-89) {
        		tmp = t_0;
        	} else if (x <= 1.05e-280) {
        		tmp = 1.0 / B;
        	} else if (x <= 6.2e-129) {
        		tmp = -1.0 / B;
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        def code(F, B, x):
        	t_0 = -x / B
        	tmp = 0
        	if x <= -8.2e-89:
        		tmp = t_0
        	elif x <= 1.05e-280:
        		tmp = 1.0 / B
        	elif x <= 6.2e-129:
        		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 <= -8.2e-89)
        		tmp = t_0;
        	elseif (x <= 1.05e-280)
        		tmp = Float64(1.0 / B);
        	elseif (x <= 6.2e-129)
        		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 <= -8.2e-89)
        		tmp = t_0;
        	elseif (x <= 1.05e-280)
        		tmp = 1.0 / B;
        	elseif (x <= 6.2e-129)
        		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, -8.2e-89], t$95$0, If[LessEqual[x, 1.05e-280], N[(1.0 / B), $MachinePrecision], If[LessEqual[x, 6.2e-129], N[(-1.0 / B), $MachinePrecision], t$95$0]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{-x}{B}\\
        \mathbf{if}\;x \leq -8.2 \cdot 10^{-89}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;x \leq 1.05 \cdot 10^{-280}:\\
        \;\;\;\;\frac{1}{B}\\
        
        \mathbf{elif}\;x \leq 6.2 \cdot 10^{-129}:\\
        \;\;\;\;\frac{-1}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if x < -8.1999999999999997e-89 or 6.2000000000000001e-129 < x

          1. Initial program 80.1%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
            2. sub-negN/A

              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6452.6

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites52.6%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around 0

            \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
          7. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
            2. mul-1-negN/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{B} \]
            3. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{B}} \]
            4. lower-neg.f6445.7

              \[\leadsto \frac{\color{blue}{-x}}{B} \]
          8. Applied rewrites45.7%

            \[\leadsto \color{blue}{\frac{-x}{B}} \]

          if -8.1999999999999997e-89 < x < 1.05e-280

          1. Initial program 69.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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6434.9

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites34.9%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B}} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{B} \]
            5. +-commutativeN/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}} \cdot \frac{F}{B} \]
            6. unpow2N/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}} \cdot \frac{F}{B} \]
            7. lower-fma.f64N/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \cdot \frac{F}{B} \]
            8. lower-/.f6424.2

              \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \color{blue}{\frac{F}{B}} \]
          8. Applied rewrites24.2%

            \[\leadsto \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B}} \]
          9. Taylor expanded in F around inf

            \[\leadsto \color{blue}{\frac{1}{B}} \]
          10. Step-by-step derivation
            1. lower-/.f6424.4

              \[\leadsto \color{blue}{\frac{1}{B}} \]
          11. Applied rewrites24.4%

            \[\leadsto \color{blue}{\frac{1}{B}} \]

          if 1.05e-280 < x < 6.2000000000000001e-129

          1. Initial program 60.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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6443.5

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites43.5%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B}} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{B} \]
            5. +-commutativeN/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}} \cdot \frac{F}{B} \]
            6. unpow2N/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}} \cdot \frac{F}{B} \]
            7. lower-fma.f64N/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \cdot \frac{F}{B} \]
            8. lower-/.f6429.4

              \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \color{blue}{\frac{F}{B}} \]
          8. Applied rewrites29.4%

            \[\leadsto \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B}} \]
          9. Taylor expanded in F around -inf

            \[\leadsto \color{blue}{\frac{-1}{B}} \]
          10. Step-by-step derivation
            1. lower-/.f6434.8

              \[\leadsto \color{blue}{\frac{-1}{B}} \]
          11. Applied rewrites34.8%

            \[\leadsto \color{blue}{\frac{-1}{B}} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 25: 44.8% accurate, 13.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{-38}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (if (<= F -6.2e-54)
           (/ (- -1.0 x) B)
           (if (<= F 4.5e-38) (/ (- x) B) (/ (- 1.0 x) B))))
        double code(double F, double B, double x) {
        	double tmp;
        	if (F <= -6.2e-54) {
        		tmp = (-1.0 - x) / B;
        	} else if (F <= 4.5e-38) {
        		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.2d-54)) then
                tmp = ((-1.0d0) - x) / b
            else if (f <= 4.5d-38) 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.2e-54) {
        		tmp = (-1.0 - x) / B;
        	} else if (F <= 4.5e-38) {
        		tmp = -x / B;
        	} else {
        		tmp = (1.0 - x) / B;
        	}
        	return tmp;
        }
        
        def code(F, B, x):
        	tmp = 0
        	if F <= -6.2e-54:
        		tmp = (-1.0 - x) / B
        	elif F <= 4.5e-38:
        		tmp = -x / B
        	else:
        		tmp = (1.0 - x) / B
        	return tmp
        
        function code(F, B, x)
        	tmp = 0.0
        	if (F <= -6.2e-54)
        		tmp = Float64(Float64(-1.0 - x) / B);
        	elseif (F <= 4.5e-38)
        		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.2e-54)
        		tmp = (-1.0 - x) / B;
        	elseif (F <= 4.5e-38)
        		tmp = -x / B;
        	else
        		tmp = (1.0 - x) / B;
        	end
        	tmp_2 = tmp;
        end
        
        code[F_, B_, x_] := If[LessEqual[F, -6.2e-54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.5e-38], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;F \leq -6.2 \cdot 10^{-54}:\\
        \;\;\;\;\frac{-1 - x}{B}\\
        
        \mathbf{elif}\;F \leq 4.5 \cdot 10^{-38}:\\
        \;\;\;\;\frac{-x}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{1 - x}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if F < -6.20000000000000008e-54

          1. Initial program 53.0%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. 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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6446.2

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites46.2%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around -inf

            \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
          7. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
            2. mul-1-negN/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
            3. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
            4. distribute-neg-inN/A

              \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
            5. metadata-evalN/A

              \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
            6. unsub-negN/A

              \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
            7. lower--.f6452.4

              \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
          8. Applied rewrites52.4%

            \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]

          if -6.20000000000000008e-54 < F < 4.50000000000000009e-38

          1. Initial program 99.5%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
            2. sub-negN/A

              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6447.4

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites47.4%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around 0

            \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
          7. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
            2. mul-1-negN/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{B} \]
            3. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{B}} \]
            4. lower-neg.f6439.1

              \[\leadsto \frac{\color{blue}{-x}}{B} \]
          8. Applied rewrites39.1%

            \[\leadsto \color{blue}{\frac{-x}{B}} \]

          if 4.50000000000000009e-38 < F

          1. Initial program 69.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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6447.6

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites47.6%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in F around inf

            \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
          7. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
            2. lower--.f6451.9

              \[\leadsto \frac{\color{blue}{1 - x}}{B} \]
          8. Applied rewrites51.9%

            \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 26: 17.5% accurate, 20.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq 3000000:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \end{array} \]
        (FPCore (F B x) :precision binary64 (if (<= F 3000000.0) (/ -1.0 B) (/ 1.0 B)))
        double code(double F, double B, double x) {
        	double tmp;
        	if (F <= 3000000.0) {
        		tmp = -1.0 / B;
        	} else {
        		tmp = 1.0 / B;
        	}
        	return tmp;
        }
        
        real(8) function code(f, b, x)
            real(8), intent (in) :: f
            real(8), intent (in) :: b
            real(8), intent (in) :: x
            real(8) :: tmp
            if (f <= 3000000.0d0) then
                tmp = (-1.0d0) / b
            else
                tmp = 1.0d0 / b
            end if
            code = tmp
        end function
        
        public static double code(double F, double B, double x) {
        	double tmp;
        	if (F <= 3000000.0) {
        		tmp = -1.0 / B;
        	} else {
        		tmp = 1.0 / B;
        	}
        	return tmp;
        }
        
        def code(F, B, x):
        	tmp = 0
        	if F <= 3000000.0:
        		tmp = -1.0 / B
        	else:
        		tmp = 1.0 / B
        	return tmp
        
        function code(F, B, x)
        	tmp = 0.0
        	if (F <= 3000000.0)
        		tmp = Float64(-1.0 / B);
        	else
        		tmp = Float64(1.0 / B);
        	end
        	return tmp
        end
        
        function tmp_2 = code(F, B, x)
        	tmp = 0.0;
        	if (F <= 3000000.0)
        		tmp = -1.0 / B;
        	else
        		tmp = 1.0 / B;
        	end
        	tmp_2 = tmp;
        end
        
        code[F_, B_, x_] := If[LessEqual[F, 3000000.0], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;F \leq 3000000:\\
        \;\;\;\;\frac{-1}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{1}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if F < 3e6

          1. Initial program 79.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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6447.0

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites47.0%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B}} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{B} \]
            5. +-commutativeN/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}} \cdot \frac{F}{B} \]
            6. unpow2N/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}} \cdot \frac{F}{B} \]
            7. lower-fma.f64N/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \cdot \frac{F}{B} \]
            8. lower-/.f6413.2

              \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \color{blue}{\frac{F}{B}} \]
          8. Applied rewrites13.2%

            \[\leadsto \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B}} \]
          9. Taylor expanded in F around -inf

            \[\leadsto \color{blue}{\frac{-1}{B}} \]
          10. Step-by-step derivation
            1. lower-/.f6414.5

              \[\leadsto \color{blue}{\frac{-1}{B}} \]
          11. Applied rewrites14.5%

            \[\leadsto \color{blue}{\frac{-1}{B}} \]

          if 3e6 < F

          1. Initial program 63.3%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
          4. Step-by-step derivation
            1. 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. lower-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
            4. lower-sqrt.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            5. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            6. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            7. associate-+l+N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            10. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            12. unpow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
            14. lower-neg.f6447.5

              \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
          5. Applied rewrites47.5%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
          6. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B}} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{B} \]
            5. +-commutativeN/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}} \cdot \frac{F}{B} \]
            6. unpow2N/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}} \cdot \frac{F}{B} \]
            7. lower-fma.f64N/A

              \[\leadsto \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \cdot \frac{F}{B} \]
            8. lower-/.f6418.6

              \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \color{blue}{\frac{F}{B}} \]
          8. Applied rewrites18.6%

            \[\leadsto \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B}} \]
          9. Taylor expanded in F around inf

            \[\leadsto \color{blue}{\frac{1}{B}} \]
          10. Step-by-step derivation
            1. lower-/.f6432.3

              \[\leadsto \color{blue}{\frac{1}{B}} \]
          11. Applied rewrites32.3%

            \[\leadsto \color{blue}{\frac{1}{B}} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 27: 10.3% 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 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 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. lower-fma.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
          4. lower-sqrt.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          5. lower-/.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          6. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          7. associate-+l+N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          10. lower-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          11. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          12. unpow2N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          13. lower-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
          14. lower-neg.f6447.1

            \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{-x}\right)}{B} \]
        5. Applied rewrites47.1%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}} \]
        6. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
        7. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B}} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B}} \]
          3. lower-sqrt.f64N/A

            \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{B} \]
          4. lower-/.f64N/A

            \[\leadsto \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{B} \]
          5. +-commutativeN/A

            \[\leadsto \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}} \cdot \frac{F}{B} \]
          6. unpow2N/A

            \[\leadsto \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}} \cdot \frac{F}{B} \]
          7. lower-fma.f64N/A

            \[\leadsto \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \cdot \frac{F}{B} \]
          8. lower-/.f6414.7

            \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \color{blue}{\frac{F}{B}} \]
        8. Applied rewrites14.7%

          \[\leadsto \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B}} \]
        9. Taylor expanded in F around -inf

          \[\leadsto \color{blue}{\frac{-1}{B}} \]
        10. Step-by-step derivation
          1. lower-/.f6411.0

            \[\leadsto \color{blue}{\frac{-1}{B}} \]
        11. Applied rewrites11.0%

          \[\leadsto \color{blue}{\frac{-1}{B}} \]
        12. Add Preprocessing

        Alternative 28: 3.0% accurate, 61.3× speedup?

        \[\begin{array}{l} \\ B \cdot -0.16666666666666666 \end{array} \]
        (FPCore (F B x) :precision binary64 (* B -0.16666666666666666))
        double code(double F, double B, double x) {
        	return B * -0.16666666666666666;
        }
        
        real(8) function code(f, b, x)
            real(8), intent (in) :: f
            real(8), intent (in) :: b
            real(8), intent (in) :: x
            code = b * (-0.16666666666666666d0)
        end function
        
        public static double code(double F, double B, double x) {
        	return B * -0.16666666666666666;
        }
        
        def code(F, B, x):
        	return B * -0.16666666666666666
        
        function code(F, B, x)
        	return Float64(B * -0.16666666666666666)
        end
        
        function tmp = code(F, B, x)
        	tmp = B * -0.16666666666666666;
        end
        
        code[F_, B_, x_] := N[(B * -0.16666666666666666), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        B \cdot -0.16666666666666666
        \end{array}
        
        Derivation
        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 B around 0

          \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
          2. *-commutativeN/A

            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
          3. associate-*l*N/A

            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
          4. associate-*r*N/A

            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
          5. *-commutativeN/A

            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
          6. lower-/.f64N/A

            \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
        5. Applied rewrites54.3%

          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \mathsf{fma}\left(0.16666666666666666, \left(B \cdot B\right) \cdot F, F\right)}{B}} \]
        6. Taylor expanded in B around inf

          \[\leadsto \color{blue}{\frac{1}{6} \cdot \left(\left(B \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)} \]
        7. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \color{blue}{\left(\frac{1}{6} \cdot \left(B \cdot F\right)\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(\frac{1}{6} \cdot \left(B \cdot F\right)\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
          3. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(\frac{1}{6} \cdot \left(B \cdot F\right)\right)} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
          4. *-commutativeN/A

            \[\leadsto \left(\frac{1}{6} \cdot \color{blue}{\left(F \cdot B\right)}\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
          5. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{6} \cdot \color{blue}{\left(F \cdot B\right)}\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \]
          6. lower-sqrt.f64N/A

            \[\leadsto \left(\frac{1}{6} \cdot \left(F \cdot B\right)\right) \cdot \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
          7. lower-/.f64N/A

            \[\leadsto \left(\frac{1}{6} \cdot \left(F \cdot B\right)\right) \cdot \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
          8. lower-+.f64N/A

            \[\leadsto \left(\frac{1}{6} \cdot \left(F \cdot B\right)\right) \cdot \sqrt{\frac{1}{\color{blue}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
          9. +-commutativeN/A

            \[\leadsto \left(\frac{1}{6} \cdot \left(F \cdot B\right)\right) \cdot \sqrt{\frac{1}{2 + \color{blue}{\left({F}^{2} + 2 \cdot x\right)}}} \]
          10. unpow2N/A

            \[\leadsto \left(\frac{1}{6} \cdot \left(F \cdot B\right)\right) \cdot \sqrt{\frac{1}{2 + \left(\color{blue}{F \cdot F} + 2 \cdot x\right)}} \]
          11. lower-fma.f64N/A

            \[\leadsto \left(\frac{1}{6} \cdot \left(F \cdot B\right)\right) \cdot \sqrt{\frac{1}{2 + \color{blue}{\mathsf{fma}\left(F, F, 2 \cdot x\right)}}} \]
          12. lower-*.f642.6

            \[\leadsto \left(0.16666666666666666 \cdot \left(F \cdot B\right)\right) \cdot \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, \color{blue}{2 \cdot x}\right)}} \]
        8. Applied rewrites2.6%

          \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \left(F \cdot B\right)\right) \cdot \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, 2 \cdot x\right)}}} \]
        9. Taylor expanded in F around -inf

          \[\leadsto \color{blue}{\frac{-1}{6} \cdot B} \]
        10. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{B \cdot \frac{-1}{6}} \]
          2. lower-*.f642.9

            \[\leadsto \color{blue}{B \cdot -0.16666666666666666} \]
        11. Applied rewrites2.9%

          \[\leadsto \color{blue}{B \cdot -0.16666666666666666} \]
        12. Add Preprocessing

        Reproduce

        ?
        herbie shell --seed 2024214 
        (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))))))