VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.6% → 99.3%
Time: 12.6s
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: 76.6% accurate, 1.0× speedup?

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

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

Alternative 1: 99.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2e46 < F < 0.00239999999999999979

      1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 0.00239999999999999979 < F

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 2: 78.3% accurate, 1.4× speedup?

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

        1. Initial program 79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.24999999999999992e-125 < x < 5.7999999999999996e-65

        1. Initial program 69.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 91.9% accurate, 1.4× speedup?

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

        1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -2050 < F < 0.00239999999999999979

          1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 0.00239999999999999979 < F

          1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 4: 79.9% accurate, 1.4× speedup?

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

            1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -2050 < F < 3.09999999999999987e102

              1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 3.09999999999999987e102 < F

              1. Initial program 43.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{1}{\sin B} \]
              9. Step-by-step derivation
                1. Applied rewrites65.3%

                  \[\leadsto \frac{1}{\sin B} \]
              10. Recombined 3 regimes into one program.
              11. Final simplification82.9%

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

              Alternative 5: 99.4% accurate, 1.4× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -200000000:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 0.0024:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - 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 -200000000.0)
                   (- (/ -1.0 (sin B)) t_0)
                   (if (<= F 0.0024)
                     (- (/ F (* (sin B) (sqrt (fma x 2.0 (fma F F 2.0))))) 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 <= -200000000.0) {
              		tmp = (-1.0 / sin(B)) - t_0;
              	} else if (F <= 0.0024) {
              		tmp = (F / (sin(B) * sqrt(fma(x, 2.0, fma(F, F, 2.0))))) - 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 <= -200000000.0)
              		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
              	elseif (F <= 0.0024)
              		tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(x, 2.0, fma(F, F, 2.0))))) - 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, -200000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0024], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $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 -200000000:\\
              \;\;\;\;\frac{-1}{\sin B} - t\_0\\
              
              \mathbf{elif}\;F \leq 0.0024:\\
              \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - t\_0\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{1}{\sin B} - t\_0\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if F < -2e8

                1. Initial program 49.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -2e8 < F < 0.00239999999999999979

                  1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 0.00239999999999999979 < F

                  1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 6: 98.9% accurate, 1.5× speedup?

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

                    1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -1.3999999999999999 < F < 0.00239999999999999979

                      1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 0.00239999999999999979 < F

                        1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 7: 71.8% accurate, 1.5× speedup?

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

                          1. Initial program 79.7%

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

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

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

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

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

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

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

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

                              \[\leadsto \left(-x\right) \cdot \frac{\color{blue}{\cos B}}{\sin B} \]
                            8. lower-sin.f6478.2

                              \[\leadsto \left(-x\right) \cdot \frac{\cos B}{\color{blue}{\sin B}} \]
                          5. Applied rewrites78.2%

                            \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
                          6. Step-by-step derivation
                            1. Applied rewrites78.4%

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

                            if -9.00000000000000031e-84 < x < 4.59999999999999961e-84

                            1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 8: 70.8% accurate, 1.5× speedup?

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

                              1. Initial program 79.3%

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

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

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

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

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

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

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

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

                                  \[\leadsto \left(-x\right) \cdot \frac{\color{blue}{\cos B}}{\sin B} \]
                                8. lower-sin.f6477.5

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

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

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

                                if -4.70000000000000003e-94 < x < 4.59999999999999961e-84

                                1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 9: 70.7% accurate, 1.5× speedup?

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

                                1. Initial program 79.3%

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

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

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

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

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

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

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

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

                                    \[\leadsto \left(-x\right) \cdot \frac{\color{blue}{\cos B}}{\sin B} \]
                                  8. lower-sin.f6477.5

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

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

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

                                  if -4.70000000000000003e-94 < x < 4.59999999999999961e-84

                                  1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 10: 51.9% accurate, 1.7× speedup?

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

                                  1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -2e46 < F < 65

                                    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 65 < F

                                      1. Initial program 53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{1}{\sin B} \]
                                      9. Step-by-step derivation
                                        1. Applied rewrites64.5%

                                          \[\leadsto \frac{1}{\sin B} \]
                                      10. Recombined 3 regimes into one program.
                                      11. Final simplification53.9%

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

                                      Alternative 11: 56.3% accurate, 2.0× speedup?

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

                                        1. Initial program 73.3%

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

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

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

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

                                        if 0.00899999999999999932 < B

                                        1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
                                        6. Step-by-step derivation
                                          1. Applied rewrites59.0%

                                            \[\leadsto \color{blue}{\frac{-x}{\tan B}} \]
                                        7. Recombined 2 regimes into one program.
                                        8. Final simplification51.6%

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

                                        Alternative 12: 76.8% accurate, 2.2× speedup?

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

                                          1. Initial program 85.5%

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

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

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

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

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

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

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

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

                                              \[\leadsto \left(-x\right) \cdot \frac{\color{blue}{\cos B}}{\sin B} \]
                                            8. lower-sin.f6489.7

                                              \[\leadsto \left(-x\right) \cdot \frac{\cos B}{\color{blue}{\sin B}} \]
                                          5. Applied rewrites89.7%

                                            \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
                                          6. Step-by-step derivation
                                            1. Applied rewrites89.9%

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

                                            if -1.2e-36 < x < 1.4000000000000001e-60

                                            1. Initial program 66.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.2 \cdot 10^{-36} \lor \neg \left(x \leq 1.4 \cdot 10^{-60}\right):\\ \;\;\;\;\frac{-x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{B}\\ \end{array} \]
                                          9. Add Preprocessing

                                          Alternative 13: 50.8% accurate, 2.5× speedup?

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

                                            1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if -2e46 < F < 0.00239999999999999979

                                              1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if 0.00239999999999999979 < F

                                                1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \frac{\mathsf{fma}\left(\frac{-0.5}{F}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F}, 1\right) - x}{B} \]
                                                8. Recombined 3 regimes into one program.
                                                9. Final simplification47.3%

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

                                                Alternative 14: 50.8% accurate, 2.5× speedup?

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

                                                  1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if -2e46 < F < 0.00239999999999999979

                                                    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if 0.00239999999999999979 < F

                                                      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      Alternative 15: 50.6% accurate, 2.5× speedup?

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

                                                        1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if -1.3999999999999999 < F < 1.8e9

                                                          1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if 1.8e9 < F

                                                            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. Taylor expanded in B around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            Alternative 16: 44.4% accurate, 5.8× speedup?

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

                                                              1. Initial program 53.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                if -4.79999999999999973e-17 < F < -1.12e-94 or 7.49999999999999973e-57 < F < 0.00239999999999999979

                                                                1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot F}{B} \]
                                                                  2. Step-by-step derivation
                                                                    1. Applied rewrites50.4%

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

                                                                    if -1.12e-94 < F < 7.49999999999999973e-57

                                                                    1. Initial program 99.6%

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

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

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

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

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

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

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

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

                                                                        \[\leadsto \left(-x\right) \cdot \frac{\color{blue}{\cos B}}{\sin B} \]
                                                                      8. lower-sin.f6479.5

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

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

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

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

                                                                      if 0.00239999999999999979 < F

                                                                      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4.8 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -1.12 \cdot 10^{-94}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-57}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right) \cdot \left(-x\right)}{B}\\ \mathbf{elif}\;F \leq 0.0024:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                                                      10. Add Preprocessing

                                                                      Alternative 17: 44.3% accurate, 7.2× speedup?

                                                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sqrt{0.5} \cdot F}{B}\\ \mathbf{if}\;F \leq -1.05 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -1.12 \cdot 10^{-94}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-57}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right) \cdot \left(-x\right)}{B}\\ \mathbf{elif}\;F \leq 0.0017:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                                      (FPCore (F B x)
                                                                       :precision binary64
                                                                       (let* ((t_0 (/ (* (sqrt 0.5) F) B)))
                                                                         (if (<= F -1.05e-17)
                                                                           (/ (- -1.0 x) B)
                                                                           (if (<= F -1.12e-94)
                                                                             t_0
                                                                             (if (<= F 7.5e-57)
                                                                               (/ (* (fma -0.3333333333333333 (* B B) 1.0) (- x)) B)
                                                                               (if (<= F 0.0017) t_0 (/ (- 1.0 x) B)))))))
                                                                      double code(double F, double B, double x) {
                                                                      	double t_0 = (sqrt(0.5) * F) / B;
                                                                      	double tmp;
                                                                      	if (F <= -1.05e-17) {
                                                                      		tmp = (-1.0 - x) / B;
                                                                      	} else if (F <= -1.12e-94) {
                                                                      		tmp = t_0;
                                                                      	} else if (F <= 7.5e-57) {
                                                                      		tmp = (fma(-0.3333333333333333, (B * B), 1.0) * -x) / B;
                                                                      	} else if (F <= 0.0017) {
                                                                      		tmp = t_0;
                                                                      	} else {
                                                                      		tmp = (1.0 - x) / B;
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      function code(F, B, x)
                                                                      	t_0 = Float64(Float64(sqrt(0.5) * F) / B)
                                                                      	tmp = 0.0
                                                                      	if (F <= -1.05e-17)
                                                                      		tmp = Float64(Float64(-1.0 - x) / B);
                                                                      	elseif (F <= -1.12e-94)
                                                                      		tmp = t_0;
                                                                      	elseif (F <= 7.5e-57)
                                                                      		tmp = Float64(Float64(fma(-0.3333333333333333, Float64(B * B), 1.0) * Float64(-x)) / B);
                                                                      	elseif (F <= 0.0017)
                                                                      		tmp = t_0;
                                                                      	else
                                                                      		tmp = Float64(Float64(1.0 - x) / B);
                                                                      	end
                                                                      	return tmp
                                                                      end
                                                                      
                                                                      code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Sqrt[0.5], $MachinePrecision] * F), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -1.05e-17], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.12e-94], t$95$0, If[LessEqual[F, 7.5e-57], N[(N[(N[(-0.3333333333333333 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * (-x)), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.0017], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
                                                                      
                                                                      \begin{array}{l}
                                                                      
                                                                      \\
                                                                      \begin{array}{l}
                                                                      t_0 := \frac{\sqrt{0.5} \cdot F}{B}\\
                                                                      \mathbf{if}\;F \leq -1.05 \cdot 10^{-17}:\\
                                                                      \;\;\;\;\frac{-1 - x}{B}\\
                                                                      
                                                                      \mathbf{elif}\;F \leq -1.12 \cdot 10^{-94}:\\
                                                                      \;\;\;\;t\_0\\
                                                                      
                                                                      \mathbf{elif}\;F \leq 7.5 \cdot 10^{-57}:\\
                                                                      \;\;\;\;\frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right) \cdot \left(-x\right)}{B}\\
                                                                      
                                                                      \mathbf{elif}\;F \leq 0.0017:\\
                                                                      \;\;\;\;t\_0\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;\frac{1 - x}{B}\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 4 regimes
                                                                      2. if F < -1.04999999999999996e-17

                                                                        1. Initial program 53.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          if -1.04999999999999996e-17 < F < -1.12e-94 or 7.49999999999999973e-57 < F < 0.00169999999999999991

                                                                          1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              if -1.12e-94 < F < 7.49999999999999973e-57

                                                                              1. Initial program 99.6%

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto \left(-x\right) \cdot \frac{\color{blue}{\cos B}}{\sin B} \]
                                                                                8. lower-sin.f6479.5

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

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

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

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

                                                                                if 0.00169999999999999991 < F

                                                                                1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.05 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -1.12 \cdot 10^{-94}:\\ \;\;\;\;\frac{\sqrt{0.5} \cdot F}{B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-57}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right) \cdot \left(-x\right)}{B}\\ \mathbf{elif}\;F \leq 0.0017:\\ \;\;\;\;\frac{\sqrt{0.5} \cdot F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                                                                10. Add Preprocessing

                                                                                Alternative 18: 44.4% accurate, 7.2× speedup?

                                                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sqrt{0.5} \cdot F}{B}\\ \mathbf{if}\;F \leq -1.05 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -1.12 \cdot 10^{-94}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 6 \cdot 10^{-62}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 0.0017:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                                                (FPCore (F B x)
                                                                                 :precision binary64
                                                                                 (let* ((t_0 (/ (* (sqrt 0.5) F) B)))
                                                                                   (if (<= F -1.05e-17)
                                                                                     (/ (- -1.0 x) B)
                                                                                     (if (<= F -1.12e-94)
                                                                                       t_0
                                                                                       (if (<= F 6e-62) (/ (- x) B) (if (<= F 0.0017) t_0 (/ (- 1.0 x) B)))))))
                                                                                double code(double F, double B, double x) {
                                                                                	double t_0 = (sqrt(0.5) * F) / B;
                                                                                	double tmp;
                                                                                	if (F <= -1.05e-17) {
                                                                                		tmp = (-1.0 - x) / B;
                                                                                	} else if (F <= -1.12e-94) {
                                                                                		tmp = t_0;
                                                                                	} else if (F <= 6e-62) {
                                                                                		tmp = -x / B;
                                                                                	} else if (F <= 0.0017) {
                                                                                		tmp = t_0;
                                                                                	} else {
                                                                                		tmp = (1.0 - x) / B;
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                real(8) function code(f, b, x)
                                                                                    real(8), intent (in) :: f
                                                                                    real(8), intent (in) :: b
                                                                                    real(8), intent (in) :: x
                                                                                    real(8) :: t_0
                                                                                    real(8) :: tmp
                                                                                    t_0 = (sqrt(0.5d0) * f) / b
                                                                                    if (f <= (-1.05d-17)) then
                                                                                        tmp = ((-1.0d0) - x) / b
                                                                                    else if (f <= (-1.12d-94)) then
                                                                                        tmp = t_0
                                                                                    else if (f <= 6d-62) then
                                                                                        tmp = -x / b
                                                                                    else if (f <= 0.0017d0) then
                                                                                        tmp = t_0
                                                                                    else
                                                                                        tmp = (1.0d0 - x) / b
                                                                                    end if
                                                                                    code = tmp
                                                                                end function
                                                                                
                                                                                public static double code(double F, double B, double x) {
                                                                                	double t_0 = (Math.sqrt(0.5) * F) / B;
                                                                                	double tmp;
                                                                                	if (F <= -1.05e-17) {
                                                                                		tmp = (-1.0 - x) / B;
                                                                                	} else if (F <= -1.12e-94) {
                                                                                		tmp = t_0;
                                                                                	} else if (F <= 6e-62) {
                                                                                		tmp = -x / B;
                                                                                	} else if (F <= 0.0017) {
                                                                                		tmp = t_0;
                                                                                	} else {
                                                                                		tmp = (1.0 - x) / B;
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                def code(F, B, x):
                                                                                	t_0 = (math.sqrt(0.5) * F) / B
                                                                                	tmp = 0
                                                                                	if F <= -1.05e-17:
                                                                                		tmp = (-1.0 - x) / B
                                                                                	elif F <= -1.12e-94:
                                                                                		tmp = t_0
                                                                                	elif F <= 6e-62:
                                                                                		tmp = -x / B
                                                                                	elif F <= 0.0017:
                                                                                		tmp = t_0
                                                                                	else:
                                                                                		tmp = (1.0 - x) / B
                                                                                	return tmp
                                                                                
                                                                                function code(F, B, x)
                                                                                	t_0 = Float64(Float64(sqrt(0.5) * F) / B)
                                                                                	tmp = 0.0
                                                                                	if (F <= -1.05e-17)
                                                                                		tmp = Float64(Float64(-1.0 - x) / B);
                                                                                	elseif (F <= -1.12e-94)
                                                                                		tmp = t_0;
                                                                                	elseif (F <= 6e-62)
                                                                                		tmp = Float64(Float64(-x) / B);
                                                                                	elseif (F <= 0.0017)
                                                                                		tmp = t_0;
                                                                                	else
                                                                                		tmp = Float64(Float64(1.0 - x) / B);
                                                                                	end
                                                                                	return tmp
                                                                                end
                                                                                
                                                                                function tmp_2 = code(F, B, x)
                                                                                	t_0 = (sqrt(0.5) * F) / B;
                                                                                	tmp = 0.0;
                                                                                	if (F <= -1.05e-17)
                                                                                		tmp = (-1.0 - x) / B;
                                                                                	elseif (F <= -1.12e-94)
                                                                                		tmp = t_0;
                                                                                	elseif (F <= 6e-62)
                                                                                		tmp = -x / B;
                                                                                	elseif (F <= 0.0017)
                                                                                		tmp = t_0;
                                                                                	else
                                                                                		tmp = (1.0 - x) / B;
                                                                                	end
                                                                                	tmp_2 = tmp;
                                                                                end
                                                                                
                                                                                code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Sqrt[0.5], $MachinePrecision] * F), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -1.05e-17], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.12e-94], t$95$0, If[LessEqual[F, 6e-62], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 0.0017], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
                                                                                
                                                                                \begin{array}{l}
                                                                                
                                                                                \\
                                                                                \begin{array}{l}
                                                                                t_0 := \frac{\sqrt{0.5} \cdot F}{B}\\
                                                                                \mathbf{if}\;F \leq -1.05 \cdot 10^{-17}:\\
                                                                                \;\;\;\;\frac{-1 - x}{B}\\
                                                                                
                                                                                \mathbf{elif}\;F \leq -1.12 \cdot 10^{-94}:\\
                                                                                \;\;\;\;t\_0\\
                                                                                
                                                                                \mathbf{elif}\;F \leq 6 \cdot 10^{-62}:\\
                                                                                \;\;\;\;\frac{-x}{B}\\
                                                                                
                                                                                \mathbf{elif}\;F \leq 0.0017:\\
                                                                                \;\;\;\;t\_0\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;\frac{1 - x}{B}\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Split input into 4 regimes
                                                                                2. if F < -1.04999999999999996e-17

                                                                                  1. Initial program 53.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    if -1.04999999999999996e-17 < F < -1.12e-94 or 6.0000000000000002e-62 < F < 0.00169999999999999991

                                                                                    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                      13. lower-neg.f6451.8

                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                    5. Applied rewrites51.8%

                                                                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                    6. Taylor expanded in x around 0

                                                                                      \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{B} \]
                                                                                    7. Step-by-step derivation
                                                                                      1. Applied rewrites49.0%

                                                                                        \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot F}{B} \]
                                                                                      2. Taylor expanded in F around 0

                                                                                        \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F}{B} \]
                                                                                      3. Step-by-step derivation
                                                                                        1. Applied rewrites49.0%

                                                                                          \[\leadsto \frac{\sqrt{0.5} \cdot F}{B} \]

                                                                                        if -1.12e-94 < F < 6.0000000000000002e-62

                                                                                        1. Initial program 99.6%

                                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                        2. Add Preprocessing
                                                                                        3. Taylor expanded in B around 0

                                                                                          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. lower-/.f64N/A

                                                                                            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                          2. sub-negN/A

                                                                                            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                          3. *-commutativeN/A

                                                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                          4. lower-fma.f64N/A

                                                                                            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                          5. lower-sqrt.f64N/A

                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                          6. lower-/.f64N/A

                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                          7. associate-+r+N/A

                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                          8. +-commutativeN/A

                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                          9. unpow2N/A

                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                          10. lower-fma.f64N/A

                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                          11. +-commutativeN/A

                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                          12. lower-fma.f64N/A

                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                          13. lower-neg.f6448.0

                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                        5. Applied rewrites48.0%

                                                                                          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                        6. Taylor expanded in F around 0

                                                                                          \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                                        7. Step-by-step derivation
                                                                                          1. Applied rewrites39.0%

                                                                                            \[\leadsto \frac{-x}{B} \]

                                                                                          if 0.00169999999999999991 < F

                                                                                          1. Initial program 54.4%

                                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                          2. Add Preprocessing
                                                                                          3. Taylor expanded in B around 0

                                                                                            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                          4. Step-by-step derivation
                                                                                            1. lower-/.f64N/A

                                                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                            2. sub-negN/A

                                                                                              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                            3. *-commutativeN/A

                                                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            4. lower-fma.f64N/A

                                                                                              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                            5. lower-sqrt.f64N/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            6. lower-/.f64N/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            7. associate-+r+N/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            8. +-commutativeN/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            9. unpow2N/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            10. lower-fma.f64N/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            11. +-commutativeN/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            12. lower-fma.f64N/A

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                            13. lower-neg.f6428.4

                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                          5. Applied rewrites28.4%

                                                                                            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                          6. Taylor expanded in F around inf

                                                                                            \[\leadsto \frac{1 - x}{B} \]
                                                                                          7. Step-by-step derivation
                                                                                            1. Applied rewrites42.4%

                                                                                              \[\leadsto \frac{1 - x}{B} \]
                                                                                          8. Recombined 4 regimes into one program.
                                                                                          9. Add Preprocessing

                                                                                          Alternative 19: 42.4% accurate, 13.6× speedup?

                                                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.45 \cdot 10^{-203}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 8 \cdot 10^{-58}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                                                          (FPCore (F B x)
                                                                                           :precision binary64
                                                                                           (if (<= F -1.45e-203)
                                                                                             (/ (- -1.0 x) B)
                                                                                             (if (<= F 8e-58) (/ (- x) B) (/ (- 1.0 x) B))))
                                                                                          double code(double F, double B, double x) {
                                                                                          	double tmp;
                                                                                          	if (F <= -1.45e-203) {
                                                                                          		tmp = (-1.0 - x) / B;
                                                                                          	} else if (F <= 8e-58) {
                                                                                          		tmp = -x / B;
                                                                                          	} else {
                                                                                          		tmp = (1.0 - x) / B;
                                                                                          	}
                                                                                          	return tmp;
                                                                                          }
                                                                                          
                                                                                          real(8) function code(f, b, x)
                                                                                              real(8), intent (in) :: f
                                                                                              real(8), intent (in) :: b
                                                                                              real(8), intent (in) :: x
                                                                                              real(8) :: tmp
                                                                                              if (f <= (-1.45d-203)) then
                                                                                                  tmp = ((-1.0d0) - x) / b
                                                                                              else if (f <= 8d-58) then
                                                                                                  tmp = -x / b
                                                                                              else
                                                                                                  tmp = (1.0d0 - x) / b
                                                                                              end if
                                                                                              code = tmp
                                                                                          end function
                                                                                          
                                                                                          public static double code(double F, double B, double x) {
                                                                                          	double tmp;
                                                                                          	if (F <= -1.45e-203) {
                                                                                          		tmp = (-1.0 - x) / B;
                                                                                          	} else if (F <= 8e-58) {
                                                                                          		tmp = -x / B;
                                                                                          	} else {
                                                                                          		tmp = (1.0 - x) / B;
                                                                                          	}
                                                                                          	return tmp;
                                                                                          }
                                                                                          
                                                                                          def code(F, B, x):
                                                                                          	tmp = 0
                                                                                          	if F <= -1.45e-203:
                                                                                          		tmp = (-1.0 - x) / B
                                                                                          	elif F <= 8e-58:
                                                                                          		tmp = -x / B
                                                                                          	else:
                                                                                          		tmp = (1.0 - x) / B
                                                                                          	return tmp
                                                                                          
                                                                                          function code(F, B, x)
                                                                                          	tmp = 0.0
                                                                                          	if (F <= -1.45e-203)
                                                                                          		tmp = Float64(Float64(-1.0 - x) / B);
                                                                                          	elseif (F <= 8e-58)
                                                                                          		tmp = Float64(Float64(-x) / B);
                                                                                          	else
                                                                                          		tmp = Float64(Float64(1.0 - x) / B);
                                                                                          	end
                                                                                          	return tmp
                                                                                          end
                                                                                          
                                                                                          function tmp_2 = code(F, B, x)
                                                                                          	tmp = 0.0;
                                                                                          	if (F <= -1.45e-203)
                                                                                          		tmp = (-1.0 - x) / B;
                                                                                          	elseif (F <= 8e-58)
                                                                                          		tmp = -x / B;
                                                                                          	else
                                                                                          		tmp = (1.0 - x) / B;
                                                                                          	end
                                                                                          	tmp_2 = tmp;
                                                                                          end
                                                                                          
                                                                                          code[F_, B_, x_] := If[LessEqual[F, -1.45e-203], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8e-58], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                                                          
                                                                                          \begin{array}{l}
                                                                                          
                                                                                          \\
                                                                                          \begin{array}{l}
                                                                                          \mathbf{if}\;F \leq -1.45 \cdot 10^{-203}:\\
                                                                                          \;\;\;\;\frac{-1 - x}{B}\\
                                                                                          
                                                                                          \mathbf{elif}\;F \leq 8 \cdot 10^{-58}:\\
                                                                                          \;\;\;\;\frac{-x}{B}\\
                                                                                          
                                                                                          \mathbf{else}:\\
                                                                                          \;\;\;\;\frac{1 - x}{B}\\
                                                                                          
                                                                                          
                                                                                          \end{array}
                                                                                          \end{array}
                                                                                          
                                                                                          Derivation
                                                                                          1. Split input into 3 regimes
                                                                                          2. if F < -1.4499999999999999e-203

                                                                                            1. Initial program 72.0%

                                                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                            2. Add Preprocessing
                                                                                            3. Taylor expanded in B around 0

                                                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                            4. Step-by-step derivation
                                                                                              1. lower-/.f64N/A

                                                                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                              2. sub-negN/A

                                                                                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                              3. *-commutativeN/A

                                                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                              4. lower-fma.f64N/A

                                                                                                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                              5. lower-sqrt.f64N/A

                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                              6. lower-/.f64N/A

                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                              7. associate-+r+N/A

                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                              8. +-commutativeN/A

                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                              9. unpow2N/A

                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                              10. lower-fma.f64N/A

                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                              11. +-commutativeN/A

                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                              12. lower-fma.f64N/A

                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                              13. lower-neg.f6435.7

                                                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                            5. Applied rewrites35.7%

                                                                                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                            6. Taylor expanded in F around -inf

                                                                                              \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                                                            7. Step-by-step derivation
                                                                                              1. Applied rewrites37.7%

                                                                                                \[\leadsto \frac{-1 - x}{B} \]

                                                                                              if -1.4499999999999999e-203 < F < 8.0000000000000002e-58

                                                                                              1. Initial program 99.6%

                                                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                              2. Add Preprocessing
                                                                                              3. Taylor expanded in B around 0

                                                                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                              4. Step-by-step derivation
                                                                                                1. lower-/.f64N/A

                                                                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                2. sub-negN/A

                                                                                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                3. *-commutativeN/A

                                                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                4. lower-fma.f64N/A

                                                                                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                5. lower-sqrt.f64N/A

                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                6. lower-/.f64N/A

                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                7. associate-+r+N/A

                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                8. +-commutativeN/A

                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                9. unpow2N/A

                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                10. lower-fma.f64N/A

                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                11. +-commutativeN/A

                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                12. lower-fma.f64N/A

                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                13. lower-neg.f6448.8

                                                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                              5. Applied rewrites48.8%

                                                                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                              6. Taylor expanded in F around 0

                                                                                                \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                                              7. Step-by-step derivation
                                                                                                1. Applied rewrites40.0%

                                                                                                  \[\leadsto \frac{-x}{B} \]

                                                                                                if 8.0000000000000002e-58 < F

                                                                                                1. Initial program 61.0%

                                                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                2. Add Preprocessing
                                                                                                3. Taylor expanded in B around 0

                                                                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                4. Step-by-step derivation
                                                                                                  1. lower-/.f64N/A

                                                                                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                  2. sub-negN/A

                                                                                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                  3. *-commutativeN/A

                                                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  4. lower-fma.f64N/A

                                                                                                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                  5. lower-sqrt.f64N/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  6. lower-/.f64N/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  7. associate-+r+N/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  8. +-commutativeN/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  9. unpow2N/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  10. lower-fma.f64N/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  11. +-commutativeN/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  12. lower-fma.f64N/A

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                  13. lower-neg.f6432.3

                                                                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                5. Applied rewrites32.3%

                                                                                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                6. Taylor expanded in F around inf

                                                                                                  \[\leadsto \frac{1 - x}{B} \]
                                                                                                7. Step-by-step derivation
                                                                                                  1. Applied rewrites37.1%

                                                                                                    \[\leadsto \frac{1 - x}{B} \]
                                                                                                8. Recombined 3 regimes into one program.
                                                                                                9. Add Preprocessing

                                                                                                Alternative 20: 35.3% accurate, 17.5× speedup?

                                                                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.45 \cdot 10^{-203}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \end{array} \]
                                                                                                (FPCore (F B x)
                                                                                                 :precision binary64
                                                                                                 (if (<= F -1.45e-203) (/ (- -1.0 x) B) (/ (- x) B)))
                                                                                                double code(double F, double B, double x) {
                                                                                                	double tmp;
                                                                                                	if (F <= -1.45e-203) {
                                                                                                		tmp = (-1.0 - x) / B;
                                                                                                	} else {
                                                                                                		tmp = -x / B;
                                                                                                	}
                                                                                                	return tmp;
                                                                                                }
                                                                                                
                                                                                                real(8) function code(f, b, x)
                                                                                                    real(8), intent (in) :: f
                                                                                                    real(8), intent (in) :: b
                                                                                                    real(8), intent (in) :: x
                                                                                                    real(8) :: tmp
                                                                                                    if (f <= (-1.45d-203)) then
                                                                                                        tmp = ((-1.0d0) - x) / b
                                                                                                    else
                                                                                                        tmp = -x / b
                                                                                                    end if
                                                                                                    code = tmp
                                                                                                end function
                                                                                                
                                                                                                public static double code(double F, double B, double x) {
                                                                                                	double tmp;
                                                                                                	if (F <= -1.45e-203) {
                                                                                                		tmp = (-1.0 - x) / B;
                                                                                                	} else {
                                                                                                		tmp = -x / B;
                                                                                                	}
                                                                                                	return tmp;
                                                                                                }
                                                                                                
                                                                                                def code(F, B, x):
                                                                                                	tmp = 0
                                                                                                	if F <= -1.45e-203:
                                                                                                		tmp = (-1.0 - x) / B
                                                                                                	else:
                                                                                                		tmp = -x / B
                                                                                                	return tmp
                                                                                                
                                                                                                function code(F, B, x)
                                                                                                	tmp = 0.0
                                                                                                	if (F <= -1.45e-203)
                                                                                                		tmp = Float64(Float64(-1.0 - x) / B);
                                                                                                	else
                                                                                                		tmp = Float64(Float64(-x) / B);
                                                                                                	end
                                                                                                	return tmp
                                                                                                end
                                                                                                
                                                                                                function tmp_2 = code(F, B, x)
                                                                                                	tmp = 0.0;
                                                                                                	if (F <= -1.45e-203)
                                                                                                		tmp = (-1.0 - x) / B;
                                                                                                	else
                                                                                                		tmp = -x / B;
                                                                                                	end
                                                                                                	tmp_2 = tmp;
                                                                                                end
                                                                                                
                                                                                                code[F_, B_, x_] := If[LessEqual[F, -1.45e-203], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
                                                                                                
                                                                                                \begin{array}{l}
                                                                                                
                                                                                                \\
                                                                                                \begin{array}{l}
                                                                                                \mathbf{if}\;F \leq -1.45 \cdot 10^{-203}:\\
                                                                                                \;\;\;\;\frac{-1 - x}{B}\\
                                                                                                
                                                                                                \mathbf{else}:\\
                                                                                                \;\;\;\;\frac{-x}{B}\\
                                                                                                
                                                                                                
                                                                                                \end{array}
                                                                                                \end{array}
                                                                                                
                                                                                                Derivation
                                                                                                1. Split input into 2 regimes
                                                                                                2. if F < -1.4499999999999999e-203

                                                                                                  1. Initial program 72.0%

                                                                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                  2. Add Preprocessing
                                                                                                  3. Taylor expanded in B around 0

                                                                                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. lower-/.f64N/A

                                                                                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                    2. sub-negN/A

                                                                                                      \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                    3. *-commutativeN/A

                                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                    4. lower-fma.f64N/A

                                                                                                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                    5. lower-sqrt.f64N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                    6. lower-/.f64N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                    7. associate-+r+N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                    8. +-commutativeN/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                    9. unpow2N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                    10. lower-fma.f64N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                    11. +-commutativeN/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                    12. lower-fma.f64N/A

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                    13. lower-neg.f6435.7

                                                                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                  5. Applied rewrites35.7%

                                                                                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                  6. Taylor expanded in F around -inf

                                                                                                    \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                                                                  7. Step-by-step derivation
                                                                                                    1. Applied rewrites37.7%

                                                                                                      \[\leadsto \frac{-1 - x}{B} \]

                                                                                                    if -1.4499999999999999e-203 < F

                                                                                                    1. Initial program 77.4%

                                                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                    2. Add Preprocessing
                                                                                                    3. Taylor expanded in B around 0

                                                                                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                    4. Step-by-step derivation
                                                                                                      1. lower-/.f64N/A

                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                      2. sub-negN/A

                                                                                                        \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                      3. *-commutativeN/A

                                                                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      4. lower-fma.f64N/A

                                                                                                        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                      5. lower-sqrt.f64N/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      6. lower-/.f64N/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      7. associate-+r+N/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      8. +-commutativeN/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      9. unpow2N/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      10. lower-fma.f64N/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      11. +-commutativeN/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      12. lower-fma.f64N/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      13. lower-neg.f6439.3

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                    5. Applied rewrites39.3%

                                                                                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                    6. Taylor expanded in F around 0

                                                                                                      \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                                                    7. Step-by-step derivation
                                                                                                      1. Applied rewrites25.2%

                                                                                                        \[\leadsto \frac{-x}{B} \]
                                                                                                    8. Recombined 2 regimes into one program.
                                                                                                    9. Add Preprocessing

                                                                                                    Alternative 21: 29.9% accurate, 26.3× speedup?

                                                                                                    \[\begin{array}{l} \\ \frac{-x}{B} \end{array} \]
                                                                                                    (FPCore (F B x) :precision binary64 (/ (- x) B))
                                                                                                    double code(double F, double B, double x) {
                                                                                                    	return -x / B;
                                                                                                    }
                                                                                                    
                                                                                                    real(8) function code(f, b, x)
                                                                                                        real(8), intent (in) :: f
                                                                                                        real(8), intent (in) :: b
                                                                                                        real(8), intent (in) :: x
                                                                                                        code = -x / b
                                                                                                    end function
                                                                                                    
                                                                                                    public static double code(double F, double B, double x) {
                                                                                                    	return -x / B;
                                                                                                    }
                                                                                                    
                                                                                                    def code(F, B, x):
                                                                                                    	return -x / B
                                                                                                    
                                                                                                    function code(F, B, x)
                                                                                                    	return Float64(Float64(-x) / B)
                                                                                                    end
                                                                                                    
                                                                                                    function tmp = code(F, B, x)
                                                                                                    	tmp = -x / B;
                                                                                                    end
                                                                                                    
                                                                                                    code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
                                                                                                    
                                                                                                    \begin{array}{l}
                                                                                                    
                                                                                                    \\
                                                                                                    \frac{-x}{B}
                                                                                                    \end{array}
                                                                                                    
                                                                                                    Derivation
                                                                                                    1. Initial program 75.2%

                                                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                    2. Add Preprocessing
                                                                                                    3. Taylor expanded in B around 0

                                                                                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                    4. Step-by-step derivation
                                                                                                      1. lower-/.f64N/A

                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                                                      2. sub-negN/A

                                                                                                        \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                      3. *-commutativeN/A

                                                                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      4. lower-fma.f64N/A

                                                                                                        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                                                      5. lower-sqrt.f64N/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      6. lower-/.f64N/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      7. associate-+r+N/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      8. +-commutativeN/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      9. unpow2N/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      10. lower-fma.f64N/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      11. +-commutativeN/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      12. lower-fma.f64N/A

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                                                      13. lower-neg.f6437.9

                                                                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                                                                    5. Applied rewrites37.9%

                                                                                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                                                                    6. Taylor expanded in F around 0

                                                                                                      \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                                                    7. Step-by-step derivation
                                                                                                      1. Applied rewrites23.4%

                                                                                                        \[\leadsto \frac{-x}{B} \]
                                                                                                      2. Add Preprocessing

                                                                                                      Reproduce

                                                                                                      ?
                                                                                                      herbie shell --seed 2024308 
                                                                                                      (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))))))