VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.5% → 99.7%
Time: 9.5s
Alternatives: 21
Speedup: 2.2×

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 21 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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 1.4× speedup?

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

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

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

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


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

    1. Initial program 53.1%

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

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

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

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

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

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

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

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

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

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

    if -2.25e27 < F < 1.5e8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.5e8 < F

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.7% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)} \cdot \sin B} - t\_0\\

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


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

    1. Initial program 53.1%

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

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

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

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

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

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

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

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

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

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

    if -2.25e27 < F < 1e8

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e8 < F

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.0% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{\sqrt{0.5}}{\sin B} \cdot F - t\_0\\

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


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

    1. Initial program 56.6%

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

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

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

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

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

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

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

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

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

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

    if -10.199999999999999 < F < 1.3999999999999999

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-\frac{x}{\tan B}\right) + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2}} \]
    9. Step-by-step derivation
      1. Applied rewrites99.5%

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

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

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

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

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

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

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

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

      if 1.3999999999999999 < F

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -10.2:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.4:\\ \;\;\;\;\frac{\sqrt{0.5}}{\sin B} \cdot F - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
    12. Add Preprocessing

    Alternative 4: 91.8% accurate, 1.5× speedup?

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

      1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

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

      if -4.6000000000000002e-8 < F < -3.6000000000000001e-109

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.6000000000000001e-109 < F < 240

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 240 < F

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 84.4% accurate, 1.6× speedup?

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

      1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

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

      if -4.6000000000000002e-8 < F < -3.6000000000000001e-109

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.6000000000000001e-109 < F < 7.8000000000000004e130

      1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 7.8000000000000004e130 < F

      1. Initial program 32.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{1}}{\sin B} \]
      11. Step-by-step derivation
        1. Applied rewrites80.4%

          \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{1}}{\sin B} \]
      12. Recombined 4 regimes into one program.
      13. Final simplification88.4%

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

      Alternative 6: 78.8% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -9.9999999999999998e119 < F < -3.6000000000000001e-109

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -3.6000000000000001e-109 < F < 7.8000000000000004e130

          1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 7.8000000000000004e130 < F

          1. Initial program 32.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{1}}{\sin B} \]
          11. Step-by-step derivation
            1. Applied rewrites80.4%

              \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{1}}{\sin B} \]
          12. Recombined 4 regimes into one program.
          13. Final simplification83.4%

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

          Alternative 7: 78.7% accurate, 2.1× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{+46}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -3.6 \cdot 10^{-109}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 7.8 \cdot 10^{+130}:\\ \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(2, x, F \cdot F\right) + 2} \cdot B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
          (FPCore (F B x)
           :precision binary64
           (if (<= F -2.4e+46)
             (- (/ -1.0 (sin B)) (/ x B))
             (if (<= F -3.6e-109)
               (- (* (sqrt (/ 1.0 (fma F F 2.0))) (/ F (sin B))) (/ x B))
               (if (<= F 7.8e+130)
                 (- (/ F (* (sqrt (+ (fma 2.0 x (* F F)) 2.0)) B)) (/ x (tan B)))
                 (- (/ 1.0 (sin B)) (/ x B))))))
          double code(double F, double B, double x) {
          	double tmp;
          	if (F <= -2.4e+46) {
          		tmp = (-1.0 / sin(B)) - (x / B);
          	} else if (F <= -3.6e-109) {
          		tmp = (sqrt((1.0 / fma(F, F, 2.0))) * (F / sin(B))) - (x / B);
          	} else if (F <= 7.8e+130) {
          		tmp = (F / (sqrt((fma(2.0, x, (F * F)) + 2.0)) * B)) - (x / tan(B));
          	} else {
          		tmp = (1.0 / sin(B)) - (x / B);
          	}
          	return tmp;
          }
          
          function code(F, B, x)
          	tmp = 0.0
          	if (F <= -2.4e+46)
          		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
          	elseif (F <= -3.6e-109)
          		tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * Float64(F / sin(B))) - Float64(x / B));
          	elseif (F <= 7.8e+130)
          		tmp = Float64(Float64(F / Float64(sqrt(Float64(fma(2.0, x, Float64(F * F)) + 2.0)) * B)) - 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, -2.4e+46], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.6e-109], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.8e+130], N[(N[(F / N[(N[Sqrt[N[(N[(2.0 * x + N[(F * F), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]], $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - 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 -2.4 \cdot 10^{+46}:\\
          \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
          
          \mathbf{elif}\;F \leq -3.6 \cdot 10^{-109}:\\
          \;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\sin B} - \frac{x}{B}\\
          
          \mathbf{elif}\;F \leq 7.8 \cdot 10^{+130}:\\
          \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(2, x, F \cdot F\right) + 2} \cdot B} - \frac{x}{\tan B}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if F < -2.40000000000000008e46

            1. Initial program 50.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{-1}}{\sin B} \]
            11. Step-by-step derivation
              1. Applied rewrites80.6%

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

              if -2.40000000000000008e46 < F < -3.6000000000000001e-109

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -3.6000000000000001e-109 < F < 7.8000000000000004e130

              1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 7.8000000000000004e130 < F

              1. Initial program 32.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{1}}{\sin B} \]
              11. Step-by-step derivation
                1. Applied rewrites80.4%

                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{1}}{\sin B} \]
              12. Recombined 4 regimes into one program.
              13. Final simplification83.4%

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

              Alternative 8: 78.8% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{-1}}{\sin B} \]
                11. Step-by-step derivation
                  1. Applied rewrites80.8%

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

                  if -7600 < F < -3.6000000000000001e-109

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -3.6000000000000001e-109 < F < 7.8000000000000004e130

                  1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 7.8000000000000004e130 < F

                  1. Initial program 32.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{1}}{\sin B} \]
                  11. Step-by-step derivation
                    1. Applied rewrites80.4%

                      \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{1}}{\sin B} \]
                  12. Recombined 4 regimes into one program.
                  13. Final simplification83.4%

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

                  Alternative 9: 78.4% accurate, 2.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{-1}}{\sin B} \]
                    11. Step-by-step derivation
                      1. Applied rewrites80.8%

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

                      if -7600 < F < -3.6000000000000001e-109

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -3.6000000000000001e-109 < F < 1.3999999999999999

                      1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 1.3999999999999999 < F

                          1. Initial program 55.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 10: 78.2% accurate, 2.2× speedup?

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

                            1. Initial program 56.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{-1}}{\sin B} \]
                            11. Step-by-step derivation
                              1. Applied rewrites80.5%

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

                              if -10.199999999999999 < F < -3.6000000000000001e-109

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(-\frac{x}{\tan B}\right) + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2}} \]
                              9. Step-by-step derivation
                                1. Applied rewrites99.5%

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

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

                                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot \sqrt{0.5} \]
                                4. Applied rewrites89.8%

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

                                if -3.6000000000000001e-109 < F < 1.3999999999999999

                                1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 1.3999999999999999 < F

                                    1. Initial program 55.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 11: 78.2% accurate, 2.2× speedup?

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

                                      1. Initial program 56.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{-1}}{\sin B} \]
                                      11. Step-by-step derivation
                                        1. Applied rewrites80.5%

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

                                        if -10.199999999999999 < F < -3.6000000000000001e-109

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(-\frac{x}{\tan B}\right) + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2}} \]
                                        9. Step-by-step derivation
                                          1. Applied rewrites99.5%

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

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

                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot \sqrt{0.5} \]
                                          4. Applied rewrites89.8%

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

                                          if -3.6000000000000001e-109 < F < 1.3999999999999999

                                          1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \sqrt{\frac{1}{2}}}{B} \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites85.7%

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

                                              if 1.3999999999999999 < F

                                              1. Initial program 55.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -10.2:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -3.6 \cdot 10^{-109}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.4:\\ \;\;\;\;\frac{\sqrt{0.5} \cdot F}{B} - \frac{1}{\tan B} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} + \frac{-1}{\tan B} \cdot x\\ \end{array} \]
                                              10. Add Preprocessing

                                              Alternative 12: 66.7% accurate, 2.4× speedup?

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

                                                1. Initial program 56.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{-1}}{\sin B} \]
                                                11. Step-by-step derivation
                                                  1. Applied rewrites80.5%

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

                                                  if -10.199999999999999 < F < -2.00000000000000012e-295

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \left(-\frac{x}{\tan B}\right) + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2}} \]
                                                  9. Step-by-step derivation
                                                    1. Applied rewrites99.5%

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

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

                                                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot \sqrt{0.5} \]
                                                    4. Applied rewrites76.2%

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

                                                    if -2.00000000000000012e-295 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -10.2:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -2 \cdot 10^{-295}:\\ \;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} + \frac{-1}{\tan B} \cdot x\\ \end{array} \]
                                                    10. Add Preprocessing

                                                    Alternative 13: 62.8% accurate, 2.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{-1}}{\sin B} \]
                                                      11. Step-by-step derivation
                                                        1. Applied rewrites82.1%

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

                                                        if -16000 < F < -6.30000000000000014e-209

                                                        1. Initial program 99.5%

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

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

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

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

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

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                          5. +-commutativeN/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                          6. lower-+.f64N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                          7. lower-fma.f64N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                          8. unpow2N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                          9. lower-*.f64N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                          10. lower-/.f6477.0

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                        5. Applied rewrites77.0%

                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                        6. Taylor expanded in B around 0

                                                          \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                        7. Step-by-step derivation
                                                          1. lower-/.f64N/A

                                                            \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                          2. +-commutativeN/A

                                                            \[\leadsto \left(-x \cdot \frac{\color{blue}{{B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                          3. *-commutativeN/A

                                                            \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) \cdot {B}^{2}} + 1}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                          4. lower-fma.f64N/A

                                                            \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                          5. sub-negN/A

                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{45} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                          6. metadata-evalN/A

                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} + \color{blue}{\frac{-1}{3}}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                          7. lower-fma.f64N/A

                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{45}, {B}^{2}, \frac{-1}{3}\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                          8. unpow2N/A

                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                          9. lower-*.f64N/A

                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                          10. unpow2N/A

                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                          11. lower-*.f6460.3

                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                        8. Applied rewrites60.3%

                                                          \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]

                                                        if -6.30000000000000014e-209 < F

                                                        1. Initial program 78.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(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                        4. Step-by-step derivation
                                                          1. *-commutativeN/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                          2. lower-*.f64N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                          3. lower-sqrt.f64N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                          4. lower-/.f64N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                          5. +-commutativeN/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                          6. lower-+.f64N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                          7. lower-fma.f64N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                          8. unpow2N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                          9. lower-*.f64N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                          10. lower-/.f6466.5

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                        5. Applied rewrites66.5%

                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                        6. Taylor expanded in F around inf

                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\color{blue}{B}} \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites67.4%

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\color{blue}{B}} \]
                                                        8. Recombined 3 regimes into one program.
                                                        9. Final simplification69.7%

                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -16000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -6.3 \cdot 10^{-209}:\\ \;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} + \frac{-1}{\tan B} \cdot x\\ \end{array} \]
                                                        10. Add Preprocessing

                                                        Alternative 14: 65.3% accurate, 2.7× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -16000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 240:\\ \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
                                                        (FPCore (F B x)
                                                         :precision binary64
                                                         (if (<= F -16000.0)
                                                           (- (/ -1.0 (sin B)) (/ x B))
                                                           (if (<= F 240.0)
                                                             (-
                                                              (/ F (* (sqrt (fma x 2.0 (fma F F 2.0))) B))
                                                              (*
                                                               (/
                                                                (fma
                                                                 (fma -0.022222222222222223 (* B B) -0.3333333333333333)
                                                                 (* B B)
                                                                 1.0)
                                                                B)
                                                               x))
                                                             (- (/ 1.0 (sin B)) (/ x B)))))
                                                        double code(double F, double B, double x) {
                                                        	double tmp;
                                                        	if (F <= -16000.0) {
                                                        		tmp = (-1.0 / sin(B)) - (x / B);
                                                        	} else if (F <= 240.0) {
                                                        		tmp = (F / (sqrt(fma(x, 2.0, fma(F, F, 2.0))) * B)) - ((fma(fma(-0.022222222222222223, (B * B), -0.3333333333333333), (B * B), 1.0) / B) * x);
                                                        	} else {
                                                        		tmp = (1.0 / sin(B)) - (x / B);
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        function code(F, B, x)
                                                        	tmp = 0.0
                                                        	if (F <= -16000.0)
                                                        		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
                                                        	elseif (F <= 240.0)
                                                        		tmp = Float64(Float64(F / Float64(sqrt(fma(x, 2.0, fma(F, F, 2.0))) * B)) - Float64(Float64(fma(fma(-0.022222222222222223, Float64(B * B), -0.3333333333333333), Float64(B * B), 1.0) / B) * x));
                                                        	else
                                                        		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        code[F_, B_, x_] := If[LessEqual[F, -16000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 240.0], N[(N[(F / N[(N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(-0.022222222222222223 * N[(B * B), $MachinePrecision] + -0.3333333333333333), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] * x), $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 -16000:\\
                                                        \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
                                                        
                                                        \mathbf{elif}\;F \leq 240:\\
                                                        \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 3 regimes
                                                        2. if F < -16000

                                                          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 \left(-\color{blue}{x \cdot \frac{1}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. lift-/.f64N/A

                                                              \[\leadsto \left(-x \cdot \color{blue}{\frac{1}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            3. un-div-invN/A

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            4. lower-/.f6454.7

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                          4. Applied rewrites54.7%

                                                            \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                          5. Step-by-step derivation
                                                            1. lift-*.f64N/A

                                                              \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                            2. lift-/.f64N/A

                                                              \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            3. associate-*l/N/A

                                                              \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} \]
                                                            4. lower-/.f64N/A

                                                              \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} \]
                                                          6. Applied rewrites66.2%

                                                            \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}} \]
                                                          7. Taylor expanded in B around 0

                                                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
                                                          8. Step-by-step derivation
                                                            1. lower-/.f6448.0

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
                                                          9. Applied rewrites48.0%

                                                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
                                                          10. Taylor expanded in F around -inf

                                                            \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{-1}}{\sin B} \]
                                                          11. Step-by-step derivation
                                                            1. Applied rewrites82.1%

                                                              \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{-1}}{\sin B} \]

                                                            if -16000 < F < 240

                                                            1. Initial program 99.5%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Add Preprocessing
                                                            3. Taylor expanded in B around 0

                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                            4. Step-by-step derivation
                                                              1. *-commutativeN/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                              2. lower-*.f64N/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                              3. lower-sqrt.f64N/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                              4. lower-/.f64N/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                              5. +-commutativeN/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                              6. lower-+.f64N/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                              7. lower-fma.f64N/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                              8. unpow2N/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                              9. lower-*.f64N/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                              10. lower-/.f6481.9

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                            5. Applied rewrites81.9%

                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                            6. Taylor expanded in B around 0

                                                              \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                            7. Step-by-step derivation
                                                              1. lower-/.f64N/A

                                                                \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                              2. +-commutativeN/A

                                                                \[\leadsto \left(-x \cdot \frac{\color{blue}{{B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                              3. *-commutativeN/A

                                                                \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) \cdot {B}^{2}} + 1}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                              4. lower-fma.f64N/A

                                                                \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                              5. sub-negN/A

                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{45} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                              6. metadata-evalN/A

                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} + \color{blue}{\frac{-1}{3}}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                              7. lower-fma.f64N/A

                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{45}, {B}^{2}, \frac{-1}{3}\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                              8. unpow2N/A

                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                              9. lower-*.f64N/A

                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                              10. unpow2N/A

                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                              11. lower-*.f6447.2

                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                            8. Applied rewrites47.2%

                                                              \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                            9. Step-by-step derivation
                                                              1. Applied rewrites47.2%

                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}\right) + \frac{F}{\color{blue}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B}} \]

                                                              if 240 < F

                                                              1. Initial program 55.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 \left(-\color{blue}{x \cdot \frac{1}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                2. lift-/.f64N/A

                                                                  \[\leadsto \left(-x \cdot \color{blue}{\frac{1}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                3. un-div-invN/A

                                                                  \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                4. lower-/.f6455.3

                                                                  \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              4. Applied rewrites55.3%

                                                                \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              5. Step-by-step derivation
                                                                1. lift-*.f64N/A

                                                                  \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                2. lift-/.f64N/A

                                                                  \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                3. associate-*l/N/A

                                                                  \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} \]
                                                                4. lower-/.f64N/A

                                                                  \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} \]
                                                              6. Applied rewrites72.5%

                                                                \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}} \]
                                                              7. Taylor expanded in B around 0

                                                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
                                                              8. Step-by-step derivation
                                                                1. lower-/.f6447.2

                                                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
                                                              9. Applied rewrites47.2%

                                                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
                                                              10. Taylor expanded in F around inf

                                                                \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{1}}{\sin B} \]
                                                              11. Step-by-step derivation
                                                                1. Applied rewrites74.2%

                                                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{1}}{\sin B} \]
                                                              12. Recombined 3 regimes into one program.
                                                              13. Final simplification63.0%

                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -16000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 240:\\ \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
                                                              14. Add Preprocessing

                                                              Alternative 15: 55.8% accurate, 2.7× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 0.052:\\ \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B} + \frac{-1}{\tan B} \cdot x\\ \end{array} \end{array} \]
                                                              (FPCore (F B x)
                                                               :precision binary64
                                                               (if (<= B 0.052)
                                                                 (-
                                                                  (/ F (* (sqrt (fma x 2.0 (fma F F 2.0))) B))
                                                                  (*
                                                                   (/
                                                                    (fma (fma -0.022222222222222223 (* B B) -0.3333333333333333) (* B B) 1.0)
                                                                    B)
                                                                   x))
                                                                 (+ (/ -1.0 B) (* (/ -1.0 (tan B)) x))))
                                                              double code(double F, double B, double x) {
                                                              	double tmp;
                                                              	if (B <= 0.052) {
                                                              		tmp = (F / (sqrt(fma(x, 2.0, fma(F, F, 2.0))) * B)) - ((fma(fma(-0.022222222222222223, (B * B), -0.3333333333333333), (B * B), 1.0) / B) * x);
                                                              	} else {
                                                              		tmp = (-1.0 / B) + ((-1.0 / tan(B)) * x);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              function code(F, B, x)
                                                              	tmp = 0.0
                                                              	if (B <= 0.052)
                                                              		tmp = Float64(Float64(F / Float64(sqrt(fma(x, 2.0, fma(F, F, 2.0))) * B)) - Float64(Float64(fma(fma(-0.022222222222222223, Float64(B * B), -0.3333333333333333), Float64(B * B), 1.0) / B) * x));
                                                              	else
                                                              		tmp = Float64(Float64(-1.0 / B) + Float64(Float64(-1.0 / tan(B)) * x));
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              code[F_, B_, x_] := If[LessEqual[B, 0.052], N[(N[(F / N[(N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(-0.022222222222222223 * N[(B * B), $MachinePrecision] + -0.3333333333333333), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] + N[(N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              \mathbf{if}\;B \leq 0.052:\\
                                                              \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\frac{-1}{B} + \frac{-1}{\tan B} \cdot x\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if B < 0.0519999999999999976

                                                                1. Initial program 74.1%

                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in B around 0

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                4. Step-by-step derivation
                                                                  1. *-commutativeN/A

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                  2. lower-*.f64N/A

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                  3. lower-sqrt.f64N/A

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                  4. lower-/.f64N/A

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                  5. +-commutativeN/A

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                  6. lower-+.f64N/A

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                  7. lower-fma.f64N/A

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                  8. unpow2N/A

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                  9. lower-*.f64N/A

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                  10. lower-/.f6462.1

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                5. Applied rewrites62.1%

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                6. Taylor expanded in B around 0

                                                                  \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                7. Step-by-step derivation
                                                                  1. lower-/.f64N/A

                                                                    \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                  2. +-commutativeN/A

                                                                    \[\leadsto \left(-x \cdot \frac{\color{blue}{{B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                  3. *-commutativeN/A

                                                                    \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) \cdot {B}^{2}} + 1}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                  4. lower-fma.f64N/A

                                                                    \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                  5. sub-negN/A

                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{45} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                  6. metadata-evalN/A

                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} + \color{blue}{\frac{-1}{3}}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                  7. lower-fma.f64N/A

                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{45}, {B}^{2}, \frac{-1}{3}\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                  8. unpow2N/A

                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                  9. lower-*.f64N/A

                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                  10. unpow2N/A

                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                  11. lower-*.f6443.7

                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                8. Applied rewrites43.7%

                                                                  \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                9. Step-by-step derivation
                                                                  1. Applied rewrites53.7%

                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}\right) + \frac{F}{\color{blue}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B}} \]

                                                                  if 0.0519999999999999976 < B

                                                                  1. Initial program 83.9%

                                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                  2. Add Preprocessing
                                                                  3. Taylor expanded in B around 0

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                  4. Step-by-step derivation
                                                                    1. *-commutativeN/A

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                    2. lower-*.f64N/A

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                    3. lower-sqrt.f64N/A

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                    4. lower-/.f64N/A

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                    5. +-commutativeN/A

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                    6. lower-+.f64N/A

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                    7. lower-fma.f64N/A

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                    8. unpow2N/A

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                    9. lower-*.f64N/A

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                    10. lower-/.f6457.6

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                  5. Applied rewrites57.6%

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                  6. Taylor expanded in F around -inf

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\color{blue}{B}} \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites56.5%

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\color{blue}{B}} \]
                                                                  8. Recombined 2 regimes into one program.
                                                                  9. Final simplification54.5%

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 0.052:\\ \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B} + \frac{-1}{\tan B} \cdot x\\ \end{array} \]
                                                                  10. Add Preprocessing

                                                                  Alternative 16: 57.9% accurate, 2.8× speedup?

                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -16000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 6 \cdot 10^{+173}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \end{array} \end{array} \]
                                                                  (FPCore (F B x)
                                                                   :precision binary64
                                                                   (if (<= F -16000.0)
                                                                     (- (/ -1.0 (sin B)) (/ x B))
                                                                     (if (<= F 6e+173)
                                                                       (-
                                                                        (/ (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) B)
                                                                        (* (/ (fma -0.3333333333333333 (* B B) 1.0) B) x))
                                                                       (-
                                                                        (/ 1.0 B)
                                                                        (*
                                                                         (/
                                                                          (fma
                                                                           (fma -0.022222222222222223 (* B B) -0.3333333333333333)
                                                                           (* B B)
                                                                           1.0)
                                                                          B)
                                                                         x)))))
                                                                  double code(double F, double B, double x) {
                                                                  	double tmp;
                                                                  	if (F <= -16000.0) {
                                                                  		tmp = (-1.0 / sin(B)) - (x / B);
                                                                  	} else if (F <= 6e+173) {
                                                                  		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / B) - ((fma(-0.3333333333333333, (B * B), 1.0) / B) * x);
                                                                  	} else {
                                                                  		tmp = (1.0 / B) - ((fma(fma(-0.022222222222222223, (B * B), -0.3333333333333333), (B * B), 1.0) / B) * x);
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  function code(F, B, x)
                                                                  	tmp = 0.0
                                                                  	if (F <= -16000.0)
                                                                  		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
                                                                  	elseif (F <= 6e+173)
                                                                  		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / B) - Float64(Float64(fma(-0.3333333333333333, Float64(B * B), 1.0) / B) * x));
                                                                  	else
                                                                  		tmp = Float64(Float64(1.0 / B) - Float64(Float64(fma(fma(-0.022222222222222223, Float64(B * B), -0.3333333333333333), Float64(B * B), 1.0) / B) * x));
                                                                  	end
                                                                  	return tmp
                                                                  end
                                                                  
                                                                  code[F_, B_, x_] := If[LessEqual[F, -16000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e+173], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(N[(N[(-0.3333333333333333 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(N[(N[(N[(-0.022222222222222223 * N[(B * B), $MachinePrecision] + -0.3333333333333333), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]
                                                                  
                                                                  \begin{array}{l}
                                                                  
                                                                  \\
                                                                  \begin{array}{l}
                                                                  \mathbf{if}\;F \leq -16000:\\
                                                                  \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
                                                                  
                                                                  \mathbf{elif}\;F \leq 6 \cdot 10^{+173}:\\
                                                                  \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B} \cdot x\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;\frac{1}{B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 3 regimes
                                                                  2. if F < -16000

                                                                    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 \left(-\color{blue}{x \cdot \frac{1}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      2. lift-/.f64N/A

                                                                        \[\leadsto \left(-x \cdot \color{blue}{\frac{1}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      3. un-div-invN/A

                                                                        \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      4. lower-/.f6454.7

                                                                        \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    4. Applied rewrites54.7%

                                                                      \[\leadsto \left(-\color{blue}{\frac{x}{\tan B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    5. Step-by-step derivation
                                                                      1. lift-*.f64N/A

                                                                        \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                      2. lift-/.f64N/A

                                                                        \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      3. associate-*l/N/A

                                                                        \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} \]
                                                                      4. lower-/.f64N/A

                                                                        \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} \]
                                                                    6. Applied rewrites66.2%

                                                                      \[\leadsto \left(-\frac{x}{\tan B}\right) + \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}} \]
                                                                    7. Taylor expanded in B around 0

                                                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
                                                                    8. Step-by-step derivation
                                                                      1. lower-/.f6448.0

                                                                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
                                                                    9. Applied rewrites48.0%

                                                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
                                                                    10. Taylor expanded in F around -inf

                                                                      \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{-1}}{\sin B} \]
                                                                    11. Step-by-step derivation
                                                                      1. Applied rewrites82.1%

                                                                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{\color{blue}{-1}}{\sin B} \]

                                                                      if -16000 < F < 5.9999999999999995e173

                                                                      1. Initial program 95.3%

                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      2. Add Preprocessing
                                                                      3. Taylor expanded in B around 0

                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                      4. Step-by-step derivation
                                                                        1. *-commutativeN/A

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                        2. lower-*.f64N/A

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                        3. lower-sqrt.f64N/A

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                        4. lower-/.f64N/A

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                        5. +-commutativeN/A

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                        6. lower-+.f64N/A

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                        7. lower-fma.f64N/A

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                        8. unpow2N/A

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                        9. lower-*.f64N/A

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                        10. lower-/.f6477.4

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                      5. Applied rewrites77.4%

                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                      6. Taylor expanded in B around 0

                                                                        \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + \frac{-1}{3} \cdot {B}^{2}}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                      7. Step-by-step derivation
                                                                        1. lower-/.f64N/A

                                                                          \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + \frac{-1}{3} \cdot {B}^{2}}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                        2. +-commutativeN/A

                                                                          \[\leadsto \left(-x \cdot \frac{\color{blue}{\frac{-1}{3} \cdot {B}^{2} + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                        3. lower-fma.f64N/A

                                                                          \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                        4. unpow2N/A

                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{3}, \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                        5. lower-*.f6444.2

                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                      8. Applied rewrites44.2%

                                                                        \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                      9. Step-by-step derivation
                                                                        1. Applied rewrites46.7%

                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B}\right) + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\color{blue}{B}} \]

                                                                        if 5.9999999999999995e173 < F

                                                                        1. Initial program 28.3%

                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                        2. Add Preprocessing
                                                                        3. Taylor expanded in B around 0

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                        4. Step-by-step derivation
                                                                          1. *-commutativeN/A

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                          2. lower-*.f64N/A

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                          3. lower-sqrt.f64N/A

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                          4. lower-/.f64N/A

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                          5. +-commutativeN/A

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                          6. lower-+.f64N/A

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                          7. lower-fma.f64N/A

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                          8. unpow2N/A

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                          9. lower-*.f64N/A

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                          10. lower-/.f6428.3

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                        5. Applied rewrites28.3%

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                        6. Taylor expanded in B around 0

                                                                          \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                        7. Step-by-step derivation
                                                                          1. lower-/.f64N/A

                                                                            \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                          2. +-commutativeN/A

                                                                            \[\leadsto \left(-x \cdot \frac{\color{blue}{{B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                          3. *-commutativeN/A

                                                                            \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) \cdot {B}^{2}} + 1}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                          4. lower-fma.f64N/A

                                                                            \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                          5. sub-negN/A

                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{45} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                          6. metadata-evalN/A

                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} + \color{blue}{\frac{-1}{3}}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                          7. lower-fma.f64N/A

                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{45}, {B}^{2}, \frac{-1}{3}\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                          8. unpow2N/A

                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                          9. lower-*.f64N/A

                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                          10. unpow2N/A

                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                          11. lower-*.f647.2

                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                        8. Applied rewrites7.2%

                                                                          \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                        9. Taylor expanded in F around inf

                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), B \cdot B, 1\right)}{B}\right) + \frac{1}{\color{blue}{B}} \]
                                                                        10. Step-by-step derivation
                                                                          1. Applied rewrites61.3%

                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}\right) + \frac{1}{\color{blue}{B}} \]
                                                                        11. Recombined 3 regimes into one program.
                                                                        12. Final simplification57.3%

                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -16000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 6 \cdot 10^{+173}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \end{array} \]
                                                                        13. Add Preprocessing

                                                                        Alternative 17: 51.3% accurate, 4.2× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{if}\;F \leq -1.32 \cdot 10^{+154}:\\ \;\;\;\;\frac{-1}{B} - t\_0\\ \mathbf{elif}\;F \leq 6 \cdot 10^{+173}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t\_0\\ \end{array} \end{array} \]
                                                                        (FPCore (F B x)
                                                                         :precision binary64
                                                                         (let* ((t_0
                                                                                 (*
                                                                                  (/
                                                                                   (fma
                                                                                    (fma -0.022222222222222223 (* B B) -0.3333333333333333)
                                                                                    (* B B)
                                                                                    1.0)
                                                                                   B)
                                                                                  x)))
                                                                           (if (<= F -1.32e+154)
                                                                             (- (/ -1.0 B) t_0)
                                                                             (if (<= F 6e+173)
                                                                               (-
                                                                                (/ (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) B)
                                                                                (* (/ (fma -0.3333333333333333 (* B B) 1.0) B) x))
                                                                               (- (/ 1.0 B) t_0)))))
                                                                        double code(double F, double B, double x) {
                                                                        	double t_0 = (fma(fma(-0.022222222222222223, (B * B), -0.3333333333333333), (B * B), 1.0) / B) * x;
                                                                        	double tmp;
                                                                        	if (F <= -1.32e+154) {
                                                                        		tmp = (-1.0 / B) - t_0;
                                                                        	} else if (F <= 6e+173) {
                                                                        		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / B) - ((fma(-0.3333333333333333, (B * B), 1.0) / B) * x);
                                                                        	} else {
                                                                        		tmp = (1.0 / B) - t_0;
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        function code(F, B, x)
                                                                        	t_0 = Float64(Float64(fma(fma(-0.022222222222222223, Float64(B * B), -0.3333333333333333), Float64(B * B), 1.0) / B) * x)
                                                                        	tmp = 0.0
                                                                        	if (F <= -1.32e+154)
                                                                        		tmp = Float64(Float64(-1.0 / B) - t_0);
                                                                        	elseif (F <= 6e+173)
                                                                        		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / B) - Float64(Float64(fma(-0.3333333333333333, Float64(B * B), 1.0) / B) * x));
                                                                        	else
                                                                        		tmp = Float64(Float64(1.0 / B) - t_0);
                                                                        	end
                                                                        	return tmp
                                                                        end
                                                                        
                                                                        code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(N[(-0.022222222222222223 * N[(B * B), $MachinePrecision] + -0.3333333333333333), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[F, -1.32e+154], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6e+173], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(N[(N[(-0.3333333333333333 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
                                                                        
                                                                        \begin{array}{l}
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        t_0 := \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\
                                                                        \mathbf{if}\;F \leq -1.32 \cdot 10^{+154}:\\
                                                                        \;\;\;\;\frac{-1}{B} - t\_0\\
                                                                        
                                                                        \mathbf{elif}\;F \leq 6 \cdot 10^{+173}:\\
                                                                        \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B} \cdot x\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;\frac{1}{B} - t\_0\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 3 regimes
                                                                        2. if F < -1.31999999999999998e154

                                                                          1. Initial program 26.9%

                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                          2. Add Preprocessing
                                                                          3. Taylor expanded in B around 0

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                          4. Step-by-step derivation
                                                                            1. *-commutativeN/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                            2. lower-*.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                            3. lower-sqrt.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                            4. lower-/.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                            5. +-commutativeN/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                            6. lower-+.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                            7. lower-fma.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                            8. unpow2N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                            9. lower-*.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                            10. lower-/.f6426.9

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                          5. Applied rewrites26.9%

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                          6. Taylor expanded in B around 0

                                                                            \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                          7. Step-by-step derivation
                                                                            1. lower-/.f64N/A

                                                                              \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                            2. +-commutativeN/A

                                                                              \[\leadsto \left(-x \cdot \frac{\color{blue}{{B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                            3. *-commutativeN/A

                                                                              \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) \cdot {B}^{2}} + 1}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                            4. lower-fma.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                            5. sub-negN/A

                                                                              \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{45} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                            6. metadata-evalN/A

                                                                              \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} + \color{blue}{\frac{-1}{3}}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                            7. lower-fma.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{45}, {B}^{2}, \frac{-1}{3}\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                            8. unpow2N/A

                                                                              \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                            9. lower-*.f64N/A

                                                                              \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                            10. unpow2N/A

                                                                              \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                            11. lower-*.f644.6

                                                                              \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                          8. Applied rewrites4.6%

                                                                            \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                          9. Taylor expanded in F around -inf

                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), B \cdot B, 1\right)}{B}\right) + \frac{-1}{\color{blue}{B}} \]
                                                                          10. Step-by-step derivation
                                                                            1. Applied rewrites45.3%

                                                                              \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}\right) + \frac{-1}{\color{blue}{B}} \]

                                                                            if -1.31999999999999998e154 < F < 5.9999999999999995e173

                                                                            1. Initial program 95.9%

                                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                            2. Add Preprocessing
                                                                            3. Taylor expanded in B around 0

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                            4. Step-by-step derivation
                                                                              1. *-commutativeN/A

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                              2. lower-*.f64N/A

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                              3. lower-sqrt.f64N/A

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                              4. lower-/.f64N/A

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                              5. +-commutativeN/A

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                              6. lower-+.f64N/A

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                              7. lower-fma.f64N/A

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                              8. unpow2N/A

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                              9. lower-*.f64N/A

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                              10. lower-/.f6474.0

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                            5. Applied rewrites74.0%

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                            6. Taylor expanded in B around 0

                                                                              \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + \frac{-1}{3} \cdot {B}^{2}}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                            7. Step-by-step derivation
                                                                              1. lower-/.f64N/A

                                                                                \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + \frac{-1}{3} \cdot {B}^{2}}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                              2. +-commutativeN/A

                                                                                \[\leadsto \left(-x \cdot \frac{\color{blue}{\frac{-1}{3} \cdot {B}^{2} + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                              3. lower-fma.f64N/A

                                                                                \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                              4. unpow2N/A

                                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{3}, \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                              5. lower-*.f6444.2

                                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                            8. Applied rewrites44.2%

                                                                              \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                            9. Step-by-step derivation
                                                                              1. Applied rewrites46.4%

                                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B}\right) + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\color{blue}{B}} \]

                                                                              if 5.9999999999999995e173 < F

                                                                              1. Initial program 28.3%

                                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                              2. Add Preprocessing
                                                                              3. Taylor expanded in B around 0

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                              4. Step-by-step derivation
                                                                                1. *-commutativeN/A

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                2. lower-*.f64N/A

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                3. lower-sqrt.f64N/A

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                4. lower-/.f64N/A

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                5. +-commutativeN/A

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                6. lower-+.f64N/A

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                7. lower-fma.f64N/A

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                                8. unpow2N/A

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                9. lower-*.f64N/A

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                10. lower-/.f6428.3

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                              5. Applied rewrites28.3%

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                              6. Taylor expanded in B around 0

                                                                                \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                              7. Step-by-step derivation
                                                                                1. lower-/.f64N/A

                                                                                  \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                2. +-commutativeN/A

                                                                                  \[\leadsto \left(-x \cdot \frac{\color{blue}{{B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                3. *-commutativeN/A

                                                                                  \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) \cdot {B}^{2}} + 1}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                4. lower-fma.f64N/A

                                                                                  \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                5. sub-negN/A

                                                                                  \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{45} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                6. metadata-evalN/A

                                                                                  \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} + \color{blue}{\frac{-1}{3}}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                7. lower-fma.f64N/A

                                                                                  \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{45}, {B}^{2}, \frac{-1}{3}\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                8. unpow2N/A

                                                                                  \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                9. lower-*.f64N/A

                                                                                  \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                10. unpow2N/A

                                                                                  \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                11. lower-*.f647.2

                                                                                  \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                              8. Applied rewrites7.2%

                                                                                \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                              9. Taylor expanded in F around inf

                                                                                \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), B \cdot B, 1\right)}{B}\right) + \frac{1}{\color{blue}{B}} \]
                                                                              10. Step-by-step derivation
                                                                                1. Applied rewrites61.3%

                                                                                  \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}\right) + \frac{1}{\color{blue}{B}} \]
                                                                              11. Recombined 3 regimes into one program.
                                                                              12. Final simplification48.2%

                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.32 \cdot 10^{+154}:\\ \;\;\;\;\frac{-1}{B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{elif}\;F \leq 6 \cdot 10^{+173}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \end{array} \]
                                                                              13. Add Preprocessing

                                                                              Alternative 18: 51.3% accurate, 4.5× speedup?

                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{if}\;F \leq -1.32 \cdot 10^{+154}:\\ \;\;\;\;\frac{-1}{B} - t\_0\\ \mathbf{elif}\;F \leq 6 \cdot 10^{+173}:\\ \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B} - \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t\_0\\ \end{array} \end{array} \]
                                                                              (FPCore (F B x)
                                                                               :precision binary64
                                                                               (let* ((t_0
                                                                                       (*
                                                                                        (/
                                                                                         (fma
                                                                                          (fma -0.022222222222222223 (* B B) -0.3333333333333333)
                                                                                          (* B B)
                                                                                          1.0)
                                                                                         B)
                                                                                        x)))
                                                                                 (if (<= F -1.32e+154)
                                                                                   (- (/ -1.0 B) t_0)
                                                                                   (if (<= F 6e+173)
                                                                                     (-
                                                                                      (/ F (* (sqrt (fma 2.0 x (fma F F 2.0))) B))
                                                                                      (* (/ (fma -0.3333333333333333 (* B B) 1.0) B) x))
                                                                                     (- (/ 1.0 B) t_0)))))
                                                                              double code(double F, double B, double x) {
                                                                              	double t_0 = (fma(fma(-0.022222222222222223, (B * B), -0.3333333333333333), (B * B), 1.0) / B) * x;
                                                                              	double tmp;
                                                                              	if (F <= -1.32e+154) {
                                                                              		tmp = (-1.0 / B) - t_0;
                                                                              	} else if (F <= 6e+173) {
                                                                              		tmp = (F / (sqrt(fma(2.0, x, fma(F, F, 2.0))) * B)) - ((fma(-0.3333333333333333, (B * B), 1.0) / B) * x);
                                                                              	} else {
                                                                              		tmp = (1.0 / B) - t_0;
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              function code(F, B, x)
                                                                              	t_0 = Float64(Float64(fma(fma(-0.022222222222222223, Float64(B * B), -0.3333333333333333), Float64(B * B), 1.0) / B) * x)
                                                                              	tmp = 0.0
                                                                              	if (F <= -1.32e+154)
                                                                              		tmp = Float64(Float64(-1.0 / B) - t_0);
                                                                              	elseif (F <= 6e+173)
                                                                              		tmp = Float64(Float64(F / Float64(sqrt(fma(2.0, x, fma(F, F, 2.0))) * B)) - Float64(Float64(fma(-0.3333333333333333, Float64(B * B), 1.0) / B) * x));
                                                                              	else
                                                                              		tmp = Float64(Float64(1.0 / B) - t_0);
                                                                              	end
                                                                              	return tmp
                                                                              end
                                                                              
                                                                              code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(N[(-0.022222222222222223 * N[(B * B), $MachinePrecision] + -0.3333333333333333), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[F, -1.32e+154], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6e+173], N[(N[(F / N[(N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(-0.3333333333333333 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
                                                                              
                                                                              \begin{array}{l}
                                                                              
                                                                              \\
                                                                              \begin{array}{l}
                                                                              t_0 := \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\
                                                                              \mathbf{if}\;F \leq -1.32 \cdot 10^{+154}:\\
                                                                              \;\;\;\;\frac{-1}{B} - t\_0\\
                                                                              
                                                                              \mathbf{elif}\;F \leq 6 \cdot 10^{+173}:\\
                                                                              \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B} - \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B} \cdot x\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;\frac{1}{B} - t\_0\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Split input into 3 regimes
                                                                              2. if F < -1.31999999999999998e154

                                                                                1. Initial program 26.9%

                                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                2. Add Preprocessing
                                                                                3. Taylor expanded in B around 0

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                                4. Step-by-step derivation
                                                                                  1. *-commutativeN/A

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                  2. lower-*.f64N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                  3. lower-sqrt.f64N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                  4. lower-/.f64N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                  5. +-commutativeN/A

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                  6. lower-+.f64N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                  7. lower-fma.f64N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                                  8. unpow2N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  9. lower-*.f64N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  10. lower-/.f6426.9

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                                5. Applied rewrites26.9%

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                                6. Taylor expanded in B around 0

                                                                                  \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                7. Step-by-step derivation
                                                                                  1. lower-/.f64N/A

                                                                                    \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  2. +-commutativeN/A

                                                                                    \[\leadsto \left(-x \cdot \frac{\color{blue}{{B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  3. *-commutativeN/A

                                                                                    \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) \cdot {B}^{2}} + 1}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  4. lower-fma.f64N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  5. sub-negN/A

                                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{45} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  6. metadata-evalN/A

                                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} + \color{blue}{\frac{-1}{3}}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  7. lower-fma.f64N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{45}, {B}^{2}, \frac{-1}{3}\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  8. unpow2N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  9. lower-*.f64N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  10. unpow2N/A

                                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  11. lower-*.f644.6

                                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                8. Applied rewrites4.6%

                                                                                  \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                9. Taylor expanded in F around -inf

                                                                                  \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), B \cdot B, 1\right)}{B}\right) + \frac{-1}{\color{blue}{B}} \]
                                                                                10. Step-by-step derivation
                                                                                  1. Applied rewrites45.3%

                                                                                    \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}\right) + \frac{-1}{\color{blue}{B}} \]

                                                                                  if -1.31999999999999998e154 < F < 5.9999999999999995e173

                                                                                  1. Initial program 95.9%

                                                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                  2. Add Preprocessing
                                                                                  3. Taylor expanded in B around 0

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. *-commutativeN/A

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                    2. lower-*.f64N/A

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                    3. lower-sqrt.f64N/A

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                    4. lower-/.f64N/A

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                    5. +-commutativeN/A

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                    6. lower-+.f64N/A

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                    7. lower-fma.f64N/A

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                                    8. unpow2N/A

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                    9. lower-*.f64N/A

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                    10. lower-/.f6474.0

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                                  5. Applied rewrites74.0%

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                                  6. Taylor expanded in B around 0

                                                                                    \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + \frac{-1}{3} \cdot {B}^{2}}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  7. Step-by-step derivation
                                                                                    1. lower-/.f64N/A

                                                                                      \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + \frac{-1}{3} \cdot {B}^{2}}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                    2. +-commutativeN/A

                                                                                      \[\leadsto \left(-x \cdot \frac{\color{blue}{\frac{-1}{3} \cdot {B}^{2} + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                    3. lower-fma.f64N/A

                                                                                      \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                    4. unpow2N/A

                                                                                      \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{3}, \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                    5. lower-*.f6444.2

                                                                                      \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  8. Applied rewrites44.2%

                                                                                    \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                  9. Step-by-step derivation
                                                                                    1. Applied rewrites46.4%

                                                                                      \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B}\right) + \frac{F}{\color{blue}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B}} \]

                                                                                    if 5.9999999999999995e173 < F

                                                                                    1. Initial program 28.3%

                                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                    2. Add Preprocessing
                                                                                    3. Taylor expanded in B around 0

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. *-commutativeN/A

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                      2. lower-*.f64N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                      3. lower-sqrt.f64N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                      4. lower-/.f64N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                      5. +-commutativeN/A

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                      6. lower-+.f64N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                      7. lower-fma.f64N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                                      8. unpow2N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      9. lower-*.f64N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      10. lower-/.f6428.3

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                                    5. Applied rewrites28.3%

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                                    6. Taylor expanded in B around 0

                                                                                      \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                    7. Step-by-step derivation
                                                                                      1. lower-/.f64N/A

                                                                                        \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      2. +-commutativeN/A

                                                                                        \[\leadsto \left(-x \cdot \frac{\color{blue}{{B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      3. *-commutativeN/A

                                                                                        \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) \cdot {B}^{2}} + 1}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      4. lower-fma.f64N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      5. sub-negN/A

                                                                                        \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{45} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      6. metadata-evalN/A

                                                                                        \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} + \color{blue}{\frac{-1}{3}}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      7. lower-fma.f64N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{45}, {B}^{2}, \frac{-1}{3}\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      8. unpow2N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      9. lower-*.f64N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      10. unpow2N/A

                                                                                        \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      11. lower-*.f647.2

                                                                                        \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                    8. Applied rewrites7.2%

                                                                                      \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                    9. Taylor expanded in F around inf

                                                                                      \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), B \cdot B, 1\right)}{B}\right) + \frac{1}{\color{blue}{B}} \]
                                                                                    10. Step-by-step derivation
                                                                                      1. Applied rewrites61.3%

                                                                                        \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}\right) + \frac{1}{\color{blue}{B}} \]
                                                                                    11. Recombined 3 regimes into one program.
                                                                                    12. Final simplification48.1%

                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.32 \cdot 10^{+154}:\\ \;\;\;\;\frac{-1}{B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{elif}\;F \leq 6 \cdot 10^{+173}:\\ \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot B} - \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \end{array} \]
                                                                                    13. Add Preprocessing

                                                                                    Alternative 19: 37.2% accurate, 6.2× speedup?

                                                                                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{if}\;F \leq -1.3 \cdot 10^{-257}:\\ \;\;\;\;\frac{-1}{B} - t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - t\_0\\ \end{array} \end{array} \]
                                                                                    (FPCore (F B x)
                                                                                     :precision binary64
                                                                                     (let* ((t_0
                                                                                             (*
                                                                                              (/
                                                                                               (fma
                                                                                                (fma -0.022222222222222223 (* B B) -0.3333333333333333)
                                                                                                (* B B)
                                                                                                1.0)
                                                                                               B)
                                                                                              x)))
                                                                                       (if (<= F -1.3e-257) (- (/ -1.0 B) t_0) (- (/ 1.0 B) t_0))))
                                                                                    double code(double F, double B, double x) {
                                                                                    	double t_0 = (fma(fma(-0.022222222222222223, (B * B), -0.3333333333333333), (B * B), 1.0) / B) * x;
                                                                                    	double tmp;
                                                                                    	if (F <= -1.3e-257) {
                                                                                    		tmp = (-1.0 / B) - t_0;
                                                                                    	} else {
                                                                                    		tmp = (1.0 / B) - t_0;
                                                                                    	}
                                                                                    	return tmp;
                                                                                    }
                                                                                    
                                                                                    function code(F, B, x)
                                                                                    	t_0 = Float64(Float64(fma(fma(-0.022222222222222223, Float64(B * B), -0.3333333333333333), Float64(B * B), 1.0) / B) * x)
                                                                                    	tmp = 0.0
                                                                                    	if (F <= -1.3e-257)
                                                                                    		tmp = Float64(Float64(-1.0 / B) - t_0);
                                                                                    	else
                                                                                    		tmp = Float64(Float64(1.0 / B) - t_0);
                                                                                    	end
                                                                                    	return tmp
                                                                                    end
                                                                                    
                                                                                    code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(N[(-0.022222222222222223 * N[(B * B), $MachinePrecision] + -0.3333333333333333), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[F, -1.3e-257], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]
                                                                                    
                                                                                    \begin{array}{l}
                                                                                    
                                                                                    \\
                                                                                    \begin{array}{l}
                                                                                    t_0 := \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\
                                                                                    \mathbf{if}\;F \leq -1.3 \cdot 10^{-257}:\\
                                                                                    \;\;\;\;\frac{-1}{B} - t\_0\\
                                                                                    
                                                                                    \mathbf{else}:\\
                                                                                    \;\;\;\;\frac{1}{B} - t\_0\\
                                                                                    
                                                                                    
                                                                                    \end{array}
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Split input into 2 regimes
                                                                                    2. if F < -1.3e-257

                                                                                      1. Initial program 75.3%

                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                      2. Add Preprocessing
                                                                                      3. Taylor expanded in B around 0

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                                      4. Step-by-step derivation
                                                                                        1. *-commutativeN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                        2. lower-*.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                        3. lower-sqrt.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                        4. lower-/.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                        5. +-commutativeN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                        6. lower-+.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                        7. lower-fma.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                                        8. unpow2N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        9. lower-*.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        10. lower-/.f6455.5

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                                      5. Applied rewrites55.5%

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                                      6. Taylor expanded in B around 0

                                                                                        \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      7. Step-by-step derivation
                                                                                        1. lower-/.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        2. +-commutativeN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\color{blue}{{B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        3. *-commutativeN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) \cdot {B}^{2}} + 1}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        4. lower-fma.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        5. sub-negN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{45} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        6. metadata-evalN/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} + \color{blue}{\frac{-1}{3}}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        7. lower-fma.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{45}, {B}^{2}, \frac{-1}{3}\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        8. unpow2N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        9. lower-*.f64N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        10. unpow2N/A

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        11. lower-*.f6437.3

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      8. Applied rewrites37.3%

                                                                                        \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                      9. Taylor expanded in F around -inf

                                                                                        \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), B \cdot B, 1\right)}{B}\right) + \frac{-1}{\color{blue}{B}} \]
                                                                                      10. Step-by-step derivation
                                                                                        1. Applied rewrites34.3%

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}\right) + \frac{-1}{\color{blue}{B}} \]

                                                                                        if -1.3e-257 < F

                                                                                        1. Initial program 77.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(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. *-commutativeN/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                          2. lower-*.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                          3. lower-sqrt.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                          4. lower-/.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                          5. +-commutativeN/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                          6. lower-+.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                          7. lower-fma.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                                          8. unpow2N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          9. lower-*.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          10. lower-/.f6465.5

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                                        5. Applied rewrites65.5%

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                                        6. Taylor expanded in B around 0

                                                                                          \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        7. Step-by-step derivation
                                                                                          1. lower-/.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          2. +-commutativeN/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\color{blue}{{B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          3. *-commutativeN/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) \cdot {B}^{2}} + 1}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          4. lower-fma.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          5. sub-negN/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{45} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          6. metadata-evalN/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} + \color{blue}{\frac{-1}{3}}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          7. lower-fma.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{45}, {B}^{2}, \frac{-1}{3}\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          8. unpow2N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          9. lower-*.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          10. unpow2N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          11. lower-*.f6429.9

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        8. Applied rewrites29.9%

                                                                                          \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        9. Taylor expanded in F around inf

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), B \cdot B, 1\right)}{B}\right) + \frac{1}{\color{blue}{B}} \]
                                                                                        10. Step-by-step derivation
                                                                                          1. Applied rewrites35.4%

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}\right) + \frac{1}{\color{blue}{B}} \]
                                                                                        11. Recombined 2 regimes into one program.
                                                                                        12. Final simplification34.9%

                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.3 \cdot 10^{-257}:\\ \;\;\;\;\frac{-1}{B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x\\ \end{array} \]
                                                                                        13. Add Preprocessing

                                                                                        Alternative 20: 29.7% accurate, 6.9× speedup?

                                                                                        \[\begin{array}{l} \\ \frac{-1}{B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x \end{array} \]
                                                                                        (FPCore (F B x)
                                                                                         :precision binary64
                                                                                         (-
                                                                                          (/ -1.0 B)
                                                                                          (*
                                                                                           (/
                                                                                            (fma (fma -0.022222222222222223 (* B B) -0.3333333333333333) (* B B) 1.0)
                                                                                            B)
                                                                                           x)))
                                                                                        double code(double F, double B, double x) {
                                                                                        	return (-1.0 / B) - ((fma(fma(-0.022222222222222223, (B * B), -0.3333333333333333), (B * B), 1.0) / B) * x);
                                                                                        }
                                                                                        
                                                                                        function code(F, B, x)
                                                                                        	return Float64(Float64(-1.0 / B) - Float64(Float64(fma(fma(-0.022222222222222223, Float64(B * B), -0.3333333333333333), Float64(B * B), 1.0) / B) * x))
                                                                                        end
                                                                                        
                                                                                        code[F_, B_, x_] := N[(N[(-1.0 / B), $MachinePrecision] - N[(N[(N[(N[(-0.022222222222222223 * N[(B * B), $MachinePrecision] + -0.3333333333333333), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]
                                                                                        
                                                                                        \begin{array}{l}
                                                                                        
                                                                                        \\
                                                                                        \frac{-1}{B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x
                                                                                        \end{array}
                                                                                        
                                                                                        Derivation
                                                                                        1. Initial program 76.7%

                                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                        2. Add Preprocessing
                                                                                        3. Taylor expanded in B around 0

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. *-commutativeN/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                          2. lower-*.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                          3. lower-sqrt.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                          4. lower-/.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                          5. +-commutativeN/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                          6. lower-+.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                          7. lower-fma.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                                          8. unpow2N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          9. lower-*.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          10. lower-/.f6460.9

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                                        5. Applied rewrites60.9%

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                                        6. Taylor expanded in B around 0

                                                                                          \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        7. Step-by-step derivation
                                                                                          1. lower-/.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + {B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          2. +-commutativeN/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\color{blue}{{B}^{2} \cdot \left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          3. *-commutativeN/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\color{blue}{\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}\right) \cdot {B}^{2}} + 1}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          4. lower-fma.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} - \frac{1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          5. sub-negN/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\frac{-1}{45} \cdot {B}^{2} + \left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          6. metadata-evalN/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{45} \cdot {B}^{2} + \color{blue}{\frac{-1}{3}}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          7. lower-fma.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\frac{-1}{45}, {B}^{2}, \frac{-1}{3}\right)}, {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          8. unpow2N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          9. lower-*.f64N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, \color{blue}{B \cdot B}, \frac{-1}{3}\right), {B}^{2}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          10. unpow2N/A

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          11. lower-*.f6433.3

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        8. Applied rewrites33.3%

                                                                                          \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                        9. Taylor expanded in F around -inf

                                                                                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{45}, B \cdot B, \frac{-1}{3}\right), B \cdot B, 1\right)}{B}\right) + \frac{-1}{\color{blue}{B}} \]
                                                                                        10. Step-by-step derivation
                                                                                          1. Applied rewrites26.9%

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B}\right) + \frac{-1}{\color{blue}{B}} \]
                                                                                          2. Final simplification26.9%

                                                                                            \[\leadsto \frac{-1}{B} - \frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.022222222222222223, B \cdot B, -0.3333333333333333\right), B \cdot B, 1\right)}{B} \cdot x \]
                                                                                          3. Add Preprocessing

                                                                                          Alternative 21: 9.4% accurate, 9.0× speedup?

                                                                                          \[\begin{array}{l} \\ \frac{-1}{F} \cdot \frac{F}{B} - \left(-0.3333333333333333 \cdot B\right) \cdot x \end{array} \]
                                                                                          (FPCore (F B x)
                                                                                           :precision binary64
                                                                                           (- (* (/ -1.0 F) (/ F B)) (* (* -0.3333333333333333 B) x)))
                                                                                          double code(double F, double B, double x) {
                                                                                          	return ((-1.0 / F) * (F / B)) - ((-0.3333333333333333 * B) * x);
                                                                                          }
                                                                                          
                                                                                          real(8) function code(f, b, x)
                                                                                              real(8), intent (in) :: f
                                                                                              real(8), intent (in) :: b
                                                                                              real(8), intent (in) :: x
                                                                                              code = (((-1.0d0) / f) * (f / b)) - (((-0.3333333333333333d0) * b) * x)
                                                                                          end function
                                                                                          
                                                                                          public static double code(double F, double B, double x) {
                                                                                          	return ((-1.0 / F) * (F / B)) - ((-0.3333333333333333 * B) * x);
                                                                                          }
                                                                                          
                                                                                          def code(F, B, x):
                                                                                          	return ((-1.0 / F) * (F / B)) - ((-0.3333333333333333 * B) * x)
                                                                                          
                                                                                          function code(F, B, x)
                                                                                          	return Float64(Float64(Float64(-1.0 / F) * Float64(F / B)) - Float64(Float64(-0.3333333333333333 * B) * x))
                                                                                          end
                                                                                          
                                                                                          function tmp = code(F, B, x)
                                                                                          	tmp = ((-1.0 / F) * (F / B)) - ((-0.3333333333333333 * B) * x);
                                                                                          end
                                                                                          
                                                                                          code[F_, B_, x_] := N[(N[(N[(-1.0 / F), $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(N[(-0.3333333333333333 * B), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]
                                                                                          
                                                                                          \begin{array}{l}
                                                                                          
                                                                                          \\
                                                                                          \frac{-1}{F} \cdot \frac{F}{B} - \left(-0.3333333333333333 \cdot B\right) \cdot x
                                                                                          \end{array}
                                                                                          
                                                                                          Derivation
                                                                                          1. Initial program 76.7%

                                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                          2. Add Preprocessing
                                                                                          3. Taylor expanded in B around 0

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
                                                                                          4. Step-by-step derivation
                                                                                            1. *-commutativeN/A

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                            2. lower-*.f64N/A

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}} \]
                                                                                            3. lower-sqrt.f64N/A

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                            4. lower-/.f64N/A

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot \frac{F}{B} \]
                                                                                            5. +-commutativeN/A

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                            6. lower-+.f64N/A

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}} \cdot \frac{F}{B} \]
                                                                                            7. lower-fma.f64N/A

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2}} \cdot \frac{F}{B} \]
                                                                                            8. unpow2N/A

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                            9. lower-*.f64N/A

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2}} \cdot \frac{F}{B} \]
                                                                                            10. lower-/.f6460.9

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \color{blue}{\frac{F}{B}} \]
                                                                                          5. Applied rewrites60.9%

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B}} \]
                                                                                          6. Taylor expanded in B around 0

                                                                                            \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + \frac{-1}{3} \cdot {B}^{2}}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          7. Step-by-step derivation
                                                                                            1. lower-/.f64N/A

                                                                                              \[\leadsto \left(-x \cdot \color{blue}{\frac{1 + \frac{-1}{3} \cdot {B}^{2}}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                            2. +-commutativeN/A

                                                                                              \[\leadsto \left(-x \cdot \frac{\color{blue}{\frac{-1}{3} \cdot {B}^{2} + 1}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                            3. lower-fma.f64N/A

                                                                                              \[\leadsto \left(-x \cdot \frac{\color{blue}{\mathsf{fma}\left(\frac{-1}{3}, {B}^{2}, 1\right)}}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                            4. unpow2N/A

                                                                                              \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{3}, \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                            5. lower-*.f6433.5

                                                                                              \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, \color{blue}{B \cdot B}, 1\right)}{B}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          8. Applied rewrites33.5%

                                                                                            \[\leadsto \left(-x \cdot \color{blue}{\frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B}}\right) + \sqrt{\frac{1}{\mathsf{fma}\left(2, x, F \cdot F\right) + 2}} \cdot \frac{F}{B} \]
                                                                                          9. Taylor expanded in F around -inf

                                                                                            \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{3}, B \cdot B, 1\right)}{B}\right) + \frac{-1}{F} \cdot \frac{\color{blue}{F}}{B} \]
                                                                                          10. Step-by-step derivation
                                                                                            1. Applied rewrites19.7%

                                                                                              \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B}\right) + \frac{-1}{F} \cdot \frac{\color{blue}{F}}{B} \]
                                                                                            2. Taylor expanded in B around inf

                                                                                              \[\leadsto \left(-x \cdot \left(\frac{-1}{3} \cdot \color{blue}{B}\right)\right) + \frac{-1}{F} \cdot \frac{F}{B} \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites8.0%

                                                                                                \[\leadsto \left(-x \cdot \left(-0.3333333333333333 \cdot \color{blue}{B}\right)\right) + \frac{-1}{F} \cdot \frac{F}{B} \]
                                                                                              2. Final simplification8.0%

                                                                                                \[\leadsto \frac{-1}{F} \cdot \frac{F}{B} - \left(-0.3333333333333333 \cdot B\right) \cdot x \]
                                                                                              3. Add Preprocessing

                                                                                              Reproduce

                                                                                              ?
                                                                                              herbie shell --seed 2024312 
                                                                                              (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))))))