VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.0% → 99.6%
Time: 12.8s
Alternatives: 22
Speedup: 1.4×

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

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

Initial Program: 77.0% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.65 \cdot 10^{+154}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 185000000:\\ \;\;\;\;\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 -2.65e+154)
   (+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
   (if (<= F 185000000.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 <= -2.65e+154) {
		tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
	} else if (F <= 185000000.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 <= -2.65e+154)
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B)));
	elseif (F <= 185000000.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, -2.65e+154], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 185000000.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 -2.65 \cdot 10^{+154}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq 185000000:\\
\;\;\;\;\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 < -2.65000000000000012e154

    1. Initial program 36.5%

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

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

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

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

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

    if -2.65000000000000012e154 < F < 1.85e8

    1. Initial program 97.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 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 1.85e8 < F

    1. Initial program 54.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 rewrites73.8%

      \[\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}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.65 \cdot 10^{+154}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 185000000:\\ \;\;\;\;\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} \]
  5. Add Preprocessing

Alternative 2: 99.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.8 \cdot 10^{+150}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 185000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}}}{\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 -3.8e+150)
   (+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
   (if (<= F 185000000.0)
     (fma (/ (sqrt (pow (fma F F 2.0) -1.0)) (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 <= -3.8e+150) {
		tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
	} else if (F <= 185000000.0) {
		tmp = fma((sqrt(pow(fma(F, F, 2.0), -1.0)) / 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 <= -3.8e+150)
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B)));
	elseif (F <= 185000000.0)
		tmp = fma(Float64(sqrt((fma(F, F, 2.0) ^ -1.0)) / 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, -3.8e+150], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 185000000.0], N[(N[(N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $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 -3.8 \cdot 10^{+150}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq 185000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}}}{\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 < -3.79999999999999989e150

    1. Initial program 38.6%

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

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

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

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

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

    if -3.79999999999999989e150 < F < 1.85e8

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

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

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

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

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

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

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

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

    if 1.85e8 < F

    1. Initial program 54.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 rewrites73.8%

      \[\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}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.7%

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

Alternative 3: 99.6% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 38.6%

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

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

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

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

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

    if -3.79999999999999989e150 < F < 1.85e8

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

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

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

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

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

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

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

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

    if 1.85e8 < F

    1. Initial program 54.6%

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

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

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

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

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

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

Alternative 4: 91.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -0.32:\\ \;\;\;\;t\_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -6.2 \cdot 10^{-108}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 15500:\\ \;\;\;\;\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{else}:\\ \;\;\;\;t\_0 + {\sin B}^{-1}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (* x (/ -1.0 (tan B)))))
   (if (<= F -0.32)
     (+ t_0 (/ -1.0 (sin B)))
     (if (<= F -6.2e-108)
       (- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) (/ x B))
       (if (<= F 15500.0)
         (fma
          (/ (sqrt (pow (fma F F (fma 2.0 x 2.0)) -1.0)) B)
          F
          (/ (- x) (tan B)))
         (+ t_0 (pow (sin B) -1.0)))))))
double code(double F, double B, double x) {
	double t_0 = x * (-1.0 / tan(B));
	double tmp;
	if (F <= -0.32) {
		tmp = t_0 + (-1.0 / sin(B));
	} else if (F <= -6.2e-108) {
		tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - (x / B);
	} else if (F <= 15500.0) {
		tmp = fma((sqrt(pow(fma(F, F, fma(2.0, x, 2.0)), -1.0)) / B), F, (-x / tan(B)));
	} else {
		tmp = t_0 + pow(sin(B), -1.0);
	}
	return tmp;
}
function code(F, B, x)
	t_0 = Float64(x * Float64(-1.0 / tan(B)))
	tmp = 0.0
	if (F <= -0.32)
		tmp = Float64(t_0 + Float64(-1.0 / sin(B)));
	elseif (F <= -6.2e-108)
		tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - Float64(x / B));
	elseif (F <= 15500.0)
		tmp = fma(Float64(sqrt((fma(F, F, fma(2.0, x, 2.0)) ^ -1.0)) / B), F, Float64(Float64(-x) / tan(B)));
	else
		tmp = Float64(t_0 + (sin(B) ^ -1.0));
	end
	return tmp
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.32], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.2e-108], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 15500.0], 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], N[(t$95$0 + N[Power[N[Sin[B], $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq -6.2 \cdot 10^{-108}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 15500:\\
\;\;\;\;\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{else}:\\
\;\;\;\;t\_0 + {\sin B}^{-1}\\


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

    1. Initial program 61.6%

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

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

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

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

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

    if -0.320000000000000007 < F < -6.20000000000000028e-108

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

    if -6.20000000000000028e-108 < F < 15500

    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.f6485.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 rewrites85.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 15500 < F

    1. Initial program 55.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -0.32:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -6.2 \cdot 10^{-108}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 15500:\\ \;\;\;\;\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{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + {\sin B}^{-1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 98.9% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 61.1%

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

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

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

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

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

    if -1.44999999999999996 < F < 9800

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

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

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

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

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

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

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

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

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

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

      if 9800 < F

      1. Initial program 55.3%

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

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

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

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

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

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

    Alternative 6: 85.1% accurate, 1.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -0.32:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -6.2 \cdot 10^{-108}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{+38}:\\ \;\;\;\;\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{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (if (<= F -0.32)
       (+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
       (if (<= F -6.2e-108)
         (- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) (/ x B))
         (if (<= F 5.8e+38)
           (fma
            (/ (sqrt (pow (fma F F (fma 2.0 x 2.0)) -1.0)) B)
            F
            (/ (- x) (tan B)))
           (- (/ 1.0 (sin B)) (/ x B))))))
    double code(double F, double B, double x) {
    	double tmp;
    	if (F <= -0.32) {
    		tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
    	} else if (F <= -6.2e-108) {
    		tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - (x / B);
    	} else if (F <= 5.8e+38) {
    		tmp = fma((sqrt(pow(fma(F, F, fma(2.0, x, 2.0)), -1.0)) / B), F, (-x / tan(B)));
    	} else {
    		tmp = (1.0 / sin(B)) - (x / B);
    	}
    	return tmp;
    }
    
    function code(F, B, x)
    	tmp = 0.0
    	if (F <= -0.32)
    		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B)));
    	elseif (F <= -6.2e-108)
    		tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - Float64(x / B));
    	elseif (F <= 5.8e+38)
    		tmp = fma(Float64(sqrt((fma(F, F, fma(2.0, x, 2.0)) ^ -1.0)) / B), F, Float64(Float64(-x) / tan(B)));
    	else
    		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
    	end
    	return tmp
    end
    
    code[F_, B_, x_] := If[LessEqual[F, -0.32], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.2e-108], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.8e+38], 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], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;F \leq -0.32:\\
    \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
    
    \mathbf{elif}\;F \leq -6.2 \cdot 10^{-108}:\\
    \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
    
    \mathbf{elif}\;F \leq 5.8 \cdot 10^{+38}:\\
    \;\;\;\;\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{else}:\\
    \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if F < -0.320000000000000007

      1. Initial program 61.6%

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

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

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

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

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

      if -0.320000000000000007 < F < -6.20000000000000028e-108

      1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

      if -6.20000000000000028e-108 < F < 5.80000000000000013e38

      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.f6485.6

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

        \[\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 5.80000000000000013e38 < F

      1. Initial program 51.6%

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -0.32:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -6.2 \cdot 10^{-108}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{+38}:\\ \;\;\;\;\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{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
      11. Add Preprocessing

      Alternative 7: 78.9% accurate, 1.4× speedup?

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

        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. 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.4%

          \[\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.f6495.4

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

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

        if -1.4000000000000001e-12 < x < 2.7e-41

        1. Initial program 76.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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        4. Step-by-step derivation
          1. lower-/.f6466.2

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.4 \cdot 10^{-12} \lor \neg \left(x \leq 2.7 \cdot 10^{-41}\right):\\ \;\;\;\;\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{else}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 8: 65.1% accurate, 1.5× speedup?

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

        1. Initial program 60.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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        4. Step-by-step derivation
          1. lower-/.f6431.7

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

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

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

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

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

          if -5.5e18 < F < -1.12e-128

          1. Initial program 99.2%

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

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

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

          if -1.12e-128 < F < 1500

          1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
            13. lower-neg.f6453.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 rewrites53.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}} \]

          if 1500 < F

          1. Initial program 56.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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          4. Step-by-step derivation
            1. lower-/.f6436.5

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

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

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

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

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

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

          Alternative 9: 51.0% accurate, 1.7× speedup?

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

            1. Initial program 33.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -1.2499999999999999e174 < F < 9500

              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.8

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

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

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

              if 9500 < F

              1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666\right), B \cdot B, 1\right) - x}{B} \]
              10. Recombined 3 regimes into one program.
              11. Final simplification50.3%

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

              Alternative 10: 72.5% accurate, 2.2× speedup?

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

                1. Initial program 36.5%

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

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

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

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

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

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

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

                  if -2.65000000000000012e154 < F < 9.99999999999999972e58

                  1. Initial program 97.8%

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

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

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

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

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

                  if 9.99999999999999972e58 < F

                  1. Initial program 46.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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                  4. Step-by-step derivation
                    1. lower-/.f6426.4

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

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

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

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

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

                  Alternative 11: 72.4% accurate, 2.2× speedup?

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

                    1. Initial program 59.6%

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

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

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

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

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

                      \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - 1}}{\sin B} - \frac{x}{B} \]
                    8. Step-by-step derivation
                      1. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

                    if -6.50000000000000018e44 < F < 6.49999999999999998e58

                    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{F}{\sqrt{x \cdot 2 + \color{blue}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \sin B} - \frac{x}{B} \]
                      15. lower-fma.f6472.6

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

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

                    if 6.49999999999999998e58 < F

                    1. Initial program 46.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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    4. Step-by-step derivation
                      1. lower-/.f6426.4

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

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

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

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

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

                    Alternative 12: 72.5% accurate, 2.2× speedup?

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

                      1. Initial program 36.5%

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

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

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

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

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

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

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

                        if -2.65000000000000012e154 < F < 9.99999999999999972e58

                        1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

                        if 9.99999999999999972e58 < F

                        1. Initial program 46.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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        4. Step-by-step derivation
                          1. lower-/.f6426.4

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

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

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

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

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

                        Alternative 13: 72.5% accurate, 2.2× speedup?

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

                          1. Initial program 59.6%

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

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

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

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

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

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

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

                            if -2.30000000000000004e44 < F < 6.49999999999999998e58

                            1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{F}{\sqrt{x \cdot 2 + \color{blue}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \sin B} - \frac{x}{B} \]
                              15. lower-fma.f6472.6

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

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

                            if 6.49999999999999998e58 < F

                            1. Initial program 46.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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            4. Step-by-step derivation
                              1. lower-/.f6426.4

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

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

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

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

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

                            Alternative 14: 65.0% accurate, 2.7× speedup?

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

                              1. Initial program 63.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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              4. Step-by-step derivation
                                1. lower-/.f6435.5

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

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

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

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

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

                                if -2.19999999999999997e-13 < F < 1500

                                1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                  13. lower-neg.f6454.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 rewrites54.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. Applied rewrites54.1%

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

                                if 1500 < F

                                1. Initial program 56.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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                4. Step-by-step derivation
                                  1. lower-/.f6436.5

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

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

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

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

                                    \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{B} \]
                                9. Recombined 3 regimes into one program.
                                10. Final simplification65.0%

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

                                Alternative 15: 58.1% accurate, 2.8× speedup?

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

                                  1. Initial program 63.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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  4. Step-by-step derivation
                                    1. lower-/.f6435.5

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

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

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

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

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

                                    if -2.19999999999999997e-13 < F < 9500

                                    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                      13. lower-neg.f6454.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 rewrites54.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. Applied rewrites54.1%

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

                                    if 9500 < F

                                    1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666\right), B \cdot B, 1\right) - x}{B} \]
                                    10. Recombined 3 regimes into one program.
                                    11. Final simplification59.8%

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

                                    Alternative 16: 51.2% accurate, 6.1× speedup?

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

                                      1. Initial program 37.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.f6419.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 rewrites19.9%

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

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

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

                                        if -2.8999999999999999e160 < F < 9500

                                        1. Initial program 97.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.f6449.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 rewrites49.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 rewrites50.0%

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

                                        if 9500 < F

                                        1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666\right), B \cdot B, 1\right) - x}{B} \]
                                        10. Recombined 3 regimes into one program.
                                        11. Final simplification50.3%

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

                                        Alternative 17: 50.8% accurate, 6.8× speedup?

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

                                          1. Initial program 62.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.f6429.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 rewrites29.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 rewrites39.0%

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

                                            if -2.6999999999999998e-12 < F < 0.859999999999999987

                                            1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if 0.859999999999999987 < F

                                                1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666\right), B \cdot B, 1\right) - x}{B} \]
                                                10. Recombined 3 regimes into one program.
                                                11. Final simplification50.0%

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

                                                Alternative 18: 44.3% accurate, 7.4× speedup?

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

                                                  1. Initial program 63.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.f6430.5

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

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

                                                    \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites38.9%

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

                                                    if -4.2999999999999998e-29 < F < -3.19999999999999995e-117

                                                    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      13. lower-neg.f6459.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 rewrites59.1%

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

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

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

                                                        \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{B} \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites49.5%

                                                          \[\leadsto \frac{\sqrt{0.5} \cdot F}{B} \]

                                                        if -3.19999999999999995e-117 < F < 2.79999999999999995e-22

                                                        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.f6450.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 rewrites50.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 rewrites38.7%

                                                            \[\leadsto \frac{-x}{B} \]

                                                          if 2.79999999999999995e-22 < F

                                                          1. Initial program 58.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 rewrites76.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. Taylor expanded in B around 0

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

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

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

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

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

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

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

                                                              \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666\right), B \cdot B, 1\right) - x}{B} \]
                                                          10. Recombined 4 regimes into one program.
                                                          11. Final simplification44.4%

                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4.3 \cdot 10^{-29}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -3.2 \cdot 10^{-117}:\\ \;\;\;\;\frac{\sqrt{0.5} \cdot F}{B}\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{-22}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666\right), B \cdot B, 1\right) - x}{B}\\ \end{array} \]
                                                          12. Add Preprocessing

                                                          Alternative 19: 44.2% accurate, 9.4× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4.3 \cdot 10^{-29}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -3.2 \cdot 10^{-117}:\\ \;\;\;\;\frac{\sqrt{0.5} \cdot F}{B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-32}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                          (FPCore (F B x)
                                                           :precision binary64
                                                           (if (<= F -4.3e-29)
                                                             (/ (- -1.0 x) B)
                                                             (if (<= F -3.2e-117)
                                                               (/ (* (sqrt 0.5) F) B)
                                                               (if (<= F 7.5e-32) (/ (- x) B) (/ (- 1.0 x) B)))))
                                                          double code(double F, double B, double x) {
                                                          	double tmp;
                                                          	if (F <= -4.3e-29) {
                                                          		tmp = (-1.0 - x) / B;
                                                          	} else if (F <= -3.2e-117) {
                                                          		tmp = (sqrt(0.5) * F) / B;
                                                          	} else if (F <= 7.5e-32) {
                                                          		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 <= (-4.3d-29)) then
                                                                  tmp = ((-1.0d0) - x) / b
                                                              else if (f <= (-3.2d-117)) then
                                                                  tmp = (sqrt(0.5d0) * f) / b
                                                              else if (f <= 7.5d-32) 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 <= -4.3e-29) {
                                                          		tmp = (-1.0 - x) / B;
                                                          	} else if (F <= -3.2e-117) {
                                                          		tmp = (Math.sqrt(0.5) * F) / B;
                                                          	} else if (F <= 7.5e-32) {
                                                          		tmp = -x / B;
                                                          	} else {
                                                          		tmp = (1.0 - x) / B;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(F, B, x):
                                                          	tmp = 0
                                                          	if F <= -4.3e-29:
                                                          		tmp = (-1.0 - x) / B
                                                          	elif F <= -3.2e-117:
                                                          		tmp = (math.sqrt(0.5) * F) / B
                                                          	elif F <= 7.5e-32:
                                                          		tmp = -x / B
                                                          	else:
                                                          		tmp = (1.0 - x) / B
                                                          	return tmp
                                                          
                                                          function code(F, B, x)
                                                          	tmp = 0.0
                                                          	if (F <= -4.3e-29)
                                                          		tmp = Float64(Float64(-1.0 - x) / B);
                                                          	elseif (F <= -3.2e-117)
                                                          		tmp = Float64(Float64(sqrt(0.5) * F) / B);
                                                          	elseif (F <= 7.5e-32)
                                                          		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 <= -4.3e-29)
                                                          		tmp = (-1.0 - x) / B;
                                                          	elseif (F <= -3.2e-117)
                                                          		tmp = (sqrt(0.5) * F) / B;
                                                          	elseif (F <= 7.5e-32)
                                                          		tmp = -x / B;
                                                          	else
                                                          		tmp = (1.0 - x) / B;
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[F_, B_, x_] := If[LessEqual[F, -4.3e-29], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -3.2e-117], N[(N[(N[Sqrt[0.5], $MachinePrecision] * F), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.5e-32], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          \mathbf{if}\;F \leq -4.3 \cdot 10^{-29}:\\
                                                          \;\;\;\;\frac{-1 - x}{B}\\
                                                          
                                                          \mathbf{elif}\;F \leq -3.2 \cdot 10^{-117}:\\
                                                          \;\;\;\;\frac{\sqrt{0.5} \cdot F}{B}\\
                                                          
                                                          \mathbf{elif}\;F \leq 7.5 \cdot 10^{-32}:\\
                                                          \;\;\;\;\frac{-x}{B}\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\frac{1 - x}{B}\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 4 regimes
                                                          2. if F < -4.2999999999999998e-29

                                                            1. Initial program 63.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.f6430.5

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

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

                                                              \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites38.9%

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

                                                              if -4.2999999999999998e-29 < F < -3.19999999999999995e-117

                                                              1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                13. lower-neg.f6459.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 rewrites59.1%

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

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

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

                                                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{B} \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites49.5%

                                                                    \[\leadsto \frac{\sqrt{0.5} \cdot F}{B} \]

                                                                  if -3.19999999999999995e-117 < F < 7.49999999999999953e-32

                                                                  1. Initial program 99.6%

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

                                                                    \[\leadsto \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.f6451.5

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

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

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

                                                                      \[\leadsto \frac{-x}{B} \]

                                                                    if 7.49999999999999953e-32 < F

                                                                    1. Initial program 59.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.f6444.5

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

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

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

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

                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4.3 \cdot 10^{-29}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -3.2 \cdot 10^{-117}:\\ \;\;\;\;\frac{\sqrt{0.5} \cdot F}{B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-32}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                                                    10. Add Preprocessing

                                                                    Alternative 20: 44.0% accurate, 13.6× speedup?

                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6.2 \cdot 10^{-41}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-32}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                                    (FPCore (F B x)
                                                                     :precision binary64
                                                                     (if (<= F -6.2e-41)
                                                                       (/ (- -1.0 x) B)
                                                                       (if (<= F 7.5e-32) (/ (- x) B) (/ (- 1.0 x) B))))
                                                                    double code(double F, double B, double x) {
                                                                    	double tmp;
                                                                    	if (F <= -6.2e-41) {
                                                                    		tmp = (-1.0 - x) / B;
                                                                    	} else if (F <= 7.5e-32) {
                                                                    		tmp = -x / B;
                                                                    	} else {
                                                                    		tmp = (1.0 - x) / B;
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    real(8) function code(f, b, x)
                                                                        real(8), intent (in) :: f
                                                                        real(8), intent (in) :: b
                                                                        real(8), intent (in) :: x
                                                                        real(8) :: tmp
                                                                        if (f <= (-6.2d-41)) then
                                                                            tmp = ((-1.0d0) - x) / b
                                                                        else if (f <= 7.5d-32) then
                                                                            tmp = -x / b
                                                                        else
                                                                            tmp = (1.0d0 - x) / b
                                                                        end if
                                                                        code = tmp
                                                                    end function
                                                                    
                                                                    public static double code(double F, double B, double x) {
                                                                    	double tmp;
                                                                    	if (F <= -6.2e-41) {
                                                                    		tmp = (-1.0 - x) / B;
                                                                    	} else if (F <= 7.5e-32) {
                                                                    		tmp = -x / B;
                                                                    	} else {
                                                                    		tmp = (1.0 - x) / B;
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    def code(F, B, x):
                                                                    	tmp = 0
                                                                    	if F <= -6.2e-41:
                                                                    		tmp = (-1.0 - x) / B
                                                                    	elif F <= 7.5e-32:
                                                                    		tmp = -x / B
                                                                    	else:
                                                                    		tmp = (1.0 - x) / B
                                                                    	return tmp
                                                                    
                                                                    function code(F, B, x)
                                                                    	tmp = 0.0
                                                                    	if (F <= -6.2e-41)
                                                                    		tmp = Float64(Float64(-1.0 - x) / B);
                                                                    	elseif (F <= 7.5e-32)
                                                                    		tmp = Float64(Float64(-x) / B);
                                                                    	else
                                                                    		tmp = Float64(Float64(1.0 - x) / B);
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    function tmp_2 = code(F, B, x)
                                                                    	tmp = 0.0;
                                                                    	if (F <= -6.2e-41)
                                                                    		tmp = (-1.0 - x) / B;
                                                                    	elseif (F <= 7.5e-32)
                                                                    		tmp = -x / B;
                                                                    	else
                                                                    		tmp = (1.0 - x) / B;
                                                                    	end
                                                                    	tmp_2 = tmp;
                                                                    end
                                                                    
                                                                    code[F_, B_, x_] := If[LessEqual[F, -6.2e-41], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.5e-32], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                                    
                                                                    \begin{array}{l}
                                                                    
                                                                    \\
                                                                    \begin{array}{l}
                                                                    \mathbf{if}\;F \leq -6.2 \cdot 10^{-41}:\\
                                                                    \;\;\;\;\frac{-1 - x}{B}\\
                                                                    
                                                                    \mathbf{elif}\;F \leq 7.5 \cdot 10^{-32}:\\
                                                                    \;\;\;\;\frac{-x}{B}\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;\frac{1 - x}{B}\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 3 regimes
                                                                    2. if F < -6.20000000000000001e-41

                                                                      1. Initial program 64.7%

                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      2. Add Preprocessing
                                                                      3. 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.f6432.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 rewrites32.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 rewrites38.2%

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

                                                                        if -6.20000000000000001e-41 < F < 7.49999999999999953e-32

                                                                        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.f6452.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 rewrites52.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 0

                                                                          \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                        7. Step-by-step derivation
                                                                          1. Applied rewrites35.2%

                                                                            \[\leadsto \frac{-x}{B} \]

                                                                          if 7.49999999999999953e-32 < F

                                                                          1. Initial program 59.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.f6444.5

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

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

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

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

                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.2 \cdot 10^{-41}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-32}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                                                          10. Add Preprocessing

                                                                          Alternative 21: 37.0% accurate, 17.5× speedup?

                                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6.2 \cdot 10^{-41}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \end{array} \]
                                                                          (FPCore (F B x)
                                                                           :precision binary64
                                                                           (if (<= F -6.2e-41) (/ (- -1.0 x) B) (/ (- x) B)))
                                                                          double code(double F, double B, double x) {
                                                                          	double tmp;
                                                                          	if (F <= -6.2e-41) {
                                                                          		tmp = (-1.0 - x) / B;
                                                                          	} else {
                                                                          		tmp = -x / B;
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          real(8) function code(f, b, x)
                                                                              real(8), intent (in) :: f
                                                                              real(8), intent (in) :: b
                                                                              real(8), intent (in) :: x
                                                                              real(8) :: tmp
                                                                              if (f <= (-6.2d-41)) then
                                                                                  tmp = ((-1.0d0) - x) / b
                                                                              else
                                                                                  tmp = -x / b
                                                                              end if
                                                                              code = tmp
                                                                          end function
                                                                          
                                                                          public static double code(double F, double B, double x) {
                                                                          	double tmp;
                                                                          	if (F <= -6.2e-41) {
                                                                          		tmp = (-1.0 - x) / B;
                                                                          	} else {
                                                                          		tmp = -x / B;
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          def code(F, B, x):
                                                                          	tmp = 0
                                                                          	if F <= -6.2e-41:
                                                                          		tmp = (-1.0 - x) / B
                                                                          	else:
                                                                          		tmp = -x / B
                                                                          	return tmp
                                                                          
                                                                          function code(F, B, x)
                                                                          	tmp = 0.0
                                                                          	if (F <= -6.2e-41)
                                                                          		tmp = Float64(Float64(-1.0 - x) / B);
                                                                          	else
                                                                          		tmp = Float64(Float64(-x) / B);
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          function tmp_2 = code(F, B, x)
                                                                          	tmp = 0.0;
                                                                          	if (F <= -6.2e-41)
                                                                          		tmp = (-1.0 - x) / B;
                                                                          	else
                                                                          		tmp = -x / B;
                                                                          	end
                                                                          	tmp_2 = tmp;
                                                                          end
                                                                          
                                                                          code[F_, B_, x_] := If[LessEqual[F, -6.2e-41], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \begin{array}{l}
                                                                          \mathbf{if}\;F \leq -6.2 \cdot 10^{-41}:\\
                                                                          \;\;\;\;\frac{-1 - x}{B}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\frac{-x}{B}\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 2 regimes
                                                                          2. if F < -6.20000000000000001e-41

                                                                            1. Initial program 64.7%

                                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                            2. Add Preprocessing
                                                                            3. 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.f6432.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 rewrites32.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 rewrites38.2%

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

                                                                              if -6.20000000000000001e-41 < F

                                                                              1. Initial program 83.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.f6448.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 rewrites48.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 rewrites34.4%

                                                                                  \[\leadsto \frac{-x}{B} \]
                                                                              8. Recombined 2 regimes into one program.
                                                                              9. Final simplification35.6%

                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.2 \cdot 10^{-41}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \]
                                                                              10. Add Preprocessing

                                                                              Alternative 22: 30.2% 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 77.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.f6443.4

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

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

                                                                                \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                              7. Step-by-step derivation
                                                                                1. Applied rewrites29.4%

                                                                                  \[\leadsto \frac{-x}{B} \]
                                                                                2. Final simplification29.4%

                                                                                  \[\leadsto \frac{-x}{B} \]
                                                                                3. Add Preprocessing

                                                                                Reproduce

                                                                                ?
                                                                                herbie shell --seed 2024323 
                                                                                (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))))))