VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.5% → 99.7%
Time: 13.8s
Alternatives: 28
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 28 alternatives:

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

Initial Program: 76.5% 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, 0.8× speedup?

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

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

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

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


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

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -7.6000000000000003e34 < F < 1e8

      1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

      if 1e8 < F

      1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 99.7% accurate, 0.8× speedup?

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

      1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -5.0000000000000004e43 < F < 1.35e8

        1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.35e8 < F

        1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 99.7% accurate, 0.8× speedup?

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

        1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -5.0000000000000004e43 < F < 1e8

          1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1e8 < F

          1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 99.7% accurate, 1.0× speedup?

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

          1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -5.0000000000000004e43 < F < 1.35e8

            1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 1.35e8 < F

            1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 5: 99.6% accurate, 1.0× speedup?

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

              1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -7.6000000000000003e34 < F < 1e3

                1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 1e3 < F

                1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 6: 92.0% accurate, 1.4× speedup?

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

                  1. Initial program 66.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -3.3e28 < F < -2.1000000000000002e-155 or 6.99999999999999979e-127 < F < 2e5

                    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -2.1000000000000002e-155 < F < 6.99999999999999979e-127

                    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 2e5 < F

                    1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 7: 82.2% accurate, 1.4× speedup?

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

                      1. Initial program 66.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -3.3e28 < F < -2.1000000000000002e-155 or 6.99999999999999979e-127 < F < 1.50000000000000013e154

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -2.1000000000000002e-155 < F < 6.99999999999999979e-127

                        1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.50000000000000013e154 < F

                        1. Initial program 25.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                          2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.3 \cdot 10^{+28}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.1 \cdot 10^{-155}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 7 \cdot 10^{-127}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}}}{B}, F, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 1.5 \cdot 10^{+154}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} - \frac{x}{\tan B}\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 8: 76.3% accurate, 1.4× speedup?

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

                          1. Initial program 56.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -4.79999999999999996e82 < F < -2.1000000000000002e-155 or 6.99999999999999979e-127 < F < 1.50000000000000013e154

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{\sin B}{F}} \]
                            7. Applied rewrites85.8%

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

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

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

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

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

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

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

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

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

                            if -2.1000000000000002e-155 < F < 6.99999999999999979e-127

                            1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 1.50000000000000013e154 < F

                            1. Initial program 25.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                              2. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4.8 \cdot 10^{+82}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, B \cdot B, -0.16666666666666666\right), B \cdot B, 1\right) \cdot B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.1 \cdot 10^{-155}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 7 \cdot 10^{-127}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}}}{B}, F, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 1.5 \cdot 10^{+154}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} - \frac{x}{\tan B}\\ \end{array} \]
                            10. Add Preprocessing

                            Alternative 9: 99.2% accurate, 1.4× speedup?

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

                              1. Initial program 69.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                if -1.4199999999999999 < F < 2.0499999999999998

                                1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{\frac{F}{\sqrt{\color{blue}{2 \cdot x + 2}}}}{\sin B} - \frac{x}{\tan B} \]
                                  3. lower-fma.f6499.6

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

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

                                if 2.0499999999999998 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 10: 99.1% accurate, 1.5× speedup?

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

                                  1. Initial program 69.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                    if -1.4199999999999999 < F < 1.3999999999999999

                                    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F}{\sin B} - \frac{x}{\tan B} \]
                                    10. Step-by-step derivation
                                      1. Applied rewrites99.2%

                                        \[\leadsto \frac{\sqrt{0.5} \cdot F}{\sin B} - \frac{x}{\tan B} \]

                                      if 1.3999999999999999 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 11: 69.5% accurate, 1.5× speedup?

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

                                        1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if -2.7e-10 < x < -3.5000000000000001e-154

                                          1. Initial program 75.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if -3.5000000000000001e-154 < x < 5.8000000000000003e-88

                                          1. Initial program 75.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 12: 52.1% accurate, 1.6× speedup?

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

                                          1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto -1 \cdot \frac{1 + x}{B} + \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}}} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites40.3%

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

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

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

                                              if -4.0000000000000001e-13 < F < 9.9999999999999993e44

                                              1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if 9.9999999999999993e44 < F

                                              1. Initial program 50.7%

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

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

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

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

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

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

                                                  \[\leadsto \left(-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 rewrites36.9%

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

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

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

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

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

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

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

                                              Alternative 13: 52.1% accurate, 1.6× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\ \;\;\;\;\left(1 + x\right) \cdot \left({\left(\left(F \cdot F\right) \cdot B\right)}^{-1} - {B}^{-1}\right)\\ \mathbf{elif}\;F \leq 7.2 \cdot 10^{+44}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}}, F, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \end{array} \]
                                              (FPCore (F B x)
                                               :precision binary64
                                               (if (<= F -4e-13)
                                                 (* (+ 1.0 x) (- (pow (* (* F F) B) -1.0) (pow B -1.0)))
                                                 (if (<= F 7.2e+44)
                                                   (/ (fma (sqrt (pow (fma F F 2.0) -1.0)) F (- x)) B)
                                                   (+ (- (/ x B)) (/ (fma (* B B) 0.16666666666666666 1.0) B)))))
                                              double code(double F, double B, double x) {
                                              	double tmp;
                                              	if (F <= -4e-13) {
                                              		tmp = (1.0 + x) * (pow(((F * F) * B), -1.0) - pow(B, -1.0));
                                              	} else if (F <= 7.2e+44) {
                                              		tmp = fma(sqrt(pow(fma(F, F, 2.0), -1.0)), F, -x) / B;
                                              	} else {
                                              		tmp = -(x / B) + (fma((B * B), 0.16666666666666666, 1.0) / B);
                                              	}
                                              	return tmp;
                                              }
                                              
                                              function code(F, B, x)
                                              	tmp = 0.0
                                              	if (F <= -4e-13)
                                              		tmp = Float64(Float64(1.0 + x) * Float64((Float64(Float64(F * F) * B) ^ -1.0) - (B ^ -1.0)));
                                              	elseif (F <= 7.2e+44)
                                              		tmp = Float64(fma(sqrt((fma(F, F, 2.0) ^ -1.0)), F, Float64(-x)) / B);
                                              	else
                                              		tmp = Float64(Float64(-Float64(x / B)) + Float64(fma(Float64(B * B), 0.16666666666666666, 1.0) / B));
                                              	end
                                              	return tmp
                                              end
                                              
                                              code[F_, B_, x_] := If[LessEqual[F, -4e-13], N[(N[(1.0 + x), $MachinePrecision] * N[(N[Power[N[(N[(F * F), $MachinePrecision] * B), $MachinePrecision], -1.0], $MachinePrecision] - N[Power[B, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.2e+44], N[(N[(N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * F + (-x)), $MachinePrecision] / B), $MachinePrecision], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(B * B), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              \mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\
                                              \;\;\;\;\left(1 + x\right) \cdot \left({\left(\left(F \cdot F\right) \cdot B\right)}^{-1} - {B}^{-1}\right)\\
                                              
                                              \mathbf{elif}\;F \leq 7.2 \cdot 10^{+44}:\\
                                              \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}}, F, -x\right)}{B}\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if F < -4.0000000000000001e-13

                                                1. Initial program 69.9%

                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in B around 0

                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                4. Step-by-step derivation
                                                  1. lower-/.f64N/A

                                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                  2. sub-negN/A

                                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                  3. *-commutativeN/A

                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                  4. lower-fma.f64N/A

                                                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                  5. lower-sqrt.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  6. lower-/.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  7. associate-+r+N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  8. +-commutativeN/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  9. unpow2N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  10. lower-fma.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  11. +-commutativeN/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  12. lower-fma.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  13. lower-neg.f6433.1

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                5. Applied rewrites33.1%

                                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                6. Taylor expanded in F around -inf

                                                  \[\leadsto -1 \cdot \frac{1 + x}{B} + \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}}} \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites40.3%

                                                    \[\leadsto \mathsf{fma}\left(\frac{0.5}{F \cdot F}, \color{blue}{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}, \frac{-1 - x}{B}\right) \]
                                                  2. Taylor expanded in x around 0

                                                    \[\leadsto \left(x \cdot \left(\frac{1}{B \cdot {F}^{2}} - \frac{1}{B}\right) + \frac{1}{B \cdot {F}^{2}}\right) - \frac{1}{\color{blue}{B}} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites45.1%

                                                      \[\leadsto \left(1 + x\right) \cdot \left(\frac{1}{\left(F \cdot F\right) \cdot B} - \color{blue}{\frac{1}{B}}\right) \]

                                                    if -4.0000000000000001e-13 < F < 7.2e44

                                                    1. Initial program 99.5%

                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                    2. Add Preprocessing
                                                    3. Taylor expanded in B around 0

                                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                    4. Step-by-step derivation
                                                      1. lower-/.f64N/A

                                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                      2. sub-negN/A

                                                        \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                      3. *-commutativeN/A

                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                      4. lower-fma.f64N/A

                                                        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                      5. lower-sqrt.f64N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      6. lower-/.f64N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      7. associate-+r+N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      8. +-commutativeN/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      9. unpow2N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      10. lower-fma.f64N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      11. +-commutativeN/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      12. lower-fma.f64N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      13. lower-neg.f6447.7

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                    5. Applied rewrites47.7%

                                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                    6. Taylor expanded in x around 0

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{2 + {F}^{2}}}, F, -x\right)}{B} \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites47.7%

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}, F, -x\right)}{B} \]

                                                      if 7.2e44 < F

                                                      1. Initial program 50.7%

                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in B around 0

                                                        \[\leadsto \left(-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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                        2. *-commutativeN/A

                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                        3. associate-*l*N/A

                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                        4. associate-*r*N/A

                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                        5. *-commutativeN/A

                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                        6. lower-/.f64N/A

                                                          \[\leadsto \left(-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 rewrites36.9%

                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                      6. Taylor expanded in F around inf

                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                      7. Step-by-step derivation
                                                        1. Applied rewrites63.1%

                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                        2. Taylor expanded in B around 0

                                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                        3. Step-by-step derivation
                                                          1. lower-/.f6456.2

                                                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                        4. Applied rewrites56.2%

                                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                      8. Recombined 3 regimes into one program.
                                                      9. Final simplification48.6%

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\ \;\;\;\;\left(1 + x\right) \cdot \left({\left(\left(F \cdot F\right) \cdot B\right)}^{-1} - {B}^{-1}\right)\\ \mathbf{elif}\;F \leq 7.2 \cdot 10^{+44}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}}, F, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \]
                                                      10. Add Preprocessing

                                                      Alternative 14: 51.9% accurate, 1.6× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\ \;\;\;\;\left(1 + x\right) \cdot \left({\left(\left(F \cdot F\right) \cdot B\right)}^{-1} - {B}^{-1}\right)\\ \mathbf{elif}\;F \leq 70:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}}, F, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \end{array} \]
                                                      (FPCore (F B x)
                                                       :precision binary64
                                                       (if (<= F -4e-13)
                                                         (* (+ 1.0 x) (- (pow (* (* F F) B) -1.0) (pow B -1.0)))
                                                         (if (<= F 70.0)
                                                           (/ (fma (sqrt (pow (fma 2.0 x 2.0) -1.0)) F (- x)) B)
                                                           (+ (- (/ x B)) (/ (fma (* B B) 0.16666666666666666 1.0) B)))))
                                                      double code(double F, double B, double x) {
                                                      	double tmp;
                                                      	if (F <= -4e-13) {
                                                      		tmp = (1.0 + x) * (pow(((F * F) * B), -1.0) - pow(B, -1.0));
                                                      	} else if (F <= 70.0) {
                                                      		tmp = fma(sqrt(pow(fma(2.0, x, 2.0), -1.0)), F, -x) / B;
                                                      	} else {
                                                      		tmp = -(x / B) + (fma((B * B), 0.16666666666666666, 1.0) / B);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      function code(F, B, x)
                                                      	tmp = 0.0
                                                      	if (F <= -4e-13)
                                                      		tmp = Float64(Float64(1.0 + x) * Float64((Float64(Float64(F * F) * B) ^ -1.0) - (B ^ -1.0)));
                                                      	elseif (F <= 70.0)
                                                      		tmp = Float64(fma(sqrt((fma(2.0, x, 2.0) ^ -1.0)), F, Float64(-x)) / B);
                                                      	else
                                                      		tmp = Float64(Float64(-Float64(x / B)) + Float64(fma(Float64(B * B), 0.16666666666666666, 1.0) / B));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      code[F_, B_, x_] := If[LessEqual[F, -4e-13], N[(N[(1.0 + x), $MachinePrecision] * N[(N[Power[N[(N[(F * F), $MachinePrecision] * B), $MachinePrecision], -1.0], $MachinePrecision] - N[Power[B, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 70.0], N[(N[(N[Sqrt[N[Power[N[(2.0 * x + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * F + (-x)), $MachinePrecision] / B), $MachinePrecision], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(B * B), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\
                                                      \;\;\;\;\left(1 + x\right) \cdot \left({\left(\left(F \cdot F\right) \cdot B\right)}^{-1} - {B}^{-1}\right)\\
                                                      
                                                      \mathbf{elif}\;F \leq 70:\\
                                                      \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}}, F, -x\right)}{B}\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 3 regimes
                                                      2. if F < -4.0000000000000001e-13

                                                        1. Initial program 69.9%

                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                        2. Add Preprocessing
                                                        3. Taylor expanded in B around 0

                                                          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                        4. Step-by-step derivation
                                                          1. lower-/.f64N/A

                                                            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                          2. sub-negN/A

                                                            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                          3. *-commutativeN/A

                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                          4. lower-fma.f64N/A

                                                            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                          5. lower-sqrt.f64N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          6. lower-/.f64N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          7. associate-+r+N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          8. +-commutativeN/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          9. unpow2N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          10. lower-fma.f64N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          11. +-commutativeN/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          12. lower-fma.f64N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          13. lower-neg.f6433.1

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                        5. Applied rewrites33.1%

                                                          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                        6. Taylor expanded in F around -inf

                                                          \[\leadsto -1 \cdot \frac{1 + x}{B} + \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}}} \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites40.3%

                                                            \[\leadsto \mathsf{fma}\left(\frac{0.5}{F \cdot F}, \color{blue}{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}, \frac{-1 - x}{B}\right) \]
                                                          2. Taylor expanded in x around 0

                                                            \[\leadsto \left(x \cdot \left(\frac{1}{B \cdot {F}^{2}} - \frac{1}{B}\right) + \frac{1}{B \cdot {F}^{2}}\right) - \frac{1}{\color{blue}{B}} \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites45.1%

                                                              \[\leadsto \left(1 + x\right) \cdot \left(\frac{1}{\left(F \cdot F\right) \cdot B} - \color{blue}{\frac{1}{B}}\right) \]

                                                            if -4.0000000000000001e-13 < F < 70

                                                            1. Initial program 99.5%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Add Preprocessing
                                                            3. Taylor expanded in B around 0

                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                            4. Step-by-step derivation
                                                              1. lower-/.f64N/A

                                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                              2. sub-negN/A

                                                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                              3. *-commutativeN/A

                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                              4. lower-fma.f64N/A

                                                                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                              5. lower-sqrt.f64N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              6. lower-/.f64N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              7. associate-+r+N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              8. +-commutativeN/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              9. unpow2N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              10. lower-fma.f64N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              11. +-commutativeN/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              12. lower-fma.f64N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              13. lower-neg.f6447.4

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                            5. Applied rewrites47.4%

                                                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                            6. Taylor expanded in F around 0

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{2 + 2 \cdot x}}, F, -x\right)}{B} \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites47.4%

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}, F, -x\right)}{B} \]

                                                              if 70 < F

                                                              1. Initial program 57.4%

                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              2. Add Preprocessing
                                                              3. Taylor expanded in B around 0

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
                                                              4. Step-by-step derivation
                                                                1. +-commutativeN/A

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                2. *-commutativeN/A

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                3. associate-*l*N/A

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                4. associate-*r*N/A

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                5. *-commutativeN/A

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                6. lower-/.f64N/A

                                                                  \[\leadsto \left(-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.0%

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                              6. Taylor expanded in F around inf

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites60.6%

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                2. Taylor expanded in B around 0

                                                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                3. Step-by-step derivation
                                                                  1. lower-/.f6454.7

                                                                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                4. Applied rewrites54.7%

                                                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                              8. Recombined 3 regimes into one program.
                                                              9. Final simplification48.3%

                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\ \;\;\;\;\left(1 + x\right) \cdot \left({\left(\left(F \cdot F\right) \cdot B\right)}^{-1} - {B}^{-1}\right)\\ \mathbf{elif}\;F \leq 70:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}}, F, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \]
                                                              10. Add Preprocessing

                                                              Alternative 15: 44.6% accurate, 1.6× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\ \;\;\;\;\left(1 + x\right) \cdot \left({\left(\left(F \cdot F\right) \cdot B\right)}^{-1} - {B}^{-1}\right)\\ \mathbf{elif}\;F \leq 4.05 \cdot 10^{-47}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \end{array} \]
                                                              (FPCore (F B x)
                                                               :precision binary64
                                                               (if (<= F -4e-13)
                                                                 (* (+ 1.0 x) (- (pow (* (* F F) B) -1.0) (pow B -1.0)))
                                                                 (if (<= F 4.05e-47)
                                                                   (/ (- x) B)
                                                                   (+ (- (/ x B)) (/ (fma (* B B) 0.16666666666666666 1.0) B)))))
                                                              double code(double F, double B, double x) {
                                                              	double tmp;
                                                              	if (F <= -4e-13) {
                                                              		tmp = (1.0 + x) * (pow(((F * F) * B), -1.0) - pow(B, -1.0));
                                                              	} else if (F <= 4.05e-47) {
                                                              		tmp = -x / B;
                                                              	} else {
                                                              		tmp = -(x / B) + (fma((B * B), 0.16666666666666666, 1.0) / B);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              function code(F, B, x)
                                                              	tmp = 0.0
                                                              	if (F <= -4e-13)
                                                              		tmp = Float64(Float64(1.0 + x) * Float64((Float64(Float64(F * F) * B) ^ -1.0) - (B ^ -1.0)));
                                                              	elseif (F <= 4.05e-47)
                                                              		tmp = Float64(Float64(-x) / B);
                                                              	else
                                                              		tmp = Float64(Float64(-Float64(x / B)) + Float64(fma(Float64(B * B), 0.16666666666666666, 1.0) / B));
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              code[F_, B_, x_] := If[LessEqual[F, -4e-13], N[(N[(1.0 + x), $MachinePrecision] * N[(N[Power[N[(N[(F * F), $MachinePrecision] * B), $MachinePrecision], -1.0], $MachinePrecision] - N[Power[B, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.05e-47], N[((-x) / B), $MachinePrecision], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(B * B), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              \mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\
                                                              \;\;\;\;\left(1 + x\right) \cdot \left({\left(\left(F \cdot F\right) \cdot B\right)}^{-1} - {B}^{-1}\right)\\
                                                              
                                                              \mathbf{elif}\;F \leq 4.05 \cdot 10^{-47}:\\
                                                              \;\;\;\;\frac{-x}{B}\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 3 regimes
                                                              2. if F < -4.0000000000000001e-13

                                                                1. Initial program 69.9%

                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in B around 0

                                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                4. Step-by-step derivation
                                                                  1. lower-/.f64N/A

                                                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                  2. sub-negN/A

                                                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                  3. *-commutativeN/A

                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  4. lower-fma.f64N/A

                                                                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                  5. lower-sqrt.f64N/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  6. lower-/.f64N/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  7. associate-+r+N/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  8. +-commutativeN/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  9. unpow2N/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  10. lower-fma.f64N/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  11. +-commutativeN/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  12. lower-fma.f64N/A

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                  13. lower-neg.f6433.1

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                5. Applied rewrites33.1%

                                                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                6. Taylor expanded in F around -inf

                                                                  \[\leadsto -1 \cdot \frac{1 + x}{B} + \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}}} \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites40.3%

                                                                    \[\leadsto \mathsf{fma}\left(\frac{0.5}{F \cdot F}, \color{blue}{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}, \frac{-1 - x}{B}\right) \]
                                                                  2. Taylor expanded in x around 0

                                                                    \[\leadsto \left(x \cdot \left(\frac{1}{B \cdot {F}^{2}} - \frac{1}{B}\right) + \frac{1}{B \cdot {F}^{2}}\right) - \frac{1}{\color{blue}{B}} \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites45.1%

                                                                      \[\leadsto \left(1 + x\right) \cdot \left(\frac{1}{\left(F \cdot F\right) \cdot B} - \color{blue}{\frac{1}{B}}\right) \]

                                                                    if -4.0000000000000001e-13 < F < 4.0500000000000002e-47

                                                                    1. Initial program 99.5%

                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    2. Add Preprocessing
                                                                    3. Taylor expanded in B around 0

                                                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                    4. Step-by-step derivation
                                                                      1. lower-/.f64N/A

                                                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                      2. sub-negN/A

                                                                        \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                      3. *-commutativeN/A

                                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      4. lower-fma.f64N/A

                                                                        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                      5. lower-sqrt.f64N/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      6. lower-/.f64N/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      7. associate-+r+N/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      8. +-commutativeN/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      9. unpow2N/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      10. lower-fma.f64N/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      11. +-commutativeN/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      12. lower-fma.f64N/A

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                      13. lower-neg.f6448.2

                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                    5. Applied rewrites48.2%

                                                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                    6. Taylor expanded in F around 0

                                                                      \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                    7. Step-by-step derivation
                                                                      1. Applied rewrites41.9%

                                                                        \[\leadsto \frac{-x}{B} \]

                                                                      if 4.0500000000000002e-47 < F

                                                                      1. Initial program 65.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                        2. *-commutativeN/A

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                        3. associate-*l*N/A

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                        4. associate-*r*N/A

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                        5. *-commutativeN/A

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                        6. lower-/.f64N/A

                                                                          \[\leadsto \left(-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 rewrites40.0%

                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                      6. Taylor expanded in F around inf

                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                      7. Step-by-step derivation
                                                                        1. Applied rewrites52.0%

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                        2. Taylor expanded in B around 0

                                                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                        3. Step-by-step derivation
                                                                          1. lower-/.f6447.1

                                                                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                        4. Applied rewrites47.1%

                                                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                      8. Recombined 3 regimes into one program.
                                                                      9. Final simplification44.4%

                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\ \;\;\;\;\left(1 + x\right) \cdot \left({\left(\left(F \cdot F\right) \cdot B\right)}^{-1} - {B}^{-1}\right)\\ \mathbf{elif}\;F \leq 4.05 \cdot 10^{-47}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \]
                                                                      10. Add Preprocessing

                                                                      Alternative 16: 74.3% accurate, 2.2× speedup?

                                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{-10} \lor \neg \left(x \leq 6.5 \cdot 10^{-88}\right):\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666 \cdot B, B, 1\right) \cdot B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \end{array} \end{array} \]
                                                                      (FPCore (F B x)
                                                                       :precision binary64
                                                                       (if (or (<= x -2.7e-10) (not (<= x 6.5e-88)))
                                                                         (- (/ -1.0 (* (fma (* -0.16666666666666666 B) B 1.0) B)) (/ x (tan B)))
                                                                         (- (/ (/ F (sin B)) (sqrt (fma 2.0 x (fma F F 2.0)))) (/ x B))))
                                                                      double code(double F, double B, double x) {
                                                                      	double tmp;
                                                                      	if ((x <= -2.7e-10) || !(x <= 6.5e-88)) {
                                                                      		tmp = (-1.0 / (fma((-0.16666666666666666 * B), B, 1.0) * B)) - (x / tan(B));
                                                                      	} else {
                                                                      		tmp = ((F / sin(B)) / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - (x / B);
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      function code(F, B, x)
                                                                      	tmp = 0.0
                                                                      	if ((x <= -2.7e-10) || !(x <= 6.5e-88))
                                                                      		tmp = Float64(Float64(-1.0 / Float64(fma(Float64(-0.16666666666666666 * B), B, 1.0) * B)) - Float64(x / tan(B)));
                                                                      	else
                                                                      		tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - Float64(x / B));
                                                                      	end
                                                                      	return tmp
                                                                      end
                                                                      
                                                                      code[F_, B_, x_] := If[Or[LessEqual[x, -2.7e-10], N[Not[LessEqual[x, 6.5e-88]], $MachinePrecision]], N[(N[(-1.0 / N[(N[(N[(-0.16666666666666666 * B), $MachinePrecision] * B + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
                                                                      
                                                                      \begin{array}{l}
                                                                      
                                                                      \\
                                                                      \begin{array}{l}
                                                                      \mathbf{if}\;x \leq -2.7 \cdot 10^{-10} \lor \neg \left(x \leq 6.5 \cdot 10^{-88}\right):\\
                                                                      \;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666 \cdot B, B, 1\right) \cdot B} - \frac{x}{\tan B}\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 2 regimes
                                                                      2. if x < -2.7e-10 or 6.50000000000000006e-88 < x

                                                                        1. Initial program 86.2%

                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                        2. Add Preprocessing
                                                                        3. Step-by-step derivation
                                                                          1. lift-+.f64N/A

                                                                            \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                          2. +-commutativeN/A

                                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                          3. lift-*.f64N/A

                                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                          4. *-commutativeN/A

                                                                            \[\leadsto \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \frac{F}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                          5. lift-/.f64N/A

                                                                            \[\leadsto {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \color{blue}{\frac{F}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                          6. clear-numN/A

                                                                            \[\leadsto {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\frac{\sin B}{F}}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                          7. associate-/r/N/A

                                                                            \[\leadsto {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                          8. associate-*r*N/A

                                                                            \[\leadsto \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \frac{1}{\sin B}\right) \cdot F} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                          9. div-invN/A

                                                                            \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} \cdot F + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                          10. lower-fma.f64N/A

                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, F, -x \cdot \frac{1}{\tan B}\right)} \]
                                                                        4. Applied rewrites95.2%

                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, F, \frac{-x}{\tan B}\right)} \]
                                                                        5. Applied rewrites95.2%

                                                                          \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{\tan B}} \]
                                                                        6. Taylor expanded in F around -inf

                                                                          \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{\tan B} \]
                                                                        7. Step-by-step derivation
                                                                          1. Applied rewrites89.9%

                                                                            \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{\tan B} \]
                                                                          2. Taylor expanded in B around 0

                                                                            \[\leadsto \frac{-1}{\color{blue}{B \cdot \left(1 + \frac{-1}{6} \cdot {B}^{2}\right)}} - \frac{x}{\tan B} \]
                                                                          3. Step-by-step derivation
                                                                            1. *-commutativeN/A

                                                                              \[\leadsto \frac{-1}{\color{blue}{\left(1 + \frac{-1}{6} \cdot {B}^{2}\right) \cdot B}} - \frac{x}{\tan B} \]
                                                                            2. lower-*.f64N/A

                                                                              \[\leadsto \frac{-1}{\color{blue}{\left(1 + \frac{-1}{6} \cdot {B}^{2}\right) \cdot B}} - \frac{x}{\tan B} \]
                                                                            3. +-commutativeN/A

                                                                              \[\leadsto \frac{-1}{\color{blue}{\left(\frac{-1}{6} \cdot {B}^{2} + 1\right)} \cdot B} - \frac{x}{\tan B} \]
                                                                            4. unpow2N/A

                                                                              \[\leadsto \frac{-1}{\left(\frac{-1}{6} \cdot \color{blue}{\left(B \cdot B\right)} + 1\right) \cdot B} - \frac{x}{\tan B} \]
                                                                            5. associate-*r*N/A

                                                                              \[\leadsto \frac{-1}{\left(\color{blue}{\left(\frac{-1}{6} \cdot B\right) \cdot B} + 1\right) \cdot B} - \frac{x}{\tan B} \]
                                                                            6. lower-fma.f64N/A

                                                                              \[\leadsto \frac{-1}{\color{blue}{\mathsf{fma}\left(\frac{-1}{6} \cdot B, B, 1\right)} \cdot B} - \frac{x}{\tan B} \]
                                                                            7. lower-*.f6492.8

                                                                              \[\leadsto \frac{-1}{\mathsf{fma}\left(\color{blue}{-0.16666666666666666 \cdot B}, B, 1\right) \cdot B} - \frac{x}{\tan B} \]
                                                                          4. Applied rewrites92.8%

                                                                            \[\leadsto \frac{-1}{\color{blue}{\mathsf{fma}\left(-0.16666666666666666 \cdot B, B, 1\right) \cdot B}} - \frac{x}{\tan B} \]

                                                                          if -2.7e-10 < x < 6.50000000000000006e-88

                                                                          1. Initial program 75.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 \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                            2. *-commutativeN/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \frac{F}{\sin B}} \]
                                                                            3. lift-/.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \color{blue}{\frac{F}{\sin B}} \]
                                                                            4. clear-numN/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\frac{\sin B}{F}}} \]
                                                                            5. un-div-invN/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\frac{\sin B}{F}}} \]
                                                                            6. lower-/.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\frac{\sin B}{F}}} \]
                                                                            7. lift-+.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(-\frac{1}{2}\right)}}{\frac{\sin B}{F}} \]
                                                                            8. +-commutativeN/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}}{\frac{\sin B}{F}} \]
                                                                            9. lift-*.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}}{\frac{\sin B}{F}} \]
                                                                            10. lower-fma.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}}{\frac{\sin B}{F}} \]
                                                                            11. lift-+.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F + 2}\right)\right)}^{\left(-\frac{1}{2}\right)}}{\frac{\sin B}{F}} \]
                                                                            12. lift-*.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)\right)}^{\left(-\frac{1}{2}\right)}}{\frac{\sin B}{F}} \]
                                                                            13. lower-fma.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(-\frac{1}{2}\right)}}{\frac{\sin B}{F}} \]
                                                                            14. lift-neg.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}}{\frac{\sin B}{F}} \]
                                                                            15. lift-/.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)}}{\frac{\sin B}{F}} \]
                                                                            16. metadata-evalN/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)}}{\frac{\sin B}{F}} \]
                                                                            17. metadata-evalN/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\frac{-1}{2}}}}{\frac{\sin B}{F}} \]
                                                                            18. lower-/.f6476.3

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\color{blue}{\frac{\sin B}{F}}} \]
                                                                          4. Applied rewrites76.3%

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{\sin B}{F}}} \]
                                                                          5. Taylor expanded in B around 0

                                                                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\frac{\sin B}{F}} \]
                                                                          6. Step-by-step derivation
                                                                            1. lower-/.f6468.0

                                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{\sin B}{F}} \]
                                                                          7. Applied rewrites68.0%

                                                                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{\sin B}{F}} \]
                                                                          8. Step-by-step derivation
                                                                            1. metadata-evalN/A

                                                                              \[\leadsto \left(-\frac{x}{B}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}}{\frac{\sin B}{F}} \]
                                                                            2. metadata-evalN/A

                                                                              \[\leadsto \left(-\frac{x}{B}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)}}{\frac{\sin B}{F}} \]
                                                                            3. lift-+.f64N/A

                                                                              \[\leadsto \color{blue}{\left(-\frac{x}{B}\right) + \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} \]
                                                                            4. +-commutativeN/A

                                                                              \[\leadsto \color{blue}{\frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}} + \left(-\frac{x}{B}\right)} \]
                                                                            5. lift-neg.f64N/A

                                                                              \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                                                            6. unsub-negN/A

                                                                              \[\leadsto \color{blue}{\frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}} - \frac{x}{B}} \]
                                                                            7. lower--.f64N/A

                                                                              \[\leadsto \color{blue}{\frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}} - \frac{x}{B}} \]
                                                                          9. Applied rewrites67.2%

                                                                            \[\leadsto \color{blue}{\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
                                                                        8. Recombined 2 regimes into one program.
                                                                        9. Final simplification79.5%

                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{-10} \lor \neg \left(x \leq 6.5 \cdot 10^{-88}\right):\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666 \cdot B, B, 1\right) \cdot B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \end{array} \]
                                                                        10. Add Preprocessing

                                                                        Alternative 17: 57.5% accurate, 2.5× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 4.3 \cdot 10^{-19}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666 \cdot B, B, 1\right) \cdot B} - \frac{x}{\tan B}\\ \end{array} \end{array} \]
                                                                        (FPCore (F B x)
                                                                         :precision binary64
                                                                         (if (<= B 4.3e-19)
                                                                           (/ (- (/ F (sqrt (fma x 2.0 (fma F F 2.0)))) x) B)
                                                                           (- (/ -1.0 (* (fma (* -0.16666666666666666 B) B 1.0) B)) (/ x (tan B)))))
                                                                        double code(double F, double B, double x) {
                                                                        	double tmp;
                                                                        	if (B <= 4.3e-19) {
                                                                        		tmp = ((F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B;
                                                                        	} else {
                                                                        		tmp = (-1.0 / (fma((-0.16666666666666666 * B), B, 1.0) * B)) - (x / tan(B));
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        function code(F, B, x)
                                                                        	tmp = 0.0
                                                                        	if (B <= 4.3e-19)
                                                                        		tmp = Float64(Float64(Float64(F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B);
                                                                        	else
                                                                        		tmp = Float64(Float64(-1.0 / Float64(fma(Float64(-0.16666666666666666 * B), B, 1.0) * B)) - Float64(x / tan(B)));
                                                                        	end
                                                                        	return tmp
                                                                        end
                                                                        
                                                                        code[F_, B_, x_] := If[LessEqual[B, 4.3e-19], N[(N[(N[(F / N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / N[(N[(N[(-0.16666666666666666 * B), $MachinePrecision] * B + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                        
                                                                        \begin{array}{l}
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        \mathbf{if}\;B \leq 4.3 \cdot 10^{-19}:\\
                                                                        \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666 \cdot B, B, 1\right) \cdot B} - \frac{x}{\tan B}\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 2 regimes
                                                                        2. if B < 4.3e-19

                                                                          1. Initial program 78.0%

                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                          2. Add Preprocessing
                                                                          3. Taylor expanded in B around 0

                                                                            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                          4. Step-by-step derivation
                                                                            1. lower-/.f64N/A

                                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                            2. sub-negN/A

                                                                              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                            3. *-commutativeN/A

                                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            4. lower-fma.f64N/A

                                                                              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                            5. lower-sqrt.f64N/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            6. lower-/.f64N/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            7. associate-+r+N/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            8. +-commutativeN/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            9. unpow2N/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            10. lower-fma.f64N/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            11. +-commutativeN/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            12. lower-fma.f64N/A

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                            13. lower-neg.f6456.4

                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                          5. Applied rewrites56.4%

                                                                            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                          6. Applied rewrites56.5%

                                                                            \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                                                                          if 4.3e-19 < B

                                                                          1. Initial program 86.3%

                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                          2. Add Preprocessing
                                                                          3. Step-by-step derivation
                                                                            1. lift-+.f64N/A

                                                                              \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                            2. +-commutativeN/A

                                                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                            3. lift-*.f64N/A

                                                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                            4. *-commutativeN/A

                                                                              \[\leadsto \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \frac{F}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                            5. lift-/.f64N/A

                                                                              \[\leadsto {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \color{blue}{\frac{F}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                            6. clear-numN/A

                                                                              \[\leadsto {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \color{blue}{\frac{1}{\frac{\sin B}{F}}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                            7. associate-/r/N/A

                                                                              \[\leadsto {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot F\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                            8. associate-*r*N/A

                                                                              \[\leadsto \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \cdot \frac{1}{\sin B}\right) \cdot F} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                            9. div-invN/A

                                                                              \[\leadsto \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} \cdot F + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                            10. lower-fma.f64N/A

                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, F, -x \cdot \frac{1}{\tan B}\right)} \]
                                                                          4. Applied rewrites86.5%

                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, F, \frac{-x}{\tan B}\right)} \]
                                                                          5. Applied rewrites86.4%

                                                                            \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{\tan B}} \]
                                                                          6. Taylor expanded in F around -inf

                                                                            \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{\tan B} \]
                                                                          7. Step-by-step derivation
                                                                            1. Applied rewrites53.6%

                                                                              \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{\tan B} \]
                                                                            2. Taylor expanded in B around 0

                                                                              \[\leadsto \frac{-1}{\color{blue}{B \cdot \left(1 + \frac{-1}{6} \cdot {B}^{2}\right)}} - \frac{x}{\tan B} \]
                                                                            3. Step-by-step derivation
                                                                              1. *-commutativeN/A

                                                                                \[\leadsto \frac{-1}{\color{blue}{\left(1 + \frac{-1}{6} \cdot {B}^{2}\right) \cdot B}} - \frac{x}{\tan B} \]
                                                                              2. lower-*.f64N/A

                                                                                \[\leadsto \frac{-1}{\color{blue}{\left(1 + \frac{-1}{6} \cdot {B}^{2}\right) \cdot B}} - \frac{x}{\tan B} \]
                                                                              3. +-commutativeN/A

                                                                                \[\leadsto \frac{-1}{\color{blue}{\left(\frac{-1}{6} \cdot {B}^{2} + 1\right)} \cdot B} - \frac{x}{\tan B} \]
                                                                              4. unpow2N/A

                                                                                \[\leadsto \frac{-1}{\left(\frac{-1}{6} \cdot \color{blue}{\left(B \cdot B\right)} + 1\right) \cdot B} - \frac{x}{\tan B} \]
                                                                              5. associate-*r*N/A

                                                                                \[\leadsto \frac{-1}{\left(\color{blue}{\left(\frac{-1}{6} \cdot B\right) \cdot B} + 1\right) \cdot B} - \frac{x}{\tan B} \]
                                                                              6. lower-fma.f64N/A

                                                                                \[\leadsto \frac{-1}{\color{blue}{\mathsf{fma}\left(\frac{-1}{6} \cdot B, B, 1\right)} \cdot B} - \frac{x}{\tan B} \]
                                                                              7. lower-*.f6446.3

                                                                                \[\leadsto \frac{-1}{\mathsf{fma}\left(\color{blue}{-0.16666666666666666 \cdot B}, B, 1\right) \cdot B} - \frac{x}{\tan B} \]
                                                                            4. Applied rewrites46.3%

                                                                              \[\leadsto \frac{-1}{\color{blue}{\mathsf{fma}\left(-0.16666666666666666 \cdot B, B, 1\right) \cdot B}} - \frac{x}{\tan B} \]
                                                                          8. Recombined 2 regimes into one program.
                                                                          9. Final simplification53.3%

                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 4.3 \cdot 10^{-19}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666 \cdot B, B, 1\right) \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
                                                                          10. Add Preprocessing

                                                                          Alternative 18: 49.6% accurate, 2.9× speedup?

                                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 3.6 \cdot 10^{-7}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot B - \frac{x}{\tan B}\\ \end{array} \end{array} \]
                                                                          (FPCore (F B x)
                                                                           :precision binary64
                                                                           (if (<= B 3.6e-7)
                                                                             (/ (- (/ F (sqrt (fma x 2.0 (fma F F 2.0)))) x) B)
                                                                             (- (* 0.16666666666666666 B) (/ x (tan B)))))
                                                                          double code(double F, double B, double x) {
                                                                          	double tmp;
                                                                          	if (B <= 3.6e-7) {
                                                                          		tmp = ((F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B;
                                                                          	} else {
                                                                          		tmp = (0.16666666666666666 * B) - (x / tan(B));
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          function code(F, B, x)
                                                                          	tmp = 0.0
                                                                          	if (B <= 3.6e-7)
                                                                          		tmp = Float64(Float64(Float64(F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B);
                                                                          	else
                                                                          		tmp = Float64(Float64(0.16666666666666666 * B) - Float64(x / tan(B)));
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          code[F_, B_, x_] := If[LessEqual[B, 3.6e-7], N[(N[(N[(F / N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(0.16666666666666666 * B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \begin{array}{l}
                                                                          \mathbf{if}\;B \leq 3.6 \cdot 10^{-7}:\\
                                                                          \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;0.16666666666666666 \cdot B - \frac{x}{\tan B}\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 2 regimes
                                                                          2. if B < 3.59999999999999994e-7

                                                                            1. Initial program 78.2%

                                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                            2. Add Preprocessing
                                                                            3. Taylor expanded in B around 0

                                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                            4. Step-by-step derivation
                                                                              1. lower-/.f64N/A

                                                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                              2. sub-negN/A

                                                                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                              3. *-commutativeN/A

                                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                              4. lower-fma.f64N/A

                                                                                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                              5. lower-sqrt.f64N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                              6. lower-/.f64N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                              7. associate-+r+N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                              8. +-commutativeN/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                              9. unpow2N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                              10. lower-fma.f64N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                              11. +-commutativeN/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                              12. lower-fma.f64N/A

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                              13. lower-neg.f6456.9

                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                            5. Applied rewrites56.9%

                                                                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                            6. Applied rewrites56.9%

                                                                              \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                                                                            if 3.59999999999999994e-7 < B

                                                                            1. Initial program 86.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                              2. *-commutativeN/A

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                              3. associate-*l*N/A

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                              4. associate-*r*N/A

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                              5. *-commutativeN/A

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                              6. lower-/.f64N/A

                                                                                \[\leadsto \left(-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 rewrites17.5%

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                            6. Taylor expanded in F around inf

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                            7. Step-by-step derivation
                                                                              1. Applied rewrites19.9%

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                              2. Taylor expanded in B around inf

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{6} \cdot B \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites20.2%

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + 0.16666666666666666 \cdot B \]
                                                                                2. Step-by-step derivation
                                                                                  1. lift-+.f64N/A

                                                                                    \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{6} \cdot B} \]
                                                                                  2. +-commutativeN/A

                                                                                    \[\leadsto \color{blue}{\frac{1}{6} \cdot B + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                  3. lift-neg.f64N/A

                                                                                    \[\leadsto \frac{1}{6} \cdot B + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                  4. lift-*.f64N/A

                                                                                    \[\leadsto \frac{1}{6} \cdot B + \left(\mathsf{neg}\left(\color{blue}{x \cdot \frac{1}{\tan B}}\right)\right) \]
                                                                                  5. lift-/.f64N/A

                                                                                    \[\leadsto \frac{1}{6} \cdot B + \left(\mathsf{neg}\left(x \cdot \color{blue}{\frac{1}{\tan B}}\right)\right) \]
                                                                                  6. div-invN/A

                                                                                    \[\leadsto \frac{1}{6} \cdot B + \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\tan B}}\right)\right) \]
                                                                                  7. lift-/.f64N/A

                                                                                    \[\leadsto \frac{1}{6} \cdot B + \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\tan B}}\right)\right) \]
                                                                                3. Applied rewrites20.2%

                                                                                  \[\leadsto \color{blue}{0.16666666666666666 \cdot B - \frac{x}{\tan B}} \]
                                                                              4. Recombined 2 regimes into one program.
                                                                              5. Final simplification45.6%

                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.6 \cdot 10^{-7}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;0.16666666666666666 \cdot B - \frac{x}{\tan B}\\ \end{array} \]
                                                                              6. Add Preprocessing

                                                                              Alternative 19: 52.5% accurate, 4.1× speedup?

                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{+139}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0021164021164021165, B \cdot B, -0.022222222222222223\right), B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \end{array} \]
                                                                              (FPCore (F B x)
                                                                               :precision binary64
                                                                               (if (<= F -1.35e+154)
                                                                                 (+
                                                                                  (/ (* x (fma 0.3333333333333333 (* B B) -1.0)) B)
                                                                                  (/ (fma -0.16666666666666666 (* B B) -1.0) B))
                                                                                 (if (<= F 2.8e+139)
                                                                                   (/ (- (/ F (sqrt (fma x 2.0 (fma F F 2.0)))) x) B)
                                                                                   (+
                                                                                    (*
                                                                                     (- x)
                                                                                     (/
                                                                                      (fma
                                                                                       (fma
                                                                                        (fma -0.0021164021164021165 (* B B) -0.022222222222222223)
                                                                                        (* B B)
                                                                                        -0.3333333333333333)
                                                                                       (* B B)
                                                                                       1.0)
                                                                                      B))
                                                                                    (/ (fma (* B B) 0.16666666666666666 1.0) B)))))
                                                                              double code(double F, double B, double x) {
                                                                              	double tmp;
                                                                              	if (F <= -1.35e+154) {
                                                                              		tmp = ((x * fma(0.3333333333333333, (B * B), -1.0)) / B) + (fma(-0.16666666666666666, (B * B), -1.0) / B);
                                                                              	} else if (F <= 2.8e+139) {
                                                                              		tmp = ((F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B;
                                                                              	} else {
                                                                              		tmp = (-x * (fma(fma(fma(-0.0021164021164021165, (B * B), -0.022222222222222223), (B * B), -0.3333333333333333), (B * B), 1.0) / B)) + (fma((B * B), 0.16666666666666666, 1.0) / B);
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              function code(F, B, x)
                                                                              	tmp = 0.0
                                                                              	if (F <= -1.35e+154)
                                                                              		tmp = Float64(Float64(Float64(x * fma(0.3333333333333333, Float64(B * B), -1.0)) / B) + Float64(fma(-0.16666666666666666, Float64(B * B), -1.0) / B));
                                                                              	elseif (F <= 2.8e+139)
                                                                              		tmp = Float64(Float64(Float64(F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B);
                                                                              	else
                                                                              		tmp = Float64(Float64(Float64(-x) * Float64(fma(fma(fma(-0.0021164021164021165, Float64(B * B), -0.022222222222222223), Float64(B * B), -0.3333333333333333), Float64(B * B), 1.0) / B)) + Float64(fma(Float64(B * B), 0.16666666666666666, 1.0) / B));
                                                                              	end
                                                                              	return tmp
                                                                              end
                                                                              
                                                                              code[F_, B_, x_] := If[LessEqual[F, -1.35e+154], N[(N[(N[(x * N[(0.3333333333333333 * N[(B * B), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] + N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + -1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e+139], N[(N[(N[(F / N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[((-x) * N[(N[(N[(N[(-0.0021164021164021165 * N[(B * B), $MachinePrecision] + -0.022222222222222223), $MachinePrecision] * N[(B * B), $MachinePrecision] + -0.3333333333333333), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(B * B), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                                                                              
                                                                              \begin{array}{l}
                                                                              
                                                                              \\
                                                                              \begin{array}{l}
                                                                              \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\
                                                                              \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\
                                                                              
                                                                              \mathbf{elif}\;F \leq 2.8 \cdot 10^{+139}:\\
                                                                              \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;\left(-x\right) \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0021164021164021165, B \cdot B, -0.022222222222222223\right), B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Split input into 3 regimes
                                                                              2. if F < -1.35000000000000003e154

                                                                                1. Initial program 42.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                                  2. *-commutativeN/A

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                                  3. associate-*l*N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                                  4. associate-*r*N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                                  5. *-commutativeN/A

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                                  6. lower-/.f64N/A

                                                                                    \[\leadsto \left(-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 rewrites21.9%

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                                6. Taylor expanded in F around inf

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                                7. Step-by-step derivation
                                                                                  1. Applied rewrites31.0%

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                                  2. Taylor expanded in B around 0

                                                                                    \[\leadsto \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                  3. Step-by-step derivation
                                                                                    1. lower-/.f64N/A

                                                                                      \[\leadsto \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                    2. sub-negN/A

                                                                                      \[\leadsto \frac{\color{blue}{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                    3. associate-*r*N/A

                                                                                      \[\leadsto \frac{\color{blue}{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x} + \left(\mathsf{neg}\left(x\right)\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                    4. mul-1-negN/A

                                                                                      \[\leadsto \frac{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x + \color{blue}{-1 \cdot x}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                    5. distribute-rgt-outN/A

                                                                                      \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                    6. lower-*.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                    7. lower-fma.f64N/A

                                                                                      \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{3}, {B}^{2}, -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                    8. unpow2N/A

                                                                                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, -1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                    9. lower-*.f6414.2

                                                                                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{B \cdot B}, -1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                  4. Applied rewrites14.2%

                                                                                    \[\leadsto \color{blue}{\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B}} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                  5. Taylor expanded in F around -inf

                                                                                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, B \cdot B, -1\right)}{B} + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                                                                  6. Step-by-step derivation
                                                                                    1. Applied rewrites43.6%

                                                                                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{\color{blue}{B}} \]

                                                                                    if -1.35000000000000003e154 < F < 2.7999999999999998e139

                                                                                    1. Initial program 96.5%

                                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                    2. Add Preprocessing
                                                                                    3. Taylor expanded in B around 0

                                                                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. lower-/.f64N/A

                                                                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                      2. sub-negN/A

                                                                                        \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                      3. *-commutativeN/A

                                                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                      4. lower-fma.f64N/A

                                                                                        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                      5. lower-sqrt.f64N/A

                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                      6. lower-/.f64N/A

                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                      7. associate-+r+N/A

                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                      8. +-commutativeN/A

                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                      9. unpow2N/A

                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                      10. lower-fma.f64N/A

                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                      11. +-commutativeN/A

                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                      12. lower-fma.f64N/A

                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                      13. lower-neg.f6448.4

                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                    5. Applied rewrites48.4%

                                                                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                    6. Applied rewrites48.5%

                                                                                      \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                                                                                    if 2.7999999999999998e139 < F

                                                                                    1. Initial program 32.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                                      2. *-commutativeN/A

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                                      3. associate-*l*N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                                      4. associate-*r*N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                                      5. *-commutativeN/A

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                                      6. lower-/.f64N/A

                                                                                        \[\leadsto \left(-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 rewrites26.4%

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                                    6. Taylor expanded in F around inf

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                                    7. Step-by-step derivation
                                                                                      1. Applied rewrites63.8%

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                                      2. Taylor expanded in B around 0

                                                                                        \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-2}{945} \cdot {B}^{2} - \frac{1}{45}\right) - \frac{1}{3}\right)}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                      3. Step-by-step derivation
                                                                                        1. lower-/.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-2}{945} \cdot {B}^{2} - \frac{1}{45}\right) - \frac{1}{3}\right)}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        2. +-commutativeN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\color{blue}{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-2}{945} \cdot {B}^{2} - \frac{1}{45}\right) - \frac{1}{3}\right) + 1}}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        3. *-commutativeN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\color{blue}{\left({B}^{2} \cdot \left(\frac{-2}{945} \cdot {B}^{2} - \frac{1}{45}\right) - \frac{1}{3}\right) \cdot {B}^{2}} + 1}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        4. lower-fma.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left({B}^{2} \cdot \left(\frac{-2}{945} \cdot {B}^{2} - \frac{1}{45}\right) - \frac{1}{3}, {B}^{2}, 1\right)}}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        5. sub-negN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{{B}^{2} \cdot \left(\frac{-2}{945} \cdot {B}^{2} - \frac{1}{45}\right) + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}, {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        6. *-commutativeN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\left(\frac{-2}{945} \cdot {B}^{2} - \frac{1}{45}\right) \cdot {B}^{2}} + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right), {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        7. metadata-evalN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\left(\frac{-2}{945} \cdot {B}^{2} - \frac{1}{45}\right) \cdot {B}^{2} + \color{blue}{\frac{-1}{3}}, {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        8. lower-fma.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-2}{945} \cdot {B}^{2} - \frac{1}{45}, {B}^{2}, \frac{-1}{3}\right)}, {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        9. sub-negN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\frac{-2}{945} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{45}\right)\right)}, {B}^{2}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        10. metadata-evalN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{945} \cdot {B}^{2} + \color{blue}{\frac{-1}{45}}, {B}^{2}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        11. lower-fma.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-2}{945}, {B}^{2}, \frac{-1}{45}\right)}, {B}^{2}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        12. unpow2N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{945}, \color{blue}{B \cdot B}, \frac{-1}{45}\right), {B}^{2}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        13. lower-*.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{945}, \color{blue}{B \cdot B}, \frac{-1}{45}\right), {B}^{2}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        14. unpow2N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{945}, B \cdot B, \frac{-1}{45}\right), \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        15. lower-*.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{945}, B \cdot B, \frac{-1}{45}\right), \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        16. unpow2N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{945}, B \cdot B, \frac{-1}{45}\right), B \cdot B, \frac{-1}{3}\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        17. lower-*.f6455.5

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0021164021164021165, B \cdot B, -0.022222222222222223\right), B \cdot B, -0.3333333333333333\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                      4. Applied rewrites55.5%

                                                                                        \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0021164021164021165, B \cdot B, -0.022222222222222223\right), B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                    8. Recombined 3 regimes into one program.
                                                                                    9. Final simplification48.8%

                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{+139}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0021164021164021165, B \cdot B, -0.022222222222222223\right), B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \]
                                                                                    10. Add Preprocessing

                                                                                    Alternative 20: 52.5% accurate, 4.7× speedup?

                                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{+139}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \end{array} \]
                                                                                    (FPCore (F B x)
                                                                                     :precision binary64
                                                                                     (if (<= F -1.35e+154)
                                                                                       (+
                                                                                        (/ (* x (fma 0.3333333333333333 (* B B) -1.0)) B)
                                                                                        (/ (fma -0.16666666666666666 (* B B) -1.0) B))
                                                                                       (if (<= F 2.8e+139)
                                                                                         (/ (- (/ F (sqrt (fma x 2.0 (fma F F 2.0)))) x) B)
                                                                                         (+
                                                                                          (*
                                                                                           (- x)
                                                                                           (/
                                                                                            (fma
                                                                                             (fma -0.022222222222222223 (* B B) -0.3333333333333333)
                                                                                             (* B B)
                                                                                             1.0)
                                                                                            B))
                                                                                          (/ (fma (* B B) 0.16666666666666666 1.0) B)))))
                                                                                    double code(double F, double B, double x) {
                                                                                    	double tmp;
                                                                                    	if (F <= -1.35e+154) {
                                                                                    		tmp = ((x * fma(0.3333333333333333, (B * B), -1.0)) / B) + (fma(-0.16666666666666666, (B * B), -1.0) / B);
                                                                                    	} else if (F <= 2.8e+139) {
                                                                                    		tmp = ((F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B;
                                                                                    	} else {
                                                                                    		tmp = (-x * (fma(fma(-0.022222222222222223, (B * B), -0.3333333333333333), (B * B), 1.0) / B)) + (fma((B * B), 0.16666666666666666, 1.0) / B);
                                                                                    	}
                                                                                    	return tmp;
                                                                                    }
                                                                                    
                                                                                    function code(F, B, x)
                                                                                    	tmp = 0.0
                                                                                    	if (F <= -1.35e+154)
                                                                                    		tmp = Float64(Float64(Float64(x * fma(0.3333333333333333, Float64(B * B), -1.0)) / B) + Float64(fma(-0.16666666666666666, Float64(B * B), -1.0) / B));
                                                                                    	elseif (F <= 2.8e+139)
                                                                                    		tmp = Float64(Float64(Float64(F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B);
                                                                                    	else
                                                                                    		tmp = Float64(Float64(Float64(-x) * Float64(fma(fma(-0.022222222222222223, Float64(B * B), -0.3333333333333333), Float64(B * B), 1.0) / B)) + Float64(fma(Float64(B * B), 0.16666666666666666, 1.0) / B));
                                                                                    	end
                                                                                    	return tmp
                                                                                    end
                                                                                    
                                                                                    code[F_, B_, x_] := If[LessEqual[F, -1.35e+154], N[(N[(N[(x * N[(0.3333333333333333 * N[(B * B), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] + N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + -1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e+139], N[(N[(N[(F / N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[((-x) * N[(N[(N[(-0.022222222222222223 * N[(B * B), $MachinePrecision] + -0.3333333333333333), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(B * B), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                                                                                    
                                                                                    \begin{array}{l}
                                                                                    
                                                                                    \\
                                                                                    \begin{array}{l}
                                                                                    \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\
                                                                                    \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\
                                                                                    
                                                                                    \mathbf{elif}\;F \leq 2.8 \cdot 10^{+139}:\\
                                                                                    \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                                                                                    
                                                                                    \mathbf{else}:\\
                                                                                    \;\;\;\;\left(-x\right) \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\
                                                                                    
                                                                                    
                                                                                    \end{array}
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Split input into 3 regimes
                                                                                    2. if F < -1.35000000000000003e154

                                                                                      1. Initial program 42.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                                        2. *-commutativeN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                                        3. associate-*l*N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                                        4. associate-*r*N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                                        5. *-commutativeN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                                        6. lower-/.f64N/A

                                                                                          \[\leadsto \left(-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 rewrites21.9%

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                                      6. Taylor expanded in F around inf

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                                      7. Step-by-step derivation
                                                                                        1. Applied rewrites31.0%

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                                        2. Taylor expanded in B around 0

                                                                                          \[\leadsto \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                        3. Step-by-step derivation
                                                                                          1. lower-/.f64N/A

                                                                                            \[\leadsto \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                          2. sub-negN/A

                                                                                            \[\leadsto \frac{\color{blue}{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                          3. associate-*r*N/A

                                                                                            \[\leadsto \frac{\color{blue}{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x} + \left(\mathsf{neg}\left(x\right)\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                          4. mul-1-negN/A

                                                                                            \[\leadsto \frac{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x + \color{blue}{-1 \cdot x}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                          5. distribute-rgt-outN/A

                                                                                            \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                          6. lower-*.f64N/A

                                                                                            \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                          7. lower-fma.f64N/A

                                                                                            \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{3}, {B}^{2}, -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                          8. unpow2N/A

                                                                                            \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, -1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                          9. lower-*.f6414.2

                                                                                            \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{B \cdot B}, -1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                        4. Applied rewrites14.2%

                                                                                          \[\leadsto \color{blue}{\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B}} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                        5. Taylor expanded in F around -inf

                                                                                          \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, B \cdot B, -1\right)}{B} + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                                                                        6. Step-by-step derivation
                                                                                          1. Applied rewrites43.6%

                                                                                            \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{\color{blue}{B}} \]

                                                                                          if -1.35000000000000003e154 < F < 2.7999999999999998e139

                                                                                          1. Initial program 96.5%

                                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                          2. Add Preprocessing
                                                                                          3. Taylor expanded in B around 0

                                                                                            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                          4. Step-by-step derivation
                                                                                            1. lower-/.f64N/A

                                                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                            2. sub-negN/A

                                                                                              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                            3. *-commutativeN/A

                                                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            4. lower-fma.f64N/A

                                                                                              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                            5. lower-sqrt.f64N/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            6. lower-/.f64N/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            7. associate-+r+N/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            8. +-commutativeN/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            9. unpow2N/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            10. lower-fma.f64N/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            11. +-commutativeN/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            12. lower-fma.f64N/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            13. lower-neg.f6448.4

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                          5. Applied rewrites48.4%

                                                                                            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                          6. Applied rewrites48.5%

                                                                                            \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                                                                                          if 2.7999999999999998e139 < F

                                                                                          1. Initial program 32.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                                            2. *-commutativeN/A

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                                            3. associate-*l*N/A

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                                            4. associate-*r*N/A

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                                            5. *-commutativeN/A

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                                            6. lower-/.f64N/A

                                                                                              \[\leadsto \left(-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 rewrites26.4%

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                                          6. Taylor expanded in F around inf

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                                          7. Step-by-step derivation
                                                                                            1. Applied rewrites63.8%

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                                            2. 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{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                            3. 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{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\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{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\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{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\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{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                              5. sub-negN/A

                                                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{45} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}, {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                              6. metadata-evalN/A

                                                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} + \color{blue}{\frac{-1}{3}}, {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                              7. lower-fma.f64N/A

                                                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{45}, {B}^{2}, \frac{-1}{3}\right)}, {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                              8. unpow2N/A

                                                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                              9. lower-*.f64N/A

                                                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                              10. unpow2N/A

                                                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                              11. lower-*.f6455.2

                                                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                            4. Applied rewrites55.2%

                                                                                              \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                          8. Recombined 3 regimes into one program.
                                                                                          9. Final simplification48.8%

                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{+139}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \]
                                                                                          10. Add Preprocessing

                                                                                          Alternative 21: 52.5% accurate, 5.5× speedup?

                                                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{+143}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{\mathsf{fma}\left(\left(B \cdot B\right) \cdot x, -0.3333333333333333, x\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \end{array} \]
                                                                                          (FPCore (F B x)
                                                                                           :precision binary64
                                                                                           (if (<= F -1.35e+154)
                                                                                             (+
                                                                                              (/ (* x (fma 0.3333333333333333 (* B B) -1.0)) B)
                                                                                              (/ (fma -0.16666666666666666 (* B B) -1.0) B))
                                                                                             (if (<= F 4.5e+143)
                                                                                               (/ (- (/ F (sqrt (fma x 2.0 (fma F F 2.0)))) x) B)
                                                                                               (+
                                                                                                (- (/ (fma (* (* B B) x) -0.3333333333333333 x) B))
                                                                                                (/ (fma (* B B) 0.16666666666666666 1.0) B)))))
                                                                                          double code(double F, double B, double x) {
                                                                                          	double tmp;
                                                                                          	if (F <= -1.35e+154) {
                                                                                          		tmp = ((x * fma(0.3333333333333333, (B * B), -1.0)) / B) + (fma(-0.16666666666666666, (B * B), -1.0) / B);
                                                                                          	} else if (F <= 4.5e+143) {
                                                                                          		tmp = ((F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B;
                                                                                          	} else {
                                                                                          		tmp = -(fma(((B * B) * x), -0.3333333333333333, x) / B) + (fma((B * B), 0.16666666666666666, 1.0) / B);
                                                                                          	}
                                                                                          	return tmp;
                                                                                          }
                                                                                          
                                                                                          function code(F, B, x)
                                                                                          	tmp = 0.0
                                                                                          	if (F <= -1.35e+154)
                                                                                          		tmp = Float64(Float64(Float64(x * fma(0.3333333333333333, Float64(B * B), -1.0)) / B) + Float64(fma(-0.16666666666666666, Float64(B * B), -1.0) / B));
                                                                                          	elseif (F <= 4.5e+143)
                                                                                          		tmp = Float64(Float64(Float64(F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B);
                                                                                          	else
                                                                                          		tmp = Float64(Float64(-Float64(fma(Float64(Float64(B * B) * x), -0.3333333333333333, x) / B)) + Float64(fma(Float64(B * B), 0.16666666666666666, 1.0) / B));
                                                                                          	end
                                                                                          	return tmp
                                                                                          end
                                                                                          
                                                                                          code[F_, B_, x_] := If[LessEqual[F, -1.35e+154], N[(N[(N[(x * N[(0.3333333333333333 * N[(B * B), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] + N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + -1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e+143], N[(N[(N[(F / N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[((-N[(N[(N[(N[(B * B), $MachinePrecision] * x), $MachinePrecision] * -0.3333333333333333 + x), $MachinePrecision] / B), $MachinePrecision]) + N[(N[(N[(B * B), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                                                                                          
                                                                                          \begin{array}{l}
                                                                                          
                                                                                          \\
                                                                                          \begin{array}{l}
                                                                                          \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\
                                                                                          \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\
                                                                                          
                                                                                          \mathbf{elif}\;F \leq 4.5 \cdot 10^{+143}:\\
                                                                                          \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                                                                                          
                                                                                          \mathbf{else}:\\
                                                                                          \;\;\;\;\left(-\frac{\mathsf{fma}\left(\left(B \cdot B\right) \cdot x, -0.3333333333333333, x\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\
                                                                                          
                                                                                          
                                                                                          \end{array}
                                                                                          \end{array}
                                                                                          
                                                                                          Derivation
                                                                                          1. Split input into 3 regimes
                                                                                          2. if F < -1.35000000000000003e154

                                                                                            1. Initial program 42.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                                              2. *-commutativeN/A

                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                                              3. associate-*l*N/A

                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                                              4. associate-*r*N/A

                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                                              5. *-commutativeN/A

                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                                              6. lower-/.f64N/A

                                                                                                \[\leadsto \left(-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 rewrites21.9%

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                                            6. Taylor expanded in F around inf

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                                            7. Step-by-step derivation
                                                                                              1. Applied rewrites31.0%

                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                                              2. Taylor expanded in B around 0

                                                                                                \[\leadsto \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                              3. Step-by-step derivation
                                                                                                1. lower-/.f64N/A

                                                                                                  \[\leadsto \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                2. sub-negN/A

                                                                                                  \[\leadsto \frac{\color{blue}{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                3. associate-*r*N/A

                                                                                                  \[\leadsto \frac{\color{blue}{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x} + \left(\mathsf{neg}\left(x\right)\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                4. mul-1-negN/A

                                                                                                  \[\leadsto \frac{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x + \color{blue}{-1 \cdot x}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                5. distribute-rgt-outN/A

                                                                                                  \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                6. lower-*.f64N/A

                                                                                                  \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                7. lower-fma.f64N/A

                                                                                                  \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{3}, {B}^{2}, -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                8. unpow2N/A

                                                                                                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, -1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                9. lower-*.f6414.2

                                                                                                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{B \cdot B}, -1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                              4. Applied rewrites14.2%

                                                                                                \[\leadsto \color{blue}{\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B}} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                              5. Taylor expanded in F around -inf

                                                                                                \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, B \cdot B, -1\right)}{B} + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                                                                              6. Step-by-step derivation
                                                                                                1. Applied rewrites43.6%

                                                                                                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{\color{blue}{B}} \]

                                                                                                if -1.35000000000000003e154 < F < 4.4999999999999997e143

                                                                                                1. Initial program 96.5%

                                                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                2. Add Preprocessing
                                                                                                3. Taylor expanded in B around 0

                                                                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                4. Step-by-step derivation
                                                                                                  1. lower-/.f64N/A

                                                                                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                  2. sub-negN/A

                                                                                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                  3. *-commutativeN/A

                                                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  4. lower-fma.f64N/A

                                                                                                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                  5. lower-sqrt.f64N/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  6. lower-/.f64N/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  7. associate-+r+N/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  8. +-commutativeN/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  9. unpow2N/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  10. lower-fma.f64N/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  11. +-commutativeN/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  12. lower-fma.f64N/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  13. lower-neg.f6448.2

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                5. Applied rewrites48.2%

                                                                                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                6. Applied rewrites48.2%

                                                                                                  \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                                                                                                if 4.4999999999999997e143 < F

                                                                                                1. Initial program 30.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                                                  2. *-commutativeN/A

                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                                                  3. associate-*l*N/A

                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                                                  4. associate-*r*N/A

                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                                                  5. *-commutativeN/A

                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                                                  6. lower-/.f64N/A

                                                                                                    \[\leadsto \left(-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 rewrites27.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(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                                                6. Taylor expanded in F around inf

                                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                                                7. Step-by-step derivation
                                                                                                  1. Applied rewrites65.6%

                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                                                  2. 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{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                  3. 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{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                    2. +-commutativeN/A

                                                                                                      \[\leadsto \left(-\frac{\color{blue}{\frac{-1}{3} \cdot \left({B}^{2} \cdot x\right) + x}}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                    3. *-commutativeN/A

                                                                                                      \[\leadsto \left(-\frac{\color{blue}{\left({B}^{2} \cdot x\right) \cdot \frac{-1}{3}} + x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\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{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\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{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\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{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                    7. lower-*.f6456.2

                                                                                                      \[\leadsto \left(-\frac{\mathsf{fma}\left(\color{blue}{\left(B \cdot B\right)} \cdot x, -0.3333333333333333, x\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                  4. Applied rewrites56.2%

                                                                                                    \[\leadsto \left(-\color{blue}{\frac{\mathsf{fma}\left(\left(B \cdot B\right) \cdot x, -0.3333333333333333, x\right)}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                8. Recombined 3 regimes into one program.
                                                                                                9. Final simplification48.7%

                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{+143}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{\mathsf{fma}\left(\left(B \cdot B\right) \cdot x, -0.3333333333333333, x\right)}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \]
                                                                                                10. Add Preprocessing

                                                                                                Alternative 22: 52.5% accurate, 5.7× speedup?

                                                                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B}\\ \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;t\_0 + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{+143}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;t\_0 + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \end{array} \]
                                                                                                (FPCore (F B x)
                                                                                                 :precision binary64
                                                                                                 (let* ((t_0 (/ (* x (fma 0.3333333333333333 (* B B) -1.0)) B)))
                                                                                                   (if (<= F -1.35e+154)
                                                                                                     (+ t_0 (/ (fma -0.16666666666666666 (* B B) -1.0) B))
                                                                                                     (if (<= F 4.5e+143)
                                                                                                       (/ (- (/ F (sqrt (fma x 2.0 (fma F F 2.0)))) x) B)
                                                                                                       (+ t_0 (/ (fma (* B B) 0.16666666666666666 1.0) B))))))
                                                                                                double code(double F, double B, double x) {
                                                                                                	double t_0 = (x * fma(0.3333333333333333, (B * B), -1.0)) / B;
                                                                                                	double tmp;
                                                                                                	if (F <= -1.35e+154) {
                                                                                                		tmp = t_0 + (fma(-0.16666666666666666, (B * B), -1.0) / B);
                                                                                                	} else if (F <= 4.5e+143) {
                                                                                                		tmp = ((F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B;
                                                                                                	} else {
                                                                                                		tmp = t_0 + (fma((B * B), 0.16666666666666666, 1.0) / B);
                                                                                                	}
                                                                                                	return tmp;
                                                                                                }
                                                                                                
                                                                                                function code(F, B, x)
                                                                                                	t_0 = Float64(Float64(x * fma(0.3333333333333333, Float64(B * B), -1.0)) / B)
                                                                                                	tmp = 0.0
                                                                                                	if (F <= -1.35e+154)
                                                                                                		tmp = Float64(t_0 + Float64(fma(-0.16666666666666666, Float64(B * B), -1.0) / B));
                                                                                                	elseif (F <= 4.5e+143)
                                                                                                		tmp = Float64(Float64(Float64(F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B);
                                                                                                	else
                                                                                                		tmp = Float64(t_0 + Float64(fma(Float64(B * B), 0.16666666666666666, 1.0) / B));
                                                                                                	end
                                                                                                	return tmp
                                                                                                end
                                                                                                
                                                                                                code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(0.3333333333333333 * N[(B * B), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -1.35e+154], N[(t$95$0 + N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + -1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e+143], N[(N[(N[(F / N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(t$95$0 + N[(N[(N[(B * B), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]
                                                                                                
                                                                                                \begin{array}{l}
                                                                                                
                                                                                                \\
                                                                                                \begin{array}{l}
                                                                                                t_0 := \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B}\\
                                                                                                \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\
                                                                                                \;\;\;\;t\_0 + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\
                                                                                                
                                                                                                \mathbf{elif}\;F \leq 4.5 \cdot 10^{+143}:\\
                                                                                                \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                                                                                                
                                                                                                \mathbf{else}:\\
                                                                                                \;\;\;\;t\_0 + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\
                                                                                                
                                                                                                
                                                                                                \end{array}
                                                                                                \end{array}
                                                                                                
                                                                                                Derivation
                                                                                                1. Split input into 3 regimes
                                                                                                2. if F < -1.35000000000000003e154

                                                                                                  1. Initial program 42.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                                                    2. *-commutativeN/A

                                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                                                    3. associate-*l*N/A

                                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                                                    4. associate-*r*N/A

                                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                                                    5. *-commutativeN/A

                                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                                                    6. lower-/.f64N/A

                                                                                                      \[\leadsto \left(-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 rewrites21.9%

                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                                                  6. Taylor expanded in F around inf

                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                                                  7. Step-by-step derivation
                                                                                                    1. Applied rewrites31.0%

                                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                                                    2. Taylor expanded in B around 0

                                                                                                      \[\leadsto \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                    3. Step-by-step derivation
                                                                                                      1. lower-/.f64N/A

                                                                                                        \[\leadsto \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                      2. sub-negN/A

                                                                                                        \[\leadsto \frac{\color{blue}{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                      3. associate-*r*N/A

                                                                                                        \[\leadsto \frac{\color{blue}{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x} + \left(\mathsf{neg}\left(x\right)\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                      4. mul-1-negN/A

                                                                                                        \[\leadsto \frac{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x + \color{blue}{-1 \cdot x}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                      5. distribute-rgt-outN/A

                                                                                                        \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                      6. lower-*.f64N/A

                                                                                                        \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                      7. lower-fma.f64N/A

                                                                                                        \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{3}, {B}^{2}, -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                      8. unpow2N/A

                                                                                                        \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, -1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                      9. lower-*.f6414.2

                                                                                                        \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{B \cdot B}, -1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                    4. Applied rewrites14.2%

                                                                                                      \[\leadsto \color{blue}{\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B}} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                    5. Taylor expanded in F around -inf

                                                                                                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, B \cdot B, -1\right)}{B} + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                                                                                    6. Step-by-step derivation
                                                                                                      1. Applied rewrites43.6%

                                                                                                        \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{\color{blue}{B}} \]

                                                                                                      if -1.35000000000000003e154 < F < 4.4999999999999997e143

                                                                                                      1. Initial program 96.5%

                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                      2. Add Preprocessing
                                                                                                      3. Taylor expanded in B around 0

                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                      4. Step-by-step derivation
                                                                                                        1. lower-/.f64N/A

                                                                                                          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                        2. sub-negN/A

                                                                                                          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                        3. *-commutativeN/A

                                                                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                        4. lower-fma.f64N/A

                                                                                                          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                        5. lower-sqrt.f64N/A

                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                        6. lower-/.f64N/A

                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                        7. associate-+r+N/A

                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                        8. +-commutativeN/A

                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                        9. unpow2N/A

                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                        10. lower-fma.f64N/A

                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                        11. +-commutativeN/A

                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                        12. lower-fma.f64N/A

                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                        13. lower-neg.f6448.2

                                                                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                      5. Applied rewrites48.2%

                                                                                                        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                      6. Applied rewrites48.2%

                                                                                                        \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                                                                                                      if 4.4999999999999997e143 < F

                                                                                                      1. Initial program 30.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                                                        2. *-commutativeN/A

                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                                                        3. associate-*l*N/A

                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                                                        4. associate-*r*N/A

                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                                                        5. *-commutativeN/A

                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                                                        6. lower-/.f64N/A

                                                                                                          \[\leadsto \left(-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 rewrites27.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(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                                                      6. Taylor expanded in F around inf

                                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                                                      7. Step-by-step derivation
                                                                                                        1. Applied rewrites65.6%

                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                                                        2. Taylor expanded in B around 0

                                                                                                          \[\leadsto \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. lower-/.f64N/A

                                                                                                            \[\leadsto \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                          2. sub-negN/A

                                                                                                            \[\leadsto \frac{\color{blue}{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                          3. associate-*r*N/A

                                                                                                            \[\leadsto \frac{\color{blue}{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x} + \left(\mathsf{neg}\left(x\right)\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                          4. mul-1-negN/A

                                                                                                            \[\leadsto \frac{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x + \color{blue}{-1 \cdot x}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                          5. distribute-rgt-outN/A

                                                                                                            \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                          6. lower-*.f64N/A

                                                                                                            \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                          7. lower-fma.f64N/A

                                                                                                            \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{3}, {B}^{2}, -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                          8. unpow2N/A

                                                                                                            \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, -1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                          9. lower-*.f6456.2

                                                                                                            \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{B \cdot B}, -1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                        4. Applied rewrites56.2%

                                                                                                          \[\leadsto \color{blue}{\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B}} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                      8. Recombined 3 regimes into one program.
                                                                                                      9. Final simplification48.7%

                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{+143}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \]
                                                                                                      10. Add Preprocessing

                                                                                                      Alternative 23: 52.5% accurate, 6.1× speedup?

                                                                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\ \mathbf{elif}\;F \leq 10^{+45}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \end{array} \]
                                                                                                      (FPCore (F B x)
                                                                                                       :precision binary64
                                                                                                       (if (<= F -1.35e+154)
                                                                                                         (+
                                                                                                          (/ (* x (fma 0.3333333333333333 (* B B) -1.0)) B)
                                                                                                          (/ (fma -0.16666666666666666 (* B B) -1.0) B))
                                                                                                         (if (<= F 1e+45)
                                                                                                           (/ (- (/ F (sqrt (fma x 2.0 (fma F F 2.0)))) x) B)
                                                                                                           (+ (- (/ x B)) (/ (fma (* B B) 0.16666666666666666 1.0) B)))))
                                                                                                      double code(double F, double B, double x) {
                                                                                                      	double tmp;
                                                                                                      	if (F <= -1.35e+154) {
                                                                                                      		tmp = ((x * fma(0.3333333333333333, (B * B), -1.0)) / B) + (fma(-0.16666666666666666, (B * B), -1.0) / B);
                                                                                                      	} else if (F <= 1e+45) {
                                                                                                      		tmp = ((F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B;
                                                                                                      	} else {
                                                                                                      		tmp = -(x / B) + (fma((B * B), 0.16666666666666666, 1.0) / B);
                                                                                                      	}
                                                                                                      	return tmp;
                                                                                                      }
                                                                                                      
                                                                                                      function code(F, B, x)
                                                                                                      	tmp = 0.0
                                                                                                      	if (F <= -1.35e+154)
                                                                                                      		tmp = Float64(Float64(Float64(x * fma(0.3333333333333333, Float64(B * B), -1.0)) / B) + Float64(fma(-0.16666666666666666, Float64(B * B), -1.0) / B));
                                                                                                      	elseif (F <= 1e+45)
                                                                                                      		tmp = Float64(Float64(Float64(F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B);
                                                                                                      	else
                                                                                                      		tmp = Float64(Float64(-Float64(x / B)) + Float64(fma(Float64(B * B), 0.16666666666666666, 1.0) / B));
                                                                                                      	end
                                                                                                      	return tmp
                                                                                                      end
                                                                                                      
                                                                                                      code[F_, B_, x_] := If[LessEqual[F, -1.35e+154], N[(N[(N[(x * N[(0.3333333333333333 * N[(B * B), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] + N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + -1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e+45], N[(N[(N[(F / N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(B * B), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                                                                                                      
                                                                                                      \begin{array}{l}
                                                                                                      
                                                                                                      \\
                                                                                                      \begin{array}{l}
                                                                                                      \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\
                                                                                                      \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\
                                                                                                      
                                                                                                      \mathbf{elif}\;F \leq 10^{+45}:\\
                                                                                                      \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                                                                                                      
                                                                                                      \mathbf{else}:\\
                                                                                                      \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\
                                                                                                      
                                                                                                      
                                                                                                      \end{array}
                                                                                                      \end{array}
                                                                                                      
                                                                                                      Derivation
                                                                                                      1. Split input into 3 regimes
                                                                                                      2. if F < -1.35000000000000003e154

                                                                                                        1. Initial program 42.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                                                          2. *-commutativeN/A

                                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                                                          3. associate-*l*N/A

                                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                                                          4. associate-*r*N/A

                                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                                                          5. *-commutativeN/A

                                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                                                          6. lower-/.f64N/A

                                                                                                            \[\leadsto \left(-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 rewrites21.9%

                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                                                        6. Taylor expanded in F around inf

                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                                                        7. Step-by-step derivation
                                                                                                          1. Applied rewrites31.0%

                                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                                                          2. Taylor expanded in B around 0

                                                                                                            \[\leadsto \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                          3. Step-by-step derivation
                                                                                                            1. lower-/.f64N/A

                                                                                                              \[\leadsto \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                            2. sub-negN/A

                                                                                                              \[\leadsto \frac{\color{blue}{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                            3. associate-*r*N/A

                                                                                                              \[\leadsto \frac{\color{blue}{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x} + \left(\mathsf{neg}\left(x\right)\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                            4. mul-1-negN/A

                                                                                                              \[\leadsto \frac{\left(\frac{1}{3} \cdot {B}^{2}\right) \cdot x + \color{blue}{-1 \cdot x}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                            5. distribute-rgt-outN/A

                                                                                                              \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                            6. lower-*.f64N/A

                                                                                                              \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{1}{3} \cdot {B}^{2} + -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                            7. lower-fma.f64N/A

                                                                                                              \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{3}, {B}^{2}, -1\right)}}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                            8. unpow2N/A

                                                                                                              \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, -1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                            9. lower-*.f6414.2

                                                                                                              \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{B \cdot B}, -1\right)}{B} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                          4. Applied rewrites14.2%

                                                                                                            \[\leadsto \color{blue}{\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B}} + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                          5. Taylor expanded in F around -inf

                                                                                                            \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, B \cdot B, -1\right)}{B} + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                                                                                          6. Step-by-step derivation
                                                                                                            1. Applied rewrites43.6%

                                                                                                              \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{\color{blue}{B}} \]

                                                                                                            if -1.35000000000000003e154 < F < 9.9999999999999993e44

                                                                                                            1. Initial program 96.7%

                                                                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                            2. Add Preprocessing
                                                                                                            3. Taylor expanded in B around 0

                                                                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                            4. Step-by-step derivation
                                                                                                              1. lower-/.f64N/A

                                                                                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                              2. sub-negN/A

                                                                                                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                              3. *-commutativeN/A

                                                                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                              4. lower-fma.f64N/A

                                                                                                                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                              5. lower-sqrt.f64N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                              6. lower-/.f64N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                              7. associate-+r+N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                              8. +-commutativeN/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                              9. unpow2N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                              10. lower-fma.f64N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                              11. +-commutativeN/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                              12. lower-fma.f64N/A

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                              13. lower-neg.f6447.3

                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                            5. Applied rewrites47.3%

                                                                                                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                            6. Applied rewrites47.4%

                                                                                                              \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                                                                                                            if 9.9999999999999993e44 < F

                                                                                                            1. Initial program 50.7%

                                                                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                            2. Add Preprocessing
                                                                                                            3. Taylor expanded in B around 0

                                                                                                              \[\leadsto \left(-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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                                                              2. *-commutativeN/A

                                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                                                              3. associate-*l*N/A

                                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                                                              4. associate-*r*N/A

                                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                                                              5. *-commutativeN/A

                                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                                                              6. lower-/.f64N/A

                                                                                                                \[\leadsto \left(-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 rewrites36.9%

                                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                                                            6. Taylor expanded in F around inf

                                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                                                            7. Step-by-step derivation
                                                                                                              1. Applied rewrites63.1%

                                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                                                              2. Taylor expanded in B around 0

                                                                                                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                              3. Step-by-step derivation
                                                                                                                1. lower-/.f6456.2

                                                                                                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                              4. Applied rewrites56.2%

                                                                                                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                            8. Recombined 3 regimes into one program.
                                                                                                            9. Final simplification48.6%

                                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{x \cdot \mathsf{fma}\left(0.3333333333333333, B \cdot B, -1\right)}{B} + \frac{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, -1\right)}{B}\\ \mathbf{elif}\;F \leq 10^{+45}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \]
                                                                                                            10. Add Preprocessing

                                                                                                            Alternative 24: 52.1% accurate, 6.1× speedup?

                                                                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{0.5}{F}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F}, -1 - x\right)}{B}\\ \mathbf{elif}\;F \leq 10^{+45}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \end{array} \]
                                                                                                            (FPCore (F B x)
                                                                                                             :precision binary64
                                                                                                             (if (<= F -4e-13)
                                                                                                               (/ (fma (/ 0.5 F) (/ (fma 2.0 x 2.0) F) (- -1.0 x)) B)
                                                                                                               (if (<= F 1e+45)
                                                                                                                 (/ (- (/ F (sqrt (fma x 2.0 (fma F F 2.0)))) x) B)
                                                                                                                 (+ (- (/ x B)) (/ (fma (* B B) 0.16666666666666666 1.0) B)))))
                                                                                                            double code(double F, double B, double x) {
                                                                                                            	double tmp;
                                                                                                            	if (F <= -4e-13) {
                                                                                                            		tmp = fma((0.5 / F), (fma(2.0, x, 2.0) / F), (-1.0 - x)) / B;
                                                                                                            	} else if (F <= 1e+45) {
                                                                                                            		tmp = ((F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B;
                                                                                                            	} else {
                                                                                                            		tmp = -(x / B) + (fma((B * B), 0.16666666666666666, 1.0) / B);
                                                                                                            	}
                                                                                                            	return tmp;
                                                                                                            }
                                                                                                            
                                                                                                            function code(F, B, x)
                                                                                                            	tmp = 0.0
                                                                                                            	if (F <= -4e-13)
                                                                                                            		tmp = Float64(fma(Float64(0.5 / F), Float64(fma(2.0, x, 2.0) / F), Float64(-1.0 - x)) / B);
                                                                                                            	elseif (F <= 1e+45)
                                                                                                            		tmp = Float64(Float64(Float64(F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B);
                                                                                                            	else
                                                                                                            		tmp = Float64(Float64(-Float64(x / B)) + Float64(fma(Float64(B * B), 0.16666666666666666, 1.0) / B));
                                                                                                            	end
                                                                                                            	return tmp
                                                                                                            end
                                                                                                            
                                                                                                            code[F_, B_, x_] := If[LessEqual[F, -4e-13], N[(N[(N[(0.5 / F), $MachinePrecision] * N[(N[(2.0 * x + 2.0), $MachinePrecision] / F), $MachinePrecision] + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1e+45], N[(N[(N[(F / N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(B * B), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                                                                                                            
                                                                                                            \begin{array}{l}
                                                                                                            
                                                                                                            \\
                                                                                                            \begin{array}{l}
                                                                                                            \mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\
                                                                                                            \;\;\;\;\frac{\mathsf{fma}\left(\frac{0.5}{F}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F}, -1 - x\right)}{B}\\
                                                                                                            
                                                                                                            \mathbf{elif}\;F \leq 10^{+45}:\\
                                                                                                            \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                                                                                                            
                                                                                                            \mathbf{else}:\\
                                                                                                            \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\
                                                                                                            
                                                                                                            
                                                                                                            \end{array}
                                                                                                            \end{array}
                                                                                                            
                                                                                                            Derivation
                                                                                                            1. Split input into 3 regimes
                                                                                                            2. if F < -4.0000000000000001e-13

                                                                                                              1. Initial program 69.9%

                                                                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                              2. Add Preprocessing
                                                                                                              3. Taylor expanded in B around 0

                                                                                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                              4. Step-by-step derivation
                                                                                                                1. lower-/.f64N/A

                                                                                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                2. sub-negN/A

                                                                                                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                3. *-commutativeN/A

                                                                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                4. lower-fma.f64N/A

                                                                                                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                5. lower-sqrt.f64N/A

                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                6. lower-/.f64N/A

                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                7. associate-+r+N/A

                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                8. +-commutativeN/A

                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                9. unpow2N/A

                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                10. lower-fma.f64N/A

                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                11. +-commutativeN/A

                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                12. lower-fma.f64N/A

                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                13. lower-neg.f6433.1

                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                              5. Applied rewrites33.1%

                                                                                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                              6. Taylor expanded in F around -inf

                                                                                                                \[\leadsto \frac{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}{B} \]
                                                                                                              7. Step-by-step derivation
                                                                                                                1. Applied rewrites45.2%

                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{0.5}{F}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F}, -1 - x\right)}{B} \]

                                                                                                                if -4.0000000000000001e-13 < F < 9.9999999999999993e44

                                                                                                                1. Initial program 99.5%

                                                                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                2. Add Preprocessing
                                                                                                                3. Taylor expanded in B around 0

                                                                                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                4. Step-by-step derivation
                                                                                                                  1. lower-/.f64N/A

                                                                                                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                  2. sub-negN/A

                                                                                                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                  3. *-commutativeN/A

                                                                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                  4. lower-fma.f64N/A

                                                                                                                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                  5. lower-sqrt.f64N/A

                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                  6. lower-/.f64N/A

                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                  7. associate-+r+N/A

                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                  8. +-commutativeN/A

                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                  9. unpow2N/A

                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                  10. lower-fma.f64N/A

                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                  11. +-commutativeN/A

                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                  12. lower-fma.f64N/A

                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                  13. lower-neg.f6447.7

                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                                5. Applied rewrites47.7%

                                                                                                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                                6. Applied rewrites47.7%

                                                                                                                  \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                                                                                                                if 9.9999999999999993e44 < F

                                                                                                                1. Initial program 50.7%

                                                                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                2. Add Preprocessing
                                                                                                                3. Taylor expanded in B around 0

                                                                                                                  \[\leadsto \left(-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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                                                                  2. *-commutativeN/A

                                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                                                                  3. associate-*l*N/A

                                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                                                                  4. associate-*r*N/A

                                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                                                                  5. *-commutativeN/A

                                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                                                                  6. lower-/.f64N/A

                                                                                                                    \[\leadsto \left(-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 rewrites36.9%

                                                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                                                                6. Taylor expanded in F around inf

                                                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                                                                7. Step-by-step derivation
                                                                                                                  1. Applied rewrites63.1%

                                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                                                                  2. Taylor expanded in B around 0

                                                                                                                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. lower-/.f6456.2

                                                                                                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                                  4. Applied rewrites56.2%

                                                                                                                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                                8. Recombined 3 regimes into one program.
                                                                                                                9. Final simplification48.6%

                                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-13}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{0.5}{F}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F}, -1 - x\right)}{B}\\ \mathbf{elif}\;F \leq 10^{+45}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \]
                                                                                                                10. Add Preprocessing

                                                                                                                Alternative 25: 44.8% accurate, 7.2× speedup?

                                                                                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.6 \cdot 10^{-40}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.05 \cdot 10^{-47}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \end{array} \]
                                                                                                                (FPCore (F B x)
                                                                                                                 :precision binary64
                                                                                                                 (if (<= F -2.6e-40)
                                                                                                                   (/ (- -1.0 x) B)
                                                                                                                   (if (<= F 4.05e-47)
                                                                                                                     (/ (- x) B)
                                                                                                                     (+ (- (/ x B)) (/ (fma (* B B) 0.16666666666666666 1.0) B)))))
                                                                                                                double code(double F, double B, double x) {
                                                                                                                	double tmp;
                                                                                                                	if (F <= -2.6e-40) {
                                                                                                                		tmp = (-1.0 - x) / B;
                                                                                                                	} else if (F <= 4.05e-47) {
                                                                                                                		tmp = -x / B;
                                                                                                                	} else {
                                                                                                                		tmp = -(x / B) + (fma((B * B), 0.16666666666666666, 1.0) / B);
                                                                                                                	}
                                                                                                                	return tmp;
                                                                                                                }
                                                                                                                
                                                                                                                function code(F, B, x)
                                                                                                                	tmp = 0.0
                                                                                                                	if (F <= -2.6e-40)
                                                                                                                		tmp = Float64(Float64(-1.0 - x) / B);
                                                                                                                	elseif (F <= 4.05e-47)
                                                                                                                		tmp = Float64(Float64(-x) / B);
                                                                                                                	else
                                                                                                                		tmp = Float64(Float64(-Float64(x / B)) + Float64(fma(Float64(B * B), 0.16666666666666666, 1.0) / B));
                                                                                                                	end
                                                                                                                	return tmp
                                                                                                                end
                                                                                                                
                                                                                                                code[F_, B_, x_] := If[LessEqual[F, -2.6e-40], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.05e-47], N[((-x) / B), $MachinePrecision], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(B * B), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                                                                                                                
                                                                                                                \begin{array}{l}
                                                                                                                
                                                                                                                \\
                                                                                                                \begin{array}{l}
                                                                                                                \mathbf{if}\;F \leq -2.6 \cdot 10^{-40}:\\
                                                                                                                \;\;\;\;\frac{-1 - x}{B}\\
                                                                                                                
                                                                                                                \mathbf{elif}\;F \leq 4.05 \cdot 10^{-47}:\\
                                                                                                                \;\;\;\;\frac{-x}{B}\\
                                                                                                                
                                                                                                                \mathbf{else}:\\
                                                                                                                \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\
                                                                                                                
                                                                                                                
                                                                                                                \end{array}
                                                                                                                \end{array}
                                                                                                                
                                                                                                                Derivation
                                                                                                                1. Split input into 3 regimes
                                                                                                                2. if F < -2.6000000000000001e-40

                                                                                                                  1. Initial program 72.2%

                                                                                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                  2. Add Preprocessing
                                                                                                                  3. Taylor expanded in B around 0

                                                                                                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                  4. Step-by-step derivation
                                                                                                                    1. lower-/.f64N/A

                                                                                                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                    2. sub-negN/A

                                                                                                                      \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                    3. *-commutativeN/A

                                                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                    4. lower-fma.f64N/A

                                                                                                                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                    5. lower-sqrt.f64N/A

                                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                    6. lower-/.f64N/A

                                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                    7. associate-+r+N/A

                                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                    8. +-commutativeN/A

                                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                    9. unpow2N/A

                                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                    10. lower-fma.f64N/A

                                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                    11. +-commutativeN/A

                                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                    12. lower-fma.f64N/A

                                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                    13. lower-neg.f6434.1

                                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                                  5. Applied rewrites34.1%

                                                                                                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                                  6. Taylor expanded in F around -inf

                                                                                                                    \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                                                                                  7. Step-by-step derivation
                                                                                                                    1. Applied rewrites44.0%

                                                                                                                      \[\leadsto \frac{-1 - x}{B} \]

                                                                                                                    if -2.6000000000000001e-40 < F < 4.0500000000000002e-47

                                                                                                                    1. Initial program 99.5%

                                                                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                    2. Add Preprocessing
                                                                                                                    3. Taylor expanded in B around 0

                                                                                                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                    4. Step-by-step derivation
                                                                                                                      1. lower-/.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                      2. sub-negN/A

                                                                                                                        \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                      3. *-commutativeN/A

                                                                                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                      4. lower-fma.f64N/A

                                                                                                                        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                      5. lower-sqrt.f64N/A

                                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                      6. lower-/.f64N/A

                                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                      7. associate-+r+N/A

                                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                      8. +-commutativeN/A

                                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                      9. unpow2N/A

                                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                      10. lower-fma.f64N/A

                                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                      11. +-commutativeN/A

                                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                      12. lower-fma.f64N/A

                                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                      13. lower-neg.f6448.4

                                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                                    5. Applied rewrites48.4%

                                                                                                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                                    6. Taylor expanded in F around 0

                                                                                                                      \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                                                                    7. Step-by-step derivation
                                                                                                                      1. Applied rewrites42.7%

                                                                                                                        \[\leadsto \frac{-x}{B} \]

                                                                                                                      if 4.0500000000000002e-47 < F

                                                                                                                      1. Initial program 65.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}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}}{B} \]
                                                                                                                        2. *-commutativeN/A

                                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}}}{B} \]
                                                                                                                        3. associate-*l*N/A

                                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6}}{B} \]
                                                                                                                        4. associate-*r*N/A

                                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)}}{B} \]
                                                                                                                        5. *-commutativeN/A

                                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                                                                                        6. lower-/.f64N/A

                                                                                                                          \[\leadsto \left(-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 rewrites40.0%

                                                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right)}{B}} \]
                                                                                                                      6. Taylor expanded in F around inf

                                                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1 + \frac{1}{6} \cdot {B}^{2}}{\color{blue}{B}} \]
                                                                                                                      7. Step-by-step derivation
                                                                                                                        1. Applied rewrites52.0%

                                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{\color{blue}{B}} \]
                                                                                                                        2. Taylor expanded in B around 0

                                                                                                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, \frac{1}{6}, 1\right)}{B} \]
                                                                                                                        3. Step-by-step derivation
                                                                                                                          1. lower-/.f6447.1

                                                                                                                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                                        4. Applied rewrites47.1%

                                                                                                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B} \]
                                                                                                                      8. Recombined 3 regimes into one program.
                                                                                                                      9. Final simplification44.4%

                                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.6 \cdot 10^{-40}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.05 \cdot 10^{-47}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\mathsf{fma}\left(B \cdot B, 0.16666666666666666, 1\right)}{B}\\ \end{array} \]
                                                                                                                      10. Add Preprocessing

                                                                                                                      Alternative 26: 44.8% accurate, 13.6× speedup?

                                                                                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.6 \cdot 10^{-40}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.05 \cdot 10^{-47}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                                                                                      (FPCore (F B x)
                                                                                                                       :precision binary64
                                                                                                                       (if (<= F -2.6e-40)
                                                                                                                         (/ (- -1.0 x) B)
                                                                                                                         (if (<= F 4.05e-47) (/ (- x) B) (/ (- 1.0 x) B))))
                                                                                                                      double code(double F, double B, double x) {
                                                                                                                      	double tmp;
                                                                                                                      	if (F <= -2.6e-40) {
                                                                                                                      		tmp = (-1.0 - x) / B;
                                                                                                                      	} else if (F <= 4.05e-47) {
                                                                                                                      		tmp = -x / B;
                                                                                                                      	} else {
                                                                                                                      		tmp = (1.0 - x) / B;
                                                                                                                      	}
                                                                                                                      	return tmp;
                                                                                                                      }
                                                                                                                      
                                                                                                                      real(8) function code(f, b, x)
                                                                                                                          real(8), intent (in) :: f
                                                                                                                          real(8), intent (in) :: b
                                                                                                                          real(8), intent (in) :: x
                                                                                                                          real(8) :: tmp
                                                                                                                          if (f <= (-2.6d-40)) then
                                                                                                                              tmp = ((-1.0d0) - x) / b
                                                                                                                          else if (f <= 4.05d-47) then
                                                                                                                              tmp = -x / b
                                                                                                                          else
                                                                                                                              tmp = (1.0d0 - x) / b
                                                                                                                          end if
                                                                                                                          code = tmp
                                                                                                                      end function
                                                                                                                      
                                                                                                                      public static double code(double F, double B, double x) {
                                                                                                                      	double tmp;
                                                                                                                      	if (F <= -2.6e-40) {
                                                                                                                      		tmp = (-1.0 - x) / B;
                                                                                                                      	} else if (F <= 4.05e-47) {
                                                                                                                      		tmp = -x / B;
                                                                                                                      	} else {
                                                                                                                      		tmp = (1.0 - x) / B;
                                                                                                                      	}
                                                                                                                      	return tmp;
                                                                                                                      }
                                                                                                                      
                                                                                                                      def code(F, B, x):
                                                                                                                      	tmp = 0
                                                                                                                      	if F <= -2.6e-40:
                                                                                                                      		tmp = (-1.0 - x) / B
                                                                                                                      	elif F <= 4.05e-47:
                                                                                                                      		tmp = -x / B
                                                                                                                      	else:
                                                                                                                      		tmp = (1.0 - x) / B
                                                                                                                      	return tmp
                                                                                                                      
                                                                                                                      function code(F, B, x)
                                                                                                                      	tmp = 0.0
                                                                                                                      	if (F <= -2.6e-40)
                                                                                                                      		tmp = Float64(Float64(-1.0 - x) / B);
                                                                                                                      	elseif (F <= 4.05e-47)
                                                                                                                      		tmp = Float64(Float64(-x) / B);
                                                                                                                      	else
                                                                                                                      		tmp = Float64(Float64(1.0 - x) / B);
                                                                                                                      	end
                                                                                                                      	return tmp
                                                                                                                      end
                                                                                                                      
                                                                                                                      function tmp_2 = code(F, B, x)
                                                                                                                      	tmp = 0.0;
                                                                                                                      	if (F <= -2.6e-40)
                                                                                                                      		tmp = (-1.0 - x) / B;
                                                                                                                      	elseif (F <= 4.05e-47)
                                                                                                                      		tmp = -x / B;
                                                                                                                      	else
                                                                                                                      		tmp = (1.0 - x) / B;
                                                                                                                      	end
                                                                                                                      	tmp_2 = tmp;
                                                                                                                      end
                                                                                                                      
                                                                                                                      code[F_, B_, x_] := If[LessEqual[F, -2.6e-40], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.05e-47], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                                                                                      
                                                                                                                      \begin{array}{l}
                                                                                                                      
                                                                                                                      \\
                                                                                                                      \begin{array}{l}
                                                                                                                      \mathbf{if}\;F \leq -2.6 \cdot 10^{-40}:\\
                                                                                                                      \;\;\;\;\frac{-1 - x}{B}\\
                                                                                                                      
                                                                                                                      \mathbf{elif}\;F \leq 4.05 \cdot 10^{-47}:\\
                                                                                                                      \;\;\;\;\frac{-x}{B}\\
                                                                                                                      
                                                                                                                      \mathbf{else}:\\
                                                                                                                      \;\;\;\;\frac{1 - x}{B}\\
                                                                                                                      
                                                                                                                      
                                                                                                                      \end{array}
                                                                                                                      \end{array}
                                                                                                                      
                                                                                                                      Derivation
                                                                                                                      1. Split input into 3 regimes
                                                                                                                      2. if F < -2.6000000000000001e-40

                                                                                                                        1. Initial program 72.2%

                                                                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                        2. Add Preprocessing
                                                                                                                        3. Taylor expanded in B around 0

                                                                                                                          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                        4. Step-by-step derivation
                                                                                                                          1. lower-/.f64N/A

                                                                                                                            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                          2. sub-negN/A

                                                                                                                            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                          3. *-commutativeN/A

                                                                                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                          4. lower-fma.f64N/A

                                                                                                                            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                          5. lower-sqrt.f64N/A

                                                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                          6. lower-/.f64N/A

                                                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                          7. associate-+r+N/A

                                                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                          8. +-commutativeN/A

                                                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                          9. unpow2N/A

                                                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                          10. lower-fma.f64N/A

                                                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                          11. +-commutativeN/A

                                                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                          12. lower-fma.f64N/A

                                                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                          13. lower-neg.f6434.1

                                                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                                        5. Applied rewrites34.1%

                                                                                                                          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                                        6. Taylor expanded in F around -inf

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                                                                                        7. Step-by-step derivation
                                                                                                                          1. Applied rewrites44.0%

                                                                                                                            \[\leadsto \frac{-1 - x}{B} \]

                                                                                                                          if -2.6000000000000001e-40 < F < 4.0500000000000002e-47

                                                                                                                          1. Initial program 99.5%

                                                                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                          2. Add Preprocessing
                                                                                                                          3. Taylor expanded in B around 0

                                                                                                                            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                          4. Step-by-step derivation
                                                                                                                            1. lower-/.f64N/A

                                                                                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                            2. sub-negN/A

                                                                                                                              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                            3. *-commutativeN/A

                                                                                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                            4. lower-fma.f64N/A

                                                                                                                              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                            5. lower-sqrt.f64N/A

                                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                            6. lower-/.f64N/A

                                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                            7. associate-+r+N/A

                                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                            8. +-commutativeN/A

                                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                            9. unpow2N/A

                                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                            10. lower-fma.f64N/A

                                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                            11. +-commutativeN/A

                                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                            12. lower-fma.f64N/A

                                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                            13. lower-neg.f6448.4

                                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                                          5. Applied rewrites48.4%

                                                                                                                            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                                          6. Taylor expanded in F around 0

                                                                                                                            \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                                                                          7. Step-by-step derivation
                                                                                                                            1. Applied rewrites42.7%

                                                                                                                              \[\leadsto \frac{-x}{B} \]

                                                                                                                            if 4.0500000000000002e-47 < F

                                                                                                                            1. Initial program 65.1%

                                                                                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                            2. Add Preprocessing
                                                                                                                            3. Taylor expanded in B around 0

                                                                                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                            4. Step-by-step derivation
                                                                                                                              1. lower-/.f64N/A

                                                                                                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                              2. sub-negN/A

                                                                                                                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                              3. *-commutativeN/A

                                                                                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                              4. lower-fma.f64N/A

                                                                                                                                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                              5. lower-sqrt.f64N/A

                                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                              6. lower-/.f64N/A

                                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                              7. associate-+r+N/A

                                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                              8. +-commutativeN/A

                                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                              9. unpow2N/A

                                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                              10. lower-fma.f64N/A

                                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                              11. +-commutativeN/A

                                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                              12. lower-fma.f64N/A

                                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                              13. lower-neg.f6439.0

                                                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                                            5. Applied rewrites39.0%

                                                                                                                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                                            6. Taylor expanded in F around inf

                                                                                                                              \[\leadsto \frac{1 - x}{B} \]
                                                                                                                            7. Step-by-step derivation
                                                                                                                              1. Applied rewrites46.6%

                                                                                                                                \[\leadsto \frac{1 - x}{B} \]
                                                                                                                            8. Recombined 3 regimes into one program.
                                                                                                                            9. Final simplification44.2%

                                                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.6 \cdot 10^{-40}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.05 \cdot 10^{-47}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                                                                                                            10. Add Preprocessing

                                                                                                                            Alternative 27: 37.7% accurate, 17.5× speedup?

                                                                                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.6 \cdot 10^{-40}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \end{array} \]
                                                                                                                            (FPCore (F B x)
                                                                                                                             :precision binary64
                                                                                                                             (if (<= F -2.6e-40) (/ (- -1.0 x) B) (/ (- x) B)))
                                                                                                                            double code(double F, double B, double x) {
                                                                                                                            	double tmp;
                                                                                                                            	if (F <= -2.6e-40) {
                                                                                                                            		tmp = (-1.0 - x) / B;
                                                                                                                            	} else {
                                                                                                                            		tmp = -x / B;
                                                                                                                            	}
                                                                                                                            	return tmp;
                                                                                                                            }
                                                                                                                            
                                                                                                                            real(8) function code(f, b, x)
                                                                                                                                real(8), intent (in) :: f
                                                                                                                                real(8), intent (in) :: b
                                                                                                                                real(8), intent (in) :: x
                                                                                                                                real(8) :: tmp
                                                                                                                                if (f <= (-2.6d-40)) then
                                                                                                                                    tmp = ((-1.0d0) - x) / b
                                                                                                                                else
                                                                                                                                    tmp = -x / b
                                                                                                                                end if
                                                                                                                                code = tmp
                                                                                                                            end function
                                                                                                                            
                                                                                                                            public static double code(double F, double B, double x) {
                                                                                                                            	double tmp;
                                                                                                                            	if (F <= -2.6e-40) {
                                                                                                                            		tmp = (-1.0 - x) / B;
                                                                                                                            	} else {
                                                                                                                            		tmp = -x / B;
                                                                                                                            	}
                                                                                                                            	return tmp;
                                                                                                                            }
                                                                                                                            
                                                                                                                            def code(F, B, x):
                                                                                                                            	tmp = 0
                                                                                                                            	if F <= -2.6e-40:
                                                                                                                            		tmp = (-1.0 - x) / B
                                                                                                                            	else:
                                                                                                                            		tmp = -x / B
                                                                                                                            	return tmp
                                                                                                                            
                                                                                                                            function code(F, B, x)
                                                                                                                            	tmp = 0.0
                                                                                                                            	if (F <= -2.6e-40)
                                                                                                                            		tmp = Float64(Float64(-1.0 - x) / B);
                                                                                                                            	else
                                                                                                                            		tmp = Float64(Float64(-x) / B);
                                                                                                                            	end
                                                                                                                            	return tmp
                                                                                                                            end
                                                                                                                            
                                                                                                                            function tmp_2 = code(F, B, x)
                                                                                                                            	tmp = 0.0;
                                                                                                                            	if (F <= -2.6e-40)
                                                                                                                            		tmp = (-1.0 - x) / B;
                                                                                                                            	else
                                                                                                                            		tmp = -x / B;
                                                                                                                            	end
                                                                                                                            	tmp_2 = tmp;
                                                                                                                            end
                                                                                                                            
                                                                                                                            code[F_, B_, x_] := If[LessEqual[F, -2.6e-40], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
                                                                                                                            
                                                                                                                            \begin{array}{l}
                                                                                                                            
                                                                                                                            \\
                                                                                                                            \begin{array}{l}
                                                                                                                            \mathbf{if}\;F \leq -2.6 \cdot 10^{-40}:\\
                                                                                                                            \;\;\;\;\frac{-1 - x}{B}\\
                                                                                                                            
                                                                                                                            \mathbf{else}:\\
                                                                                                                            \;\;\;\;\frac{-x}{B}\\
                                                                                                                            
                                                                                                                            
                                                                                                                            \end{array}
                                                                                                                            \end{array}
                                                                                                                            
                                                                                                                            Derivation
                                                                                                                            1. Split input into 2 regimes
                                                                                                                            2. if F < -2.6000000000000001e-40

                                                                                                                              1. Initial program 72.2%

                                                                                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                              2. Add Preprocessing
                                                                                                                              3. Taylor expanded in B around 0

                                                                                                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                              4. Step-by-step derivation
                                                                                                                                1. lower-/.f64N/A

                                                                                                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                                2. sub-negN/A

                                                                                                                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                                3. *-commutativeN/A

                                                                                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                4. lower-fma.f64N/A

                                                                                                                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                                5. lower-sqrt.f64N/A

                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                6. lower-/.f64N/A

                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                7. associate-+r+N/A

                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                8. +-commutativeN/A

                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                9. unpow2N/A

                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                10. lower-fma.f64N/A

                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                11. +-commutativeN/A

                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                12. lower-fma.f64N/A

                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                13. lower-neg.f6434.1

                                                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                                              5. Applied rewrites34.1%

                                                                                                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                                              6. Taylor expanded in F around -inf

                                                                                                                                \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                                                                                              7. Step-by-step derivation
                                                                                                                                1. Applied rewrites44.0%

                                                                                                                                  \[\leadsto \frac{-1 - x}{B} \]

                                                                                                                                if -2.6000000000000001e-40 < F

                                                                                                                                1. Initial program 85.0%

                                                                                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                                2. Add Preprocessing
                                                                                                                                3. Taylor expanded in B around 0

                                                                                                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                                4. Step-by-step derivation
                                                                                                                                  1. lower-/.f64N/A

                                                                                                                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                                  2. sub-negN/A

                                                                                                                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                                  3. *-commutativeN/A

                                                                                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  4. lower-fma.f64N/A

                                                                                                                                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                                  5. lower-sqrt.f64N/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  6. lower-/.f64N/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  7. associate-+r+N/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  8. +-commutativeN/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  9. unpow2N/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  10. lower-fma.f64N/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  11. +-commutativeN/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  12. lower-fma.f64N/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  13. lower-neg.f6444.4

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                                                5. Applied rewrites44.4%

                                                                                                                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                                                6. Taylor expanded in F around 0

                                                                                                                                  \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                                                                                7. Step-by-step derivation
                                                                                                                                  1. Applied rewrites33.7%

                                                                                                                                    \[\leadsto \frac{-x}{B} \]
                                                                                                                                8. Recombined 2 regimes into one program.
                                                                                                                                9. Final simplification37.2%

                                                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.6 \cdot 10^{-40}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \]
                                                                                                                                10. Add Preprocessing

                                                                                                                                Alternative 28: 30.0% 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 80.6%

                                                                                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                                2. Add Preprocessing
                                                                                                                                3. Taylor expanded in B around 0

                                                                                                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                                4. Step-by-step derivation
                                                                                                                                  1. lower-/.f64N/A

                                                                                                                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                                                  2. sub-negN/A

                                                                                                                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                                  3. *-commutativeN/A

                                                                                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  4. lower-fma.f64N/A

                                                                                                                                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                                                  5. lower-sqrt.f64N/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  6. lower-/.f64N/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  7. associate-+r+N/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  8. +-commutativeN/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  9. unpow2N/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  10. lower-fma.f64N/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  11. +-commutativeN/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  12. lower-fma.f64N/A

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                                                  13. lower-neg.f6440.9

                                                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                                                5. Applied rewrites40.9%

                                                                                                                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                                                6. Taylor expanded in F around 0

                                                                                                                                  \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                                                                                7. Step-by-step derivation
                                                                                                                                  1. Applied rewrites28.5%

                                                                                                                                    \[\leadsto \frac{-x}{B} \]
                                                                                                                                  2. Final simplification28.5%

                                                                                                                                    \[\leadsto \frac{-x}{B} \]
                                                                                                                                  3. Add Preprocessing

                                                                                                                                  Reproduce

                                                                                                                                  ?
                                                                                                                                  herbie shell --seed 2024318 
                                                                                                                                  (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))))))