VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.6% → 99.7%
Time: 16.7s
Alternatives: 23
Speedup: 1.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 23 alternatives:

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

Initial Program: 76.6% 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} \mathbf{if}\;F \leq -145000000:\\ \;\;\;\;\frac{\mathsf{fma}\left(-x, \cos B, -1\right)}{\sin B}\\ \mathbf{elif}\;F \leq 5 \cdot 10^{+38}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \frac{-x}{\tan B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -145000000.0)
   (/ (fma (- x) (cos B) -1.0) (sin B))
   (if (<= F 5e+38)
     (fma F (/ (pow (fma 2.0 x (fma F F 2.0)) -0.5) (sin B)) (/ (- x) (tan B)))
     (/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -145000000.0) {
		tmp = fma(-x, cos(B), -1.0) / sin(B);
	} else if (F <= 5e+38) {
		tmp = fma(F, (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) / sin(B)), (-x / tan(B)));
	} else {
		tmp = (1.0 - (x * cos(B))) / sin(B);
	}
	return tmp;
}
function code(F, B, x)
	tmp = 0.0
	if (F <= -145000000.0)
		tmp = Float64(fma(Float64(-x), cos(B), -1.0) / sin(B));
	elseif (F <= 5e+38)
		tmp = fma(F, Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) / sin(B)), Float64(Float64(-x) / tan(B)));
	else
		tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B));
	end
	return tmp
end
code[F_, B_, x_] := If[LessEqual[F, -145000000.0], N[(N[((-x) * N[Cos[B], $MachinePrecision] + -1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e+38], N[(F * N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 58.7%

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

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

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

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

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

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

        \[\leadsto \frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B} + \frac{\color{blue}{-1}}{\sin B} \]
      6. div-add-revN/A

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

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

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

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

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

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

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

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

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

    if -1.45e8 < F < 4.9999999999999997e38

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

    if 4.9999999999999997e38 < F

    1. Initial program 50.5%

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

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

        \[\leadsto \frac{1}{\sin B} - \color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
      2. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{\cos B}{\sin B}\right)\right)} \]
      4. associate-/l*N/A

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

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

        \[\leadsto \frac{1}{\sin B} + \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
      7. div-add-revN/A

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 78.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := \frac{-x}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B}\\
t_2 := \mathsf{fma}\left(F, \frac{{\left(\sqrt{\mathsf{fma}\left(F, F, 2\right)}\right)}^{-1}}{\sin B}, t\_1\right)\\
\mathbf{if}\;F \leq -2.4 \cdot 10^{+111}:\\
\;\;\;\;\mathsf{fma}\left(F, \frac{-1}{\mathsf{fma}\left(\left(B \cdot B\right) \cdot F, -0.16666666666666666, F\right) \cdot B}, t\_0\right)\\

\mathbf{elif}\;F \leq -6.1 \cdot 10^{-121}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;F \leq 2 \cdot 10^{+125}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 46.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.40000000000000006e111 < F < -6.09999999999999978e-121 or 9.49999999999999992e-223 < F < 1.9999999999999998e125

      1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -6.09999999999999978e-121 < F < 9.49999999999999992e-223

        1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.9999999999999998e125 < F

        1. Initial program 36.3%

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x \cdot 1\right)}{\tan B}} + \frac{1}{\sin B} \]
          6. *-rgt-identityN/A

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

            \[\leadsto \frac{\color{blue}{-x}}{\tan B} + \frac{1}{\sin B} \]
          8. lift-/.f6499.8

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

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

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

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

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

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

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

            \[\leadsto \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, 1\right) \cdot B} + \frac{1}{\sin B} \]
          6. lower-*.f6476.0

            \[\leadsto \frac{-x}{\mathsf{fma}\left(0.3333333333333333, \color{blue}{B \cdot B}, 1\right) \cdot B} + \frac{1}{\sin B} \]
        10. Applied rewrites76.0%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{+111}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{\mathsf{fma}\left(\left(B \cdot B\right) \cdot F, -0.16666666666666666, F\right) \cdot B}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq -6.1 \cdot 10^{-121}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\sqrt{\mathsf{fma}\left(F, F, 2\right)}\right)}^{-1}}{\sin B}, \frac{-x}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B}\right)\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{-223}:\\ \;\;\;\;\mathsf{fma}\left(F, \sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot {B}^{-1}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+125}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\sqrt{\mathsf{fma}\left(F, F, 2\right)}\right)}^{-1}}{\sin B}, \frac{-x}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B} + {\sin B}^{-1}\\ \end{array} \]
      11. Add Preprocessing

      Alternative 3: 90.7% accurate, 1.0× speedup?

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

        1. Initial program 59.8%

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

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

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

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

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

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

            \[\leadsto \frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B} + \frac{\color{blue}{-1}}{\sin B} \]
          6. div-add-revN/A

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

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

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

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

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

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

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

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

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

        if -6.9999999999999994e-5 < F < 9.49999999999999992e-223

        1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 9.49999999999999992e-223 < F < 35000

        1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, 1\right) \cdot B}\right) \]
            6. lower-*.f6489.9

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

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

          if 35000 < F

          1. Initial program 54.8%

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

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

              \[\leadsto \frac{1}{\sin B} - \color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
            2. fp-cancel-sub-sign-invN/A

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

              \[\leadsto \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{\cos B}{\sin B}\right)\right)} \]
            4. associate-/l*N/A

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

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

              \[\leadsto \frac{1}{\sin B} + \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
            7. div-add-revN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{1 + \left(-x\right) \cdot \cos B}{\sin B}} \]
        9. Recombined 4 regimes into one program.
        10. Final simplification95.0%

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

        Alternative 4: 84.2% accurate, 1.0× speedup?

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

          1. Initial program 59.8%

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

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

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

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

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

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

              \[\leadsto \frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B} + \frac{\color{blue}{-1}}{\sin B} \]
            6. div-add-revN/A

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

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

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

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

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

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

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

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

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

          if -6.9999999999999994e-5 < F < 9.49999999999999992e-223

          1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 9.49999999999999992e-223 < F < 1.9999999999999998e125

          1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, 1\right) \cdot B}\right) \]
              6. lower-*.f6484.9

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

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

            if 1.9999999999999998e125 < F

            1. Initial program 36.3%

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x \cdot 1\right)}{\tan B}} + \frac{1}{\sin B} \]
              6. *-rgt-identityN/A

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

                \[\leadsto \frac{\color{blue}{-x}}{\tan B} + \frac{1}{\sin B} \]
              8. lift-/.f6499.8

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

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

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

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

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

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

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

                \[\leadsto \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, 1\right) \cdot B} + \frac{1}{\sin B} \]
              6. lower-*.f6476.0

                \[\leadsto \frac{-x}{\mathsf{fma}\left(0.3333333333333333, \color{blue}{B \cdot B}, 1\right) \cdot B} + \frac{1}{\sin B} \]
            10. Applied rewrites76.0%

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

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

          Alternative 5: 76.9% accurate, 1.0× speedup?

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

            1. Initial program 40.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(F, \frac{-1}{B \cdot \color{blue}{\left(F + \frac{-1}{6} \cdot \left({B}^{2} \cdot F\right)\right)}}, \frac{-x}{\tan B}\right) \]
            9. Step-by-step derivation
              1. Applied rewrites62.3%

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

              if -7.80000000000000038e136 < F < 3.7000000000000002e-129

              1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 3.7000000000000002e-129 < F < 5.8e6

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

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

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

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

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

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

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

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

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

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

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

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

              if 5.8e6 < F

              1. Initial program 54.8%

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x \cdot 1\right)}{\tan B}} + \frac{1}{\sin B} \]
                6. *-rgt-identityN/A

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

                  \[\leadsto \frac{\color{blue}{-x}}{\tan B} + \frac{1}{\sin B} \]
                8. lift-/.f6499.7

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

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

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

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

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

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

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

                  \[\leadsto \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, 1\right) \cdot B} + \frac{1}{\sin B} \]
                6. lower-*.f6476.3

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.8 \cdot 10^{+136}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{\mathsf{fma}\left(\left(B \cdot B\right) \cdot F, -0.16666666666666666, F\right) \cdot B}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{-129}:\\ \;\;\;\;\mathsf{fma}\left(F, \sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot {B}^{-1}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 5800000:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B} + {\sin B}^{-1}\\ \end{array} \]
            12. Add Preprocessing

            Alternative 6: 99.6% accurate, 1.0× speedup?

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

              1. Initial program 58.7%

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

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

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

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

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

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

                  \[\leadsto \frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B} + \frac{\color{blue}{-1}}{\sin B} \]
                6. div-add-revN/A

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

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

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

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

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

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

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

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

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

              if -2.15e8 < F < 4.9999999999999997e38

              1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 4.9999999999999997e38 < F

              1. Initial program 50.5%

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

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

                  \[\leadsto \frac{1}{\sin B} - \color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
                2. fp-cancel-sub-sign-invN/A

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

                  \[\leadsto \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{\cos B}{\sin B}\right)\right)} \]
                4. associate-/l*N/A

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

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

                  \[\leadsto \frac{1}{\sin B} + \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
                7. div-add-revN/A

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 99.6% accurate, 1.0× speedup?

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

              1. Initial program 52.6%

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

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

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

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

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

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

                  \[\leadsto \frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B} + \frac{\color{blue}{-1}}{\sin B} \]
                6. div-add-revN/A

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

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

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

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

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

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

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

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

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

              if -1.00000000000000009e56 < F < 5e6

              1. Initial program 98.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 inf

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

                  \[\leadsto \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - \color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
                2. fp-cancel-sub-sign-invN/A

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

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

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

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

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

                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\sin B} + \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
                8. div-add-revN/A

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

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

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

              if 5e6 < F

              1. Initial program 54.8%

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

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

                  \[\leadsto \frac{1}{\sin B} - \color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
                2. fp-cancel-sub-sign-invN/A

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

                  \[\leadsto \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{\cos B}{\sin B}\right)\right)} \]
                4. associate-/l*N/A

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

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

                  \[\leadsto \frac{1}{\sin B} + \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
                7. div-add-revN/A

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

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

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

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

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

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

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

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

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

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

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

            Alternative 8: 58.3% accurate, 1.2× speedup?

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

              1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                4. Applied rewrites39.6%

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

                if -8.99999999999999957e26 < F < 820

                1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 820 < F

                1. Initial program 54.8%

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

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

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

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

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

                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{1}{\sin B} \]
                7. Step-by-step derivation
                  1. lower-/.f6476.2

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

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

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

              Alternative 9: 51.1% accurate, 1.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{-1}{6} \cdot \left(B \cdot B\right) - 1}{B} \]
                  3. Step-by-step derivation
                    1. lower-/.f6438.5

                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                  4. Applied rewrites38.5%

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

                  if -5e18 < F < 2.05000000000000001e124

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 2.05000000000000001e124 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{1 - x}{B} \]
                  7. Step-by-step derivation
                    1. Applied rewrites46.5%

                      \[\leadsto \frac{1 - x}{B} \]
                  8. Recombined 3 regimes into one program.
                  9. Final simplification46.0%

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

                  Alternative 10: 76.8% accurate, 1.4× speedup?

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

                    1. Initial program 41.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -1.95000000000000016e135 < F < 3.7000000000000002e-129

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{-1}{\tan B}, x, \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}\right) \]
                        5. Step-by-step derivation
                          1. Applied rewrites80.3%

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

                          if 3.7000000000000002e-129 < F < 5.8e6

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

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

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

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

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

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

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

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

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

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

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

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

                          if 5.8e6 < F

                          1. Initial program 54.8%

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

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

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x \cdot 1\right)}{\tan B}} + \frac{1}{\sin B} \]
                            6. *-rgt-identityN/A

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

                              \[\leadsto \frac{\color{blue}{-x}}{\tan B} + \frac{1}{\sin B} \]
                            8. lift-/.f6499.7

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

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

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

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

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

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

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

                              \[\leadsto \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, 1\right) \cdot B} + \frac{1}{\sin B} \]
                            6. lower-*.f6476.3

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.95 \cdot 10^{+135}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{\mathsf{fma}\left(\left(B \cdot B\right) \cdot F, -0.16666666666666666, F\right) \cdot B}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 3.7 \cdot 10^{-129}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-1}{\tan B}, x, \frac{\sqrt{{\left(\mathsf{fma}\left(x, 2, F \cdot F\right) + 2\right)}^{-1}} \cdot F}{B}\right)\\ \mathbf{elif}\;F \leq 5800000:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B} + {\sin B}^{-1}\\ \end{array} \]
                        8. Add Preprocessing

                        Alternative 11: 99.2% accurate, 1.5× speedup?

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

                          1. Initial program 58.7%

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

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

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

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

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

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

                              \[\leadsto \frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B} + \frac{\color{blue}{-1}}{\sin B} \]
                            6. div-add-revN/A

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

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

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

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

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

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

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

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

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

                          if -7 < F < 1.3999999999999999

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(F, \frac{\sqrt{\frac{1}{2}}}{\sin B}, \frac{-x}{\tan B}\right) \]
                          9. Step-by-step derivation
                            1. Applied rewrites98.9%

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

                            if 1.3999999999999999 < F

                            1. Initial program 54.8%

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

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

                                \[\leadsto \frac{1}{\sin B} - \color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
                              2. fp-cancel-sub-sign-invN/A

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

                                \[\leadsto \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{\cos B}{\sin B}\right)\right)} \]
                              4. associate-/l*N/A

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

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

                                \[\leadsto \frac{1}{\sin B} + \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
                              7. div-add-revN/A

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 12: 68.3% accurate, 1.5× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{-78} \lor \neg \left(x \leq 7.2 \cdot 10^{-12}\right):\\ \;\;\;\;\frac{-x}{\tan B} + {B}^{-1}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}\\ \end{array} \end{array} \]
                          (FPCore (F B x)
                           :precision binary64
                           (if (or (<= x -7.5e-78) (not (<= x 7.2e-12)))
                             (+ (/ (- x) (tan B)) (pow B -1.0))
                             (* (sqrt (pow (fma F F 2.0) -1.0)) (/ F (sin B)))))
                          double code(double F, double B, double x) {
                          	double tmp;
                          	if ((x <= -7.5e-78) || !(x <= 7.2e-12)) {
                          		tmp = (-x / tan(B)) + pow(B, -1.0);
                          	} else {
                          		tmp = sqrt(pow(fma(F, F, 2.0), -1.0)) * (F / sin(B));
                          	}
                          	return tmp;
                          }
                          
                          function code(F, B, x)
                          	tmp = 0.0
                          	if ((x <= -7.5e-78) || !(x <= 7.2e-12))
                          		tmp = Float64(Float64(Float64(-x) / tan(B)) + (B ^ -1.0));
                          	else
                          		tmp = Float64(sqrt((fma(F, F, 2.0) ^ -1.0)) * Float64(F / sin(B)));
                          	end
                          	return tmp
                          end
                          
                          code[F_, B_, x_] := If[Or[LessEqual[x, -7.5e-78], N[Not[LessEqual[x, 7.2e-12]], $MachinePrecision]], N[(N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision] + N[Power[B, -1.0], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;x \leq -7.5 \cdot 10^{-78} \lor \neg \left(x \leq 7.2 \cdot 10^{-12}\right):\\
                          \;\;\;\;\frac{-x}{\tan B} + {B}^{-1}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if x < -7.50000000000000041e-78 or 7.2e-12 < x

                            1. Initial program 80.7%

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

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

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

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

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

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

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

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

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

                                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x \cdot 1\right)}{\tan B}} + \frac{1}{\sin B} \]
                              6. *-rgt-identityN/A

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

                                \[\leadsto \frac{\color{blue}{-x}}{\tan B} + \frac{1}{\sin B} \]
                              8. lift-/.f6485.3

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

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

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

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

                              if -7.50000000000000041e-78 < x < 7.2e-12

                              1. Initial program 68.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 x around 0

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 13: 55.8% accurate, 1.6× speedup?

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

                              1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 0.14000000000000001 < B

                              1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x \cdot 1\right)}{\tan B}} + \frac{1}{\sin B} \]
                                6. *-rgt-identityN/A

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

                                  \[\leadsto \frac{\color{blue}{-x}}{\tan B} + \frac{1}{\sin B} \]
                                8. lift-/.f6456.8

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

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

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

                                  \[\leadsto \frac{-x}{\tan B} + \frac{1}{\color{blue}{B}} \]
                              10. Recombined 2 regimes into one program.
                              11. Final simplification51.0%

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

                              Alternative 14: 51.0% accurate, 1.8× speedup?

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

                                1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                  4. Applied rewrites39.1%

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

                                  if -7.6e18 < F < 5.39999999999999997e100

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 5.39999999999999997e100 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{1 - x}{B} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites44.5%

                                      \[\leadsto \frac{1 - x}{B} \]
                                  8. Recombined 3 regimes into one program.
                                  9. Final simplification46.0%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.6 \cdot 10^{+18}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 5.4 \cdot 10^{+100}:\\ \;\;\;\;\left(-\frac{\mathsf{fma}\left(\left(B \cdot B\right) \cdot x, -0.3333333333333333, x\right)}{B}\right) + \frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}} \cdot \mathsf{fma}\left(0.16666666666666666 \cdot F, B \cdot B, F\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                  10. Add Preprocessing

                                  Alternative 15: 51.0% accurate, 2.0× speedup?

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

                                    1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                      4. Applied rewrites39.1%

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

                                      if -7.6e18 < F < 5.39999999999999997e100

                                      1. Initial program 98.6%

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

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

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

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

                                      if 5.39999999999999997e100 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{1 - x}{B} \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites44.5%

                                          \[\leadsto \frac{1 - x}{B} \]
                                      8. Recombined 3 regimes into one program.
                                      9. Final simplification46.0%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.6 \cdot 10^{+18}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 5.4 \cdot 10^{+100}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}}, \mathsf{fma}\left(0.16666666666666666 \cdot F, B \cdot B, F\right), \left(0.3333333333333333 \cdot \left(B \cdot B\right)\right) \cdot x\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                      10. Add Preprocessing

                                      Alternative 16: 42.7% accurate, 2.3× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}}\\ \mathbf{if}\;F \leq -8.8 \cdot 10^{+18}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq -8 \cdot 10^{-185}:\\ \;\;\;\;\frac{t\_0 \cdot F}{B}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-164}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 32000000000:\\ \;\;\;\;t\_0 \cdot \frac{F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                      (FPCore (F B x)
                                       :precision binary64
                                       (let* ((t_0 (sqrt (pow (fma F F 2.0) -1.0))))
                                         (if (<= F -8.8e+18)
                                           (+ (- (/ x B)) (/ (- (* -0.16666666666666666 (* B B)) 1.0) B))
                                           (if (<= F -8e-185)
                                             (/ (* t_0 F) B)
                                             (if (<= F 2.4e-164)
                                               (/ (- x) B)
                                               (if (<= F 32000000000.0) (* t_0 (/ F B)) (/ (- 1.0 x) B)))))))
                                      double code(double F, double B, double x) {
                                      	double t_0 = sqrt(pow(fma(F, F, 2.0), -1.0));
                                      	double tmp;
                                      	if (F <= -8.8e+18) {
                                      		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                                      	} else if (F <= -8e-185) {
                                      		tmp = (t_0 * F) / B;
                                      	} else if (F <= 2.4e-164) {
                                      		tmp = -x / B;
                                      	} else if (F <= 32000000000.0) {
                                      		tmp = t_0 * (F / B);
                                      	} else {
                                      		tmp = (1.0 - x) / B;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(F, B, x)
                                      	t_0 = sqrt((fma(F, F, 2.0) ^ -1.0))
                                      	tmp = 0.0
                                      	if (F <= -8.8e+18)
                                      		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(-0.16666666666666666 * Float64(B * B)) - 1.0) / B));
                                      	elseif (F <= -8e-185)
                                      		tmp = Float64(Float64(t_0 * F) / B);
                                      	elseif (F <= 2.4e-164)
                                      		tmp = Float64(Float64(-x) / B);
                                      	elseif (F <= 32000000000.0)
                                      		tmp = Float64(t_0 * Float64(F / B));
                                      	else
                                      		tmp = Float64(Float64(1.0 - x) / B);
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -8.8e+18], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8e-185], N[(N[(t$95$0 * F), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.4e-164], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 32000000000.0], N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_0 := \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}}\\
                                      \mathbf{if}\;F \leq -8.8 \cdot 10^{+18}:\\
                                      \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\
                                      
                                      \mathbf{elif}\;F \leq -8 \cdot 10^{-185}:\\
                                      \;\;\;\;\frac{t\_0 \cdot F}{B}\\
                                      
                                      \mathbf{elif}\;F \leq 2.4 \cdot 10^{-164}:\\
                                      \;\;\;\;\frac{-x}{B}\\
                                      
                                      \mathbf{elif}\;F \leq 32000000000:\\
                                      \;\;\;\;t\_0 \cdot \frac{F}{B}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\frac{1 - x}{B}\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 5 regimes
                                      2. if F < -8.8e18

                                        1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                          4. Applied rewrites39.6%

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

                                          if -8.8e18 < F < -7.9999999999999999e-185

                                          1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                            11. +-commutativeN/A

                                              \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                            12. lower-fma.f6453.9

                                              \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                          5. Applied rewrites53.9%

                                            \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                          6. Taylor expanded in x around 0

                                            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{B} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites38.2%

                                              \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot F}{B} \]

                                            if -7.9999999999999999e-185 < F < 2.39999999999999983e-164

                                            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. lower--.f64N/A

                                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                              3. *-commutativeN/A

                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                              4. lower-*.f64N/A

                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                              5. lower-sqrt.f64N/A

                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                              6. lower-/.f64N/A

                                                \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                              7. associate-+r+N/A

                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                              8. +-commutativeN/A

                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                              9. unpow2N/A

                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                              10. lower-fma.f64N/A

                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                              11. +-commutativeN/A

                                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                              12. lower-fma.f6447.3

                                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                            5. Applied rewrites47.3%

                                              \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                            6. Taylor expanded in F around 0

                                              \[\leadsto \frac{-1 \cdot x}{B} \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites39.6%

                                                \[\leadsto \frac{-x}{B} \]

                                              if 2.39999999999999983e-164 < F < 3.2e10

                                              1. Initial program 99.3%

                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in B around 0

                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                              4. Step-by-step derivation
                                                1. lower-/.f64N/A

                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                2. lower--.f64N/A

                                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                3. *-commutativeN/A

                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                4. lower-*.f64N/A

                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                5. lower-sqrt.f64N/A

                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                6. lower-/.f64N/A

                                                  \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                7. associate-+r+N/A

                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                8. +-commutativeN/A

                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                9. unpow2N/A

                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                10. lower-fma.f64N/A

                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                11. +-commutativeN/A

                                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                12. lower-fma.f6447.9

                                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                              5. Applied rewrites47.9%

                                                \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                              6. Taylor expanded in x around 0

                                                \[\leadsto \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites32.7%

                                                  \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \color{blue}{\frac{F}{B}} \]

                                                if 3.2e10 < F

                                                1. Initial program 54.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. lower--.f64N/A

                                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                  3. *-commutativeN/A

                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                  4. lower-*.f64N/A

                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                  5. lower-sqrt.f64N/A

                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                  6. lower-/.f64N/A

                                                    \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                  7. associate-+r+N/A

                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                  8. +-commutativeN/A

                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                  9. unpow2N/A

                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                  10. lower-fma.f64N/A

                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                  11. +-commutativeN/A

                                                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                  12. lower-fma.f6437.6

                                                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                5. Applied rewrites37.6%

                                                  \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                6. Taylor expanded in F around inf

                                                  \[\leadsto \frac{1 - x}{B} \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites46.0%

                                                    \[\leadsto \frac{1 - x}{B} \]
                                                8. Recombined 5 regimes into one program.
                                                9. Final simplification40.7%

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8.8 \cdot 10^{+18}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq -8 \cdot 10^{-185}:\\ \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot F}{B}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-164}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 32000000000:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                                10. Add Preprocessing

                                                Alternative 17: 42.7% accurate, 2.3× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B}\\ \mathbf{if}\;F \leq -8.8 \cdot 10^{+18}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq -8 \cdot 10^{-185}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-164}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 32000000000:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                (FPCore (F B x)
                                                 :precision binary64
                                                 (let* ((t_0 (* (sqrt (pow (fma F F 2.0) -1.0)) (/ F B))))
                                                   (if (<= F -8.8e+18)
                                                     (+ (- (/ x B)) (/ (- (* -0.16666666666666666 (* B B)) 1.0) B))
                                                     (if (<= F -8e-185)
                                                       t_0
                                                       (if (<= F 2.4e-164)
                                                         (/ (- x) B)
                                                         (if (<= F 32000000000.0) t_0 (/ (- 1.0 x) B)))))))
                                                double code(double F, double B, double x) {
                                                	double t_0 = sqrt(pow(fma(F, F, 2.0), -1.0)) * (F / B);
                                                	double tmp;
                                                	if (F <= -8.8e+18) {
                                                		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                                                	} else if (F <= -8e-185) {
                                                		tmp = t_0;
                                                	} else if (F <= 2.4e-164) {
                                                		tmp = -x / B;
                                                	} else if (F <= 32000000000.0) {
                                                		tmp = t_0;
                                                	} else {
                                                		tmp = (1.0 - x) / B;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(F, B, x)
                                                	t_0 = Float64(sqrt((fma(F, F, 2.0) ^ -1.0)) * Float64(F / B))
                                                	tmp = 0.0
                                                	if (F <= -8.8e+18)
                                                		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(-0.16666666666666666 * Float64(B * B)) - 1.0) / B));
                                                	elseif (F <= -8e-185)
                                                		tmp = t_0;
                                                	elseif (F <= 2.4e-164)
                                                		tmp = Float64(Float64(-x) / B);
                                                	elseif (F <= 32000000000.0)
                                                		tmp = t_0;
                                                	else
                                                		tmp = Float64(Float64(1.0 - x) / B);
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.8e+18], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8e-185], t$95$0, If[LessEqual[F, 2.4e-164], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 32000000000.0], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_0 := \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B}\\
                                                \mathbf{if}\;F \leq -8.8 \cdot 10^{+18}:\\
                                                \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\
                                                
                                                \mathbf{elif}\;F \leq -8 \cdot 10^{-185}:\\
                                                \;\;\;\;t\_0\\
                                                
                                                \mathbf{elif}\;F \leq 2.4 \cdot 10^{-164}:\\
                                                \;\;\;\;\frac{-x}{B}\\
                                                
                                                \mathbf{elif}\;F \leq 32000000000:\\
                                                \;\;\;\;t\_0\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\frac{1 - x}{B}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 4 regimes
                                                2. if F < -8.8e18

                                                  1. Initial program 56.9%

                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                  2. Add Preprocessing
                                                  3. Taylor expanded in B around 0

                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
                                                  4. Step-by-step derivation
                                                    1. *-commutativeN/A

                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                    2. associate-*l*N/A

                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                    3. associate-*r*N/A

                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                    4. *-commutativeN/A

                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                    5. +-commutativeN/A

                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                    6. lower-/.f64N/A

                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
                                                  5. Applied rewrites30.6%

                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(0.16666666666666666 \cdot F, B \cdot B, F\right)}{B}} \]
                                                  6. Taylor expanded in F around -inf

                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites51.0%

                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                                    2. Taylor expanded in B around 0

                                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{-1}{6} \cdot \left(B \cdot B\right) - 1}{B} \]
                                                    3. Step-by-step derivation
                                                      1. lower-/.f6439.6

                                                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                                    4. Applied rewrites39.6%

                                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]

                                                    if -8.8e18 < F < -7.9999999999999999e-185 or 2.39999999999999983e-164 < F < 3.2e10

                                                    1. Initial program 99.3%

                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                    2. Add Preprocessing
                                                    3. Taylor expanded in B around 0

                                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                    4. Step-by-step derivation
                                                      1. lower-/.f64N/A

                                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                      2. lower--.f64N/A

                                                        \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                      3. *-commutativeN/A

                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                      4. lower-*.f64N/A

                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                      5. lower-sqrt.f64N/A

                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                      6. lower-/.f64N/A

                                                        \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                      7. associate-+r+N/A

                                                        \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                      8. +-commutativeN/A

                                                        \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                      9. unpow2N/A

                                                        \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                      10. lower-fma.f64N/A

                                                        \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                      11. +-commutativeN/A

                                                        \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                      12. lower-fma.f6451.4

                                                        \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                    5. Applied rewrites51.4%

                                                      \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                    6. Taylor expanded in x around 0

                                                      \[\leadsto \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}} \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites35.9%

                                                        \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \color{blue}{\frac{F}{B}} \]

                                                      if -7.9999999999999999e-185 < F < 2.39999999999999983e-164

                                                      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. lower--.f64N/A

                                                          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                        3. *-commutativeN/A

                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                        4. lower-*.f64N/A

                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                        5. lower-sqrt.f64N/A

                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                        6. lower-/.f64N/A

                                                          \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                        7. associate-+r+N/A

                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                        8. +-commutativeN/A

                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                        9. unpow2N/A

                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                        10. lower-fma.f64N/A

                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                        11. +-commutativeN/A

                                                          \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                        12. lower-fma.f6447.3

                                                          \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                      5. Applied rewrites47.3%

                                                        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                      6. Taylor expanded in F around 0

                                                        \[\leadsto \frac{-1 \cdot x}{B} \]
                                                      7. Step-by-step derivation
                                                        1. Applied rewrites39.6%

                                                          \[\leadsto \frac{-x}{B} \]

                                                        if 3.2e10 < F

                                                        1. Initial program 54.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. lower--.f64N/A

                                                            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                          3. *-commutativeN/A

                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                          4. lower-*.f64N/A

                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                          5. lower-sqrt.f64N/A

                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                          6. lower-/.f64N/A

                                                            \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                          7. associate-+r+N/A

                                                            \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                          8. +-commutativeN/A

                                                            \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                          9. unpow2N/A

                                                            \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                          10. lower-fma.f64N/A

                                                            \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                          11. +-commutativeN/A

                                                            \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                          12. lower-fma.f6437.6

                                                            \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                        5. Applied rewrites37.6%

                                                          \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                        6. Taylor expanded in F around inf

                                                          \[\leadsto \frac{1 - x}{B} \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites46.0%

                                                            \[\leadsto \frac{1 - x}{B} \]
                                                        8. Recombined 4 regimes into one program.
                                                        9. Final simplification40.7%

                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8.8 \cdot 10^{+18}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq -8 \cdot 10^{-185}:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-164}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 32000000000:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                                        10. Add Preprocessing

                                                        Alternative 18: 51.2% accurate, 2.4× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.02 \cdot 10^{+121}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 5000000:\\ \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                        (FPCore (F B x)
                                                         :precision binary64
                                                         (if (<= F -1.02e+121)
                                                           (+ (- (/ x B)) (/ (- (* -0.16666666666666666 (* B B)) 1.0) B))
                                                           (if (<= F 5000000.0)
                                                             (/ (- (* (sqrt (pow (fma F F (fma 2.0 x 2.0)) -1.0)) F) x) B)
                                                             (/ (- 1.0 x) B))))
                                                        double code(double F, double B, double x) {
                                                        	double tmp;
                                                        	if (F <= -1.02e+121) {
                                                        		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                                                        	} else if (F <= 5000000.0) {
                                                        		tmp = ((sqrt(pow(fma(F, F, fma(2.0, x, 2.0)), -1.0)) * F) - x) / B;
                                                        	} else {
                                                        		tmp = (1.0 - x) / B;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        function code(F, B, x)
                                                        	tmp = 0.0
                                                        	if (F <= -1.02e+121)
                                                        		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(-0.16666666666666666 * Float64(B * B)) - 1.0) / B));
                                                        	elseif (F <= 5000000.0)
                                                        		tmp = Float64(Float64(Float64(sqrt((fma(F, F, fma(2.0, x, 2.0)) ^ -1.0)) * F) - x) / B);
                                                        	else
                                                        		tmp = Float64(Float64(1.0 - x) / B);
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        code[F_, B_, x_] := If[LessEqual[F, -1.02e+121], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5000000.0], N[(N[(N[(N[Sqrt[N[Power[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        \mathbf{if}\;F \leq -1.02 \cdot 10^{+121}:\\
                                                        \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\
                                                        
                                                        \mathbf{elif}\;F \leq 5000000:\\
                                                        \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}} \cdot F - x}{B}\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\frac{1 - x}{B}\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 3 regimes
                                                        2. if F < -1.02000000000000005e121

                                                          1. Initial program 44.5%

                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in B around 0

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
                                                          4. Step-by-step derivation
                                                            1. *-commutativeN/A

                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                            2. associate-*l*N/A

                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                            3. associate-*r*N/A

                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                            4. *-commutativeN/A

                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                            5. +-commutativeN/A

                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                            6. lower-/.f64N/A

                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
                                                          5. Applied rewrites20.0%

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(0.16666666666666666 \cdot F, B \cdot B, F\right)}{B}} \]
                                                          6. Taylor expanded in F around -inf

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites49.0%

                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                                            2. Taylor expanded in B around 0

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{-1}{6} \cdot \left(B \cdot B\right) - 1}{B} \]
                                                            3. Step-by-step derivation
                                                              1. lower-/.f6436.8

                                                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                                            4. Applied rewrites36.8%

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]

                                                            if -1.02000000000000005e121 < F < 5e6

                                                            1. Initial program 97.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. lower--.f64N/A

                                                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                              3. *-commutativeN/A

                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                              4. lower-*.f64N/A

                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                              5. lower-sqrt.f64N/A

                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                              6. lower-/.f64N/A

                                                                \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                              7. associate-+r+N/A

                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                              8. +-commutativeN/A

                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                              9. unpow2N/A

                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                              10. lower-fma.f64N/A

                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                              11. +-commutativeN/A

                                                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                              12. lower-fma.f6449.6

                                                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                            5. Applied rewrites49.6%

                                                              \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]

                                                            if 5e6 < F

                                                            1. Initial program 54.8%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Add Preprocessing
                                                            3. Taylor expanded in B around 0

                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                            4. Step-by-step derivation
                                                              1. lower-/.f64N/A

                                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                              2. lower--.f64N/A

                                                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                              3. *-commutativeN/A

                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                              4. lower-*.f64N/A

                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                              5. lower-sqrt.f64N/A

                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                              6. lower-/.f64N/A

                                                                \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                              7. associate-+r+N/A

                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                              8. +-commutativeN/A

                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                              9. unpow2N/A

                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                              10. lower-fma.f64N/A

                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                              11. +-commutativeN/A

                                                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                              12. lower-fma.f6437.2

                                                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                            5. Applied rewrites37.2%

                                                              \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                            6. Taylor expanded in F around inf

                                                              \[\leadsto \frac{1 - x}{B} \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites45.5%

                                                                \[\leadsto \frac{1 - x}{B} \]
                                                            8. Recombined 3 regimes into one program.
                                                            9. Final simplification46.0%

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.02 \cdot 10^{+121}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 5000000:\\ \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                                            10. Add Preprocessing

                                                            Alternative 19: 49.9% accurate, 2.5× speedup?

                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.3 \cdot 10^{+30}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 8 \cdot 10^{+25}:\\ \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                            (FPCore (F B x)
                                                             :precision binary64
                                                             (if (<= F -3.3e+30)
                                                               (+ (- (/ x B)) (/ (- (* -0.16666666666666666 (* B B)) 1.0) B))
                                                               (if (<= F 8e+25)
                                                                 (/ (- (* (sqrt (pow (fma 2.0 x 2.0) -1.0)) F) x) B)
                                                                 (/ (- 1.0 x) B))))
                                                            double code(double F, double B, double x) {
                                                            	double tmp;
                                                            	if (F <= -3.3e+30) {
                                                            		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                                                            	} else if (F <= 8e+25) {
                                                            		tmp = ((sqrt(pow(fma(2.0, x, 2.0), -1.0)) * F) - x) / B;
                                                            	} else {
                                                            		tmp = (1.0 - x) / B;
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            function code(F, B, x)
                                                            	tmp = 0.0
                                                            	if (F <= -3.3e+30)
                                                            		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(-0.16666666666666666 * Float64(B * B)) - 1.0) / B));
                                                            	elseif (F <= 8e+25)
                                                            		tmp = Float64(Float64(Float64(sqrt((fma(2.0, x, 2.0) ^ -1.0)) * F) - x) / B);
                                                            	else
                                                            		tmp = Float64(Float64(1.0 - x) / B);
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            code[F_, B_, x_] := If[LessEqual[F, -3.3e+30], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8e+25], N[(N[(N[(N[Sqrt[N[Power[N[(2.0 * x + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            \mathbf{if}\;F \leq -3.3 \cdot 10^{+30}:\\
                                                            \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\
                                                            
                                                            \mathbf{elif}\;F \leq 8 \cdot 10^{+25}:\\
                                                            \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}} \cdot F - x}{B}\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\frac{1 - x}{B}\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 3 regimes
                                                            2. if F < -3.30000000000000026e30

                                                              1. Initial program 56.2%

                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              2. Add Preprocessing
                                                              3. Taylor expanded in B around 0

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
                                                              4. Step-by-step derivation
                                                                1. *-commutativeN/A

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                                2. associate-*l*N/A

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                                3. associate-*r*N/A

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                                4. *-commutativeN/A

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                                5. +-commutativeN/A

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                6. lower-/.f64N/A

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
                                                              5. Applied rewrites29.6%

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(0.16666666666666666 \cdot F, B \cdot B, F\right)}{B}} \]
                                                              6. Taylor expanded in F around -inf

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites50.2%

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                                                2. Taylor expanded in B around 0

                                                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{-1}{6} \cdot \left(B \cdot B\right) - 1}{B} \]
                                                                3. Step-by-step derivation
                                                                  1. lower-/.f6440.1

                                                                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                                                4. Applied rewrites40.1%

                                                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]

                                                                if -3.30000000000000026e30 < F < 8.00000000000000072e25

                                                                1. Initial program 99.3%

                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in B around 0

                                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                4. Step-by-step derivation
                                                                  1. lower-/.f64N/A

                                                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                  2. lower--.f64N/A

                                                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                  3. *-commutativeN/A

                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                  4. lower-*.f64N/A

                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                  5. lower-sqrt.f64N/A

                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                  6. lower-/.f64N/A

                                                                    \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                  7. associate-+r+N/A

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                  8. +-commutativeN/A

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                  9. unpow2N/A

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                  10. lower-fma.f64N/A

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                  11. +-commutativeN/A

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                  12. lower-fma.f6449.3

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                5. Applied rewrites49.3%

                                                                  \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                6. Taylor expanded in F around 0

                                                                  \[\leadsto \frac{\sqrt{\frac{1}{2 + 2 \cdot x}} \cdot F - x}{B} \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites49.1%

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}} \cdot F - x}{B} \]

                                                                  if 8.00000000000000072e25 < F

                                                                  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. lower--.f64N/A

                                                                      \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                    3. *-commutativeN/A

                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                    4. lower-*.f64N/A

                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                    5. lower-sqrt.f64N/A

                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                    6. lower-/.f64N/A

                                                                      \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                    7. associate-+r+N/A

                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                    8. +-commutativeN/A

                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                    9. unpow2N/A

                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                    10. lower-fma.f64N/A

                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                    11. +-commutativeN/A

                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                    12. lower-fma.f6437.2

                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                  5. Applied rewrites37.2%

                                                                    \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                  6. Taylor expanded in F around inf

                                                                    \[\leadsto \frac{1 - x}{B} \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites45.9%

                                                                      \[\leadsto \frac{1 - x}{B} \]
                                                                  8. Recombined 3 regimes into one program.
                                                                  9. Final simplification45.8%

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.3 \cdot 10^{+30}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 8 \cdot 10^{+25}:\\ \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                                                  10. Add Preprocessing

                                                                  Alternative 20: 42.0% accurate, 7.8× speedup?

                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -8 \cdot 10^{-151}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 3.6 \cdot 10^{-162}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                                  (FPCore (F B x)
                                                                   :precision binary64
                                                                   (if (<= F -8e-151)
                                                                     (+ (- (/ x B)) (/ (- (* -0.16666666666666666 (* B B)) 1.0) B))
                                                                     (if (<= F 3.6e-162) (/ (- x) B) (/ (- 1.0 x) B))))
                                                                  double code(double F, double B, double x) {
                                                                  	double tmp;
                                                                  	if (F <= -8e-151) {
                                                                  		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                                                                  	} else if (F <= 3.6e-162) {
                                                                  		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 <= (-8d-151)) then
                                                                          tmp = -(x / b) + ((((-0.16666666666666666d0) * (b * b)) - 1.0d0) / b)
                                                                      else if (f <= 3.6d-162) 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 <= -8e-151) {
                                                                  		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                                                                  	} else if (F <= 3.6e-162) {
                                                                  		tmp = -x / B;
                                                                  	} else {
                                                                  		tmp = (1.0 - x) / B;
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  def code(F, B, x):
                                                                  	tmp = 0
                                                                  	if F <= -8e-151:
                                                                  		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B)
                                                                  	elif F <= 3.6e-162:
                                                                  		tmp = -x / B
                                                                  	else:
                                                                  		tmp = (1.0 - x) / B
                                                                  	return tmp
                                                                  
                                                                  function code(F, B, x)
                                                                  	tmp = 0.0
                                                                  	if (F <= -8e-151)
                                                                  		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(-0.16666666666666666 * Float64(B * B)) - 1.0) / B));
                                                                  	elseif (F <= 3.6e-162)
                                                                  		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 <= -8e-151)
                                                                  		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                                                                  	elseif (F <= 3.6e-162)
                                                                  		tmp = -x / B;
                                                                  	else
                                                                  		tmp = (1.0 - x) / B;
                                                                  	end
                                                                  	tmp_2 = tmp;
                                                                  end
                                                                  
                                                                  code[F_, B_, x_] := If[LessEqual[F, -8e-151], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.6e-162], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                                  
                                                                  \begin{array}{l}
                                                                  
                                                                  \\
                                                                  \begin{array}{l}
                                                                  \mathbf{if}\;F \leq -8 \cdot 10^{-151}:\\
                                                                  \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\
                                                                  
                                                                  \mathbf{elif}\;F \leq 3.6 \cdot 10^{-162}:\\
                                                                  \;\;\;\;\frac{-x}{B}\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;\frac{1 - x}{B}\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 3 regimes
                                                                  2. if F < -7.9999999999999995e-151

                                                                    1. Initial program 69.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(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
                                                                    4. Step-by-step derivation
                                                                      1. *-commutativeN/A

                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                                      2. associate-*l*N/A

                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                                      3. associate-*r*N/A

                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                                      4. *-commutativeN/A

                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                                      5. +-commutativeN/A

                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                      6. lower-/.f64N/A

                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
                                                                    5. Applied rewrites39.6%

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(0.16666666666666666 \cdot F, B \cdot B, F\right)}{B}} \]
                                                                    6. Taylor expanded in F around -inf

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                                                    7. Step-by-step derivation
                                                                      1. Applied rewrites44.7%

                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                                                      2. Taylor expanded in B around 0

                                                                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{-1}{6} \cdot \left(B \cdot B\right) - 1}{B} \]
                                                                      3. Step-by-step derivation
                                                                        1. lower-/.f6433.6

                                                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                                                      4. Applied rewrites33.6%

                                                                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]

                                                                      if -7.9999999999999995e-151 < F < 3.5999999999999998e-162

                                                                      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. lower--.f64N/A

                                                                          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                        3. *-commutativeN/A

                                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                        4. lower-*.f64N/A

                                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                        5. lower-sqrt.f64N/A

                                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                        6. lower-/.f64N/A

                                                                          \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                        7. associate-+r+N/A

                                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                        8. +-commutativeN/A

                                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                        9. unpow2N/A

                                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                        10. lower-fma.f64N/A

                                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                        11. +-commutativeN/A

                                                                          \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                        12. lower-fma.f6451.5

                                                                          \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                      5. Applied rewrites51.5%

                                                                        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                      6. Taylor expanded in F around 0

                                                                        \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                      7. Step-by-step derivation
                                                                        1. Applied rewrites36.9%

                                                                          \[\leadsto \frac{-x}{B} \]

                                                                        if 3.5999999999999998e-162 < F

                                                                        1. Initial program 65.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. lower--.f64N/A

                                                                            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                          3. *-commutativeN/A

                                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                          4. lower-*.f64N/A

                                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                          5. lower-sqrt.f64N/A

                                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                          6. lower-/.f64N/A

                                                                            \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                          7. associate-+r+N/A

                                                                            \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                          8. +-commutativeN/A

                                                                            \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                          9. unpow2N/A

                                                                            \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                          10. lower-fma.f64N/A

                                                                            \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                          11. +-commutativeN/A

                                                                            \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                          12. lower-fma.f6440.1

                                                                            \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                        5. Applied rewrites40.1%

                                                                          \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                        6. Taylor expanded in F around inf

                                                                          \[\leadsto \frac{1 - x}{B} \]
                                                                        7. Step-by-step derivation
                                                                          1. Applied rewrites38.7%

                                                                            \[\leadsto \frac{1 - x}{B} \]
                                                                        8. Recombined 3 regimes into one program.
                                                                        9. Add Preprocessing

                                                                        Alternative 21: 42.1% accurate, 13.6× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -5.45 \cdot 10^{-151}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3.6 \cdot 10^{-162}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                                        (FPCore (F B x)
                                                                         :precision binary64
                                                                         (if (<= F -5.45e-151)
                                                                           (/ (- -1.0 x) B)
                                                                           (if (<= F 3.6e-162) (/ (- x) B) (/ (- 1.0 x) B))))
                                                                        double code(double F, double B, double x) {
                                                                        	double tmp;
                                                                        	if (F <= -5.45e-151) {
                                                                        		tmp = (-1.0 - x) / B;
                                                                        	} else if (F <= 3.6e-162) {
                                                                        		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 <= (-5.45d-151)) then
                                                                                tmp = ((-1.0d0) - x) / b
                                                                            else if (f <= 3.6d-162) 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 <= -5.45e-151) {
                                                                        		tmp = (-1.0 - x) / B;
                                                                        	} else if (F <= 3.6e-162) {
                                                                        		tmp = -x / B;
                                                                        	} else {
                                                                        		tmp = (1.0 - x) / B;
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        def code(F, B, x):
                                                                        	tmp = 0
                                                                        	if F <= -5.45e-151:
                                                                        		tmp = (-1.0 - x) / B
                                                                        	elif F <= 3.6e-162:
                                                                        		tmp = -x / B
                                                                        	else:
                                                                        		tmp = (1.0 - x) / B
                                                                        	return tmp
                                                                        
                                                                        function code(F, B, x)
                                                                        	tmp = 0.0
                                                                        	if (F <= -5.45e-151)
                                                                        		tmp = Float64(Float64(-1.0 - x) / B);
                                                                        	elseif (F <= 3.6e-162)
                                                                        		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 <= -5.45e-151)
                                                                        		tmp = (-1.0 - x) / B;
                                                                        	elseif (F <= 3.6e-162)
                                                                        		tmp = -x / B;
                                                                        	else
                                                                        		tmp = (1.0 - x) / B;
                                                                        	end
                                                                        	tmp_2 = tmp;
                                                                        end
                                                                        
                                                                        code[F_, B_, x_] := If[LessEqual[F, -5.45e-151], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.6e-162], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                                        
                                                                        \begin{array}{l}
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        \mathbf{if}\;F \leq -5.45 \cdot 10^{-151}:\\
                                                                        \;\;\;\;\frac{-1 - x}{B}\\
                                                                        
                                                                        \mathbf{elif}\;F \leq 3.6 \cdot 10^{-162}:\\
                                                                        \;\;\;\;\frac{-x}{B}\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;\frac{1 - x}{B}\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 3 regimes
                                                                        2. if F < -5.45000000000000033e-151

                                                                          1. Initial program 69.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. lower--.f64N/A

                                                                              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                            3. *-commutativeN/A

                                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                            4. lower-*.f64N/A

                                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                            5. lower-sqrt.f64N/A

                                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                            6. lower-/.f64N/A

                                                                              \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                            7. associate-+r+N/A

                                                                              \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                            8. +-commutativeN/A

                                                                              \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                            9. unpow2N/A

                                                                              \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                            10. lower-fma.f64N/A

                                                                              \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                            11. +-commutativeN/A

                                                                              \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                            12. lower-fma.f6432.4

                                                                              \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                          5. Applied rewrites32.4%

                                                                            \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                          6. Taylor expanded in F around -inf

                                                                            \[\leadsto \frac{-1 - x}{B} \]
                                                                          7. Step-by-step derivation
                                                                            1. Applied rewrites33.4%

                                                                              \[\leadsto \frac{-1 - x}{B} \]

                                                                            if -5.45000000000000033e-151 < F < 3.5999999999999998e-162

                                                                            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. lower--.f64N/A

                                                                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                              3. *-commutativeN/A

                                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                              4. lower-*.f64N/A

                                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                              5. lower-sqrt.f64N/A

                                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                              6. lower-/.f64N/A

                                                                                \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                              7. associate-+r+N/A

                                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                              8. +-commutativeN/A

                                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                              9. unpow2N/A

                                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                              10. lower-fma.f64N/A

                                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                              11. +-commutativeN/A

                                                                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                              12. lower-fma.f6451.5

                                                                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                            5. Applied rewrites51.5%

                                                                              \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                            6. Taylor expanded in F around 0

                                                                              \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                            7. Step-by-step derivation
                                                                              1. Applied rewrites36.9%

                                                                                \[\leadsto \frac{-x}{B} \]

                                                                              if 3.5999999999999998e-162 < F

                                                                              1. Initial program 65.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. lower--.f64N/A

                                                                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                                3. *-commutativeN/A

                                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                4. lower-*.f64N/A

                                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                5. lower-sqrt.f64N/A

                                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                6. lower-/.f64N/A

                                                                                  \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                7. associate-+r+N/A

                                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                                8. +-commutativeN/A

                                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                9. unpow2N/A

                                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                                10. lower-fma.f64N/A

                                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                11. +-commutativeN/A

                                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                                12. lower-fma.f6440.1

                                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                              5. Applied rewrites40.1%

                                                                                \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                              6. Taylor expanded in F around inf

                                                                                \[\leadsto \frac{1 - x}{B} \]
                                                                              7. Step-by-step derivation
                                                                                1. Applied rewrites38.7%

                                                                                  \[\leadsto \frac{1 - x}{B} \]
                                                                              8. Recombined 3 regimes into one program.
                                                                              9. Add Preprocessing

                                                                              Alternative 22: 35.8% accurate, 17.5× speedup?

                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -5.45 \cdot 10^{-151}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \end{array} \]
                                                                              (FPCore (F B x)
                                                                               :precision binary64
                                                                               (if (<= F -5.45e-151) (/ (- -1.0 x) B) (/ (- x) B)))
                                                                              double code(double F, double B, double x) {
                                                                              	double tmp;
                                                                              	if (F <= -5.45e-151) {
                                                                              		tmp = (-1.0 - x) / B;
                                                                              	} else {
                                                                              		tmp = -x / B;
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              real(8) function code(f, b, x)
                                                                                  real(8), intent (in) :: f
                                                                                  real(8), intent (in) :: b
                                                                                  real(8), intent (in) :: x
                                                                                  real(8) :: tmp
                                                                                  if (f <= (-5.45d-151)) then
                                                                                      tmp = ((-1.0d0) - x) / b
                                                                                  else
                                                                                      tmp = -x / b
                                                                                  end if
                                                                                  code = tmp
                                                                              end function
                                                                              
                                                                              public static double code(double F, double B, double x) {
                                                                              	double tmp;
                                                                              	if (F <= -5.45e-151) {
                                                                              		tmp = (-1.0 - x) / B;
                                                                              	} else {
                                                                              		tmp = -x / B;
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              def code(F, B, x):
                                                                              	tmp = 0
                                                                              	if F <= -5.45e-151:
                                                                              		tmp = (-1.0 - x) / B
                                                                              	else:
                                                                              		tmp = -x / B
                                                                              	return tmp
                                                                              
                                                                              function code(F, B, x)
                                                                              	tmp = 0.0
                                                                              	if (F <= -5.45e-151)
                                                                              		tmp = Float64(Float64(-1.0 - x) / B);
                                                                              	else
                                                                              		tmp = Float64(Float64(-x) / B);
                                                                              	end
                                                                              	return tmp
                                                                              end
                                                                              
                                                                              function tmp_2 = code(F, B, x)
                                                                              	tmp = 0.0;
                                                                              	if (F <= -5.45e-151)
                                                                              		tmp = (-1.0 - x) / B;
                                                                              	else
                                                                              		tmp = -x / B;
                                                                              	end
                                                                              	tmp_2 = tmp;
                                                                              end
                                                                              
                                                                              code[F_, B_, x_] := If[LessEqual[F, -5.45e-151], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
                                                                              
                                                                              \begin{array}{l}
                                                                              
                                                                              \\
                                                                              \begin{array}{l}
                                                                              \mathbf{if}\;F \leq -5.45 \cdot 10^{-151}:\\
                                                                              \;\;\;\;\frac{-1 - x}{B}\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;\frac{-x}{B}\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Split input into 2 regimes
                                                                              2. if F < -5.45000000000000033e-151

                                                                                1. Initial program 69.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. lower--.f64N/A

                                                                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                                  3. *-commutativeN/A

                                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                  4. lower-*.f64N/A

                                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                  5. lower-sqrt.f64N/A

                                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                  6. lower-/.f64N/A

                                                                                    \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                  7. associate-+r+N/A

                                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                                  8. +-commutativeN/A

                                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                  9. unpow2N/A

                                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                                  10. lower-fma.f64N/A

                                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                  11. +-commutativeN/A

                                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                                  12. lower-fma.f6432.4

                                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                                5. Applied rewrites32.4%

                                                                                  \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                                6. Taylor expanded in F around -inf

                                                                                  \[\leadsto \frac{-1 - x}{B} \]
                                                                                7. Step-by-step derivation
                                                                                  1. Applied rewrites33.4%

                                                                                    \[\leadsto \frac{-1 - x}{B} \]

                                                                                  if -5.45000000000000033e-151 < F

                                                                                  1. Initial program 77.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. lower--.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                                    3. *-commutativeN/A

                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                    4. lower-*.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                    5. lower-sqrt.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                    6. lower-/.f64N/A

                                                                                      \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                    7. associate-+r+N/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                                    8. +-commutativeN/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                    9. unpow2N/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                                    10. lower-fma.f64N/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                    11. +-commutativeN/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                                    12. lower-fma.f6444.1

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                                  5. Applied rewrites44.1%

                                                                                    \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                                  6. Taylor expanded in F around 0

                                                                                    \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                                  7. Step-by-step derivation
                                                                                    1. Applied rewrites29.9%

                                                                                      \[\leadsto \frac{-x}{B} \]
                                                                                  8. Recombined 2 regimes into one program.
                                                                                  9. Add Preprocessing

                                                                                  Alternative 23: 29.4% accurate, 26.3× speedup?

                                                                                  \[\begin{array}{l} \\ \frac{-x}{B} \end{array} \]
                                                                                  (FPCore (F B x) :precision binary64 (/ (- x) B))
                                                                                  double code(double F, double B, double x) {
                                                                                  	return -x / B;
                                                                                  }
                                                                                  
                                                                                  real(8) function code(f, b, x)
                                                                                      real(8), intent (in) :: f
                                                                                      real(8), intent (in) :: b
                                                                                      real(8), intent (in) :: x
                                                                                      code = -x / b
                                                                                  end function
                                                                                  
                                                                                  public static double code(double F, double B, double x) {
                                                                                  	return -x / B;
                                                                                  }
                                                                                  
                                                                                  def code(F, B, x):
                                                                                  	return -x / B
                                                                                  
                                                                                  function code(F, B, x)
                                                                                  	return Float64(Float64(-x) / B)
                                                                                  end
                                                                                  
                                                                                  function tmp = code(F, B, x)
                                                                                  	tmp = -x / B;
                                                                                  end
                                                                                  
                                                                                  code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  
                                                                                  \\
                                                                                  \frac{-x}{B}
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Initial program 74.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. lower--.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                                    3. *-commutativeN/A

                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                    4. lower-*.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                    5. lower-sqrt.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                    6. lower-/.f64N/A

                                                                                      \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                    7. associate-+r+N/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                                    8. +-commutativeN/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                    9. unpow2N/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                                    10. lower-fma.f64N/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                    11. +-commutativeN/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                                    12. lower-fma.f6439.8

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                                  5. Applied rewrites39.8%

                                                                                    \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                                  6. Taylor expanded in F around 0

                                                                                    \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                                  7. Step-by-step derivation
                                                                                    1. Applied rewrites24.1%

                                                                                      \[\leadsto \frac{-x}{B} \]
                                                                                    2. Add Preprocessing

                                                                                    Reproduce

                                                                                    ?
                                                                                    herbie shell --seed 2024332 
                                                                                    (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))))))