VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.5% → 99.4%
Time: 19.8s
Alternatives: 24
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 24 alternatives:

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

Initial Program: 76.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.4% accurate, 1.4× speedup?

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

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

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

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


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

    1. Initial program 40.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
      2. sin-lowering-sin.f6499.7

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    9. Simplified99.7%

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

    if -1.5999999999999999e160 < F < 2e7

    1. Initial program 98.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{F}{\sqrt{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      4. accelerator-lowering-fma.f6499.8

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

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

    if 2e7 < F

    1. Initial program 40.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in F around inf

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
      2. sin-lowering-sin.f6499.8

        \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    9. Simplified99.8%

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

Alternative 2: 99.6% accurate, 1.4× speedup?

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

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

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


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

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
      2. sin-lowering-sin.f6499.8

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    9. Simplified99.8%

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

    if -1.79999999999999993e50 < F < 1e8

    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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e8 < F

    1. Initial program 40.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in F around inf

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
      2. sin-lowering-sin.f6499.8

        \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    9. Simplified99.8%

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

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

Alternative 3: 98.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -115000000000:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 1.42:\\ \;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\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 -115000000000.0)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 1.42)
       (- (/ (/ F (sqrt 2.0)) (sin B)) t_0)
       (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -115000000000.0) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 1.42) {
		tmp = ((F / sqrt(2.0)) / 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 <= (-115000000000.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 1.42d0) then
        tmp = ((f / sqrt(2.0d0)) / 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 <= -115000000000.0) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 1.42) {
		tmp = ((F / Math.sqrt(2.0)) / 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 <= -115000000000.0:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 1.42:
		tmp = ((F / math.sqrt(2.0)) / 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 <= -115000000000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 1.42)
		tmp = Float64(Float64(Float64(F / sqrt(2.0)) / 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 <= -115000000000.0)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 1.42)
		tmp = ((F / sqrt(2.0)) / 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, -115000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(N[(F / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\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.15e11

    1. Initial program 68.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
      2. sin-lowering-sin.f6499.8

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    9. Simplified99.8%

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

    if -1.15e11 < F < 1.4199999999999999

    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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in x around 0

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

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

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

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

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

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

      \[\leadsto \frac{\frac{F}{\color{blue}{\sqrt{2}}}}{\sin B} - \frac{x}{\tan B} \]
    11. Step-by-step derivation
      1. sqrt-lowering-sqrt.f6499.2

        \[\leadsto \frac{\frac{F}{\color{blue}{\sqrt{2}}}}{\sin B} - \frac{x}{\tan B} \]
    12. Simplified99.2%

      \[\leadsto \frac{\frac{F}{\color{blue}{\sqrt{2}}}}{\sin B} - \frac{x}{\tan B} \]

    if 1.4199999999999999 < F

    1. Initial program 41.7%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
      2. sin-lowering-sin.f6499.1

        \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    9. Simplified99.1%

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

Alternative 4: 98.8% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -115000000000:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 1.42:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\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 -115000000000.0)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 1.42)
       (- (/ (* F (sqrt 0.5)) (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 <= -115000000000.0) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 1.42) {
		tmp = ((F * sqrt(0.5)) / 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 <= (-115000000000.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 1.42d0) then
        tmp = ((f * sqrt(0.5d0)) / 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 <= -115000000000.0) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 1.42) {
		tmp = ((F * Math.sqrt(0.5)) / 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 <= -115000000000.0:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 1.42:
		tmp = ((F * math.sqrt(0.5)) / 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 <= -115000000000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 1.42)
		tmp = Float64(Float64(Float64(F * sqrt(0.5)) / 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 <= -115000000000.0)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 1.42)
		tmp = ((F * sqrt(0.5)) / 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, -115000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\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.15e11

    1. Initial program 68.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
      2. sin-lowering-sin.f6499.8

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    9. Simplified99.8%

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

    if -1.15e11 < F < 1.4199999999999999

    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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{F \cdot \color{blue}{\sqrt{\frac{1}{2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. sin-lowering-sin.f6499.0

        \[\leadsto \frac{F \cdot \sqrt{0.5}}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    12. Simplified99.0%

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

    if 1.4199999999999999 < F

    1. Initial program 41.7%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
      2. sin-lowering-sin.f6499.1

        \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    9. Simplified99.1%

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

Alternative 5: 92.4% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.4 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 2.2 \cdot 10^{-134}:\\ \;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\ \mathbf{elif}\;F \leq 2050000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t\_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -2.4e-17)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 2.2e-134)
       (- (* (/ F B) (sqrt (/ 1.0 (fma F F 2.0)))) t_0)
       (if (<= F 2050000.0)
         (- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) (/ x 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 <= -2.4e-17) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 2.2e-134) {
		tmp = ((F / B) * sqrt((1.0 / fma(F, F, 2.0)))) - t_0;
	} else if (F <= 2050000.0) {
		tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - (x / 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 <= -2.4e-17)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 2.2e-134)
		tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(F, F, 2.0)))) - t_0);
	elseif (F <= 2050000.0)
		tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - Float64(x / 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, -2.4e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.2e-134], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2050000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}

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

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

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

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


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

    1. Initial program 70.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
      2. sin-lowering-sin.f6498.6

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    9. Simplified98.6%

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

    if -2.39999999999999986e-17 < F < 2.2e-134

    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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      7. accelerator-lowering-fma.f6484.8

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

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

    if 2.2e-134 < F < 2.05e6

    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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

    if 2.05e6 < F

    1. Initial program 40.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in F around inf

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
      2. sin-lowering-sin.f6499.8

        \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    9. Simplified99.8%

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

Alternative 6: 86.0% accurate, 1.6× speedup?

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

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

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

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

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


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

    1. Initial program 70.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
      2. sin-lowering-sin.f6498.6

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
    9. Simplified98.6%

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

    if -2.39999999999999986e-17 < F < 6.00000000000000038e-133

    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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      7. accelerator-lowering-fma.f6484.8

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

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

    if 6.00000000000000038e-133 < F < 2e7

    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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

    if 2e7 < F

    1. Initial program 40.9%

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]
    7. Step-by-step derivation
      1. --lowering--.f64N/A

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

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

        \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{B} \]
      4. /-lowering-/.f6486.2

        \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{B}} \]
    8. Simplified86.2%

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

Alternative 7: 78.0% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B}\\
\mathbf{if}\;x \leq -5.8 \cdot 10^{-171}:\\
\;\;\;\;t\_0\\

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

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.7999999999999997e-171 or 1.3599999999999999e-111 < x

    1. Initial program 74.8%

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
    5. Simplified59.3%

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

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

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

      if -5.7999999999999997e-171 < x < 1.3599999999999999e-111

      1. Initial program 70.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\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}} \]
      7. Taylor expanded in x around 0

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

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

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

          \[\leadsto \frac{\frac{F}{\sqrt{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
        4. accelerator-lowering-fma.f6476.6

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

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

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

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

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

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

    Alternative 8: 77.3% accurate, 2.2× speedup?

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

      1. Initial program 43.7%

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
      7. Step-by-step derivation
        1. distribute-lft-inN/A

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

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

          \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
        4. neg-mul-1N/A

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

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

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

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

          \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
        9. sin-lowering-sin.f64N/A

          \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{B} \]
        10. /-lowering-/.f6467.8

          \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
      8. Simplified67.8%

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

      if -3.95e152 < F < 6.0000000000000001e-138

      1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{F}{\sqrt{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
        4. accelerator-lowering-fma.f6499.8

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

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

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

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

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

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

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

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

          \[\leadsto \frac{F}{B} \cdot \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
        7. accelerator-lowering-fma.f6481.7

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

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

      if 6.0000000000000001e-138 < F < 2e7

      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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\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}} \]
      7. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

      if 2e7 < F

      1. Initial program 40.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]
      7. Step-by-step derivation
        1. --lowering--.f64N/A

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

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

          \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{B} \]
        4. /-lowering-/.f6486.2

          \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{B}} \]
      8. Simplified86.2%

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

    Alternative 9: 71.9% accurate, 2.2× speedup?

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

      1. Initial program 45.2%

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
      7. Step-by-step derivation
        1. distribute-lft-inN/A

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

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

          \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
        4. neg-mul-1N/A

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

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

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

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

          \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
        9. sin-lowering-sin.f64N/A

          \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{B} \]
        10. /-lowering-/.f6466.0

          \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
      8. Simplified66.0%

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

      if -2.0000000000000001e152 < F < 2e7

      1. Initial program 98.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\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}} \]
      7. Taylor expanded in x around 0

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

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

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

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

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

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

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

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

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

      if 2e7 < F

      1. Initial program 40.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]
      7. Step-by-step derivation
        1. --lowering--.f64N/A

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

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

          \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{B} \]
        4. /-lowering-/.f6486.2

          \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{B}} \]
      8. Simplified86.2%

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

    Alternative 10: 71.9% accurate, 2.2× speedup?

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

      1. Initial program 62.9%

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
      7. Step-by-step derivation
        1. distribute-lft-inN/A

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

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

          \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
        4. neg-mul-1N/A

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

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

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

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

          \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
        9. sin-lowering-sin.f64N/A

          \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{B} \]
        10. /-lowering-/.f6467.5

          \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
      8. Simplified67.5%

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

      if -3.39999999999999984e51 < F < 1e8

      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 \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. Step-by-step derivation
        1. /-lowering-/.f6461.9

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F}{\sin B} \cdot \frac{1}{\sqrt{\color{blue}{\mathsf{fma}\left(2, x, F \cdot F + 2\right)}}} \]
        12. accelerator-lowering-fma.f6461.8

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

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

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

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

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

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

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

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

      if 1e8 < F

      1. Initial program 40.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]
      7. Step-by-step derivation
        1. --lowering--.f64N/A

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

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

          \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{B} \]
        4. /-lowering-/.f6486.2

          \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{B}} \]
      8. Simplified86.2%

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

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

    Alternative 11: 63.6% accurate, 2.4× speedup?

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

      1. Initial program 70.2%

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
      7. Step-by-step derivation
        1. distribute-lft-inN/A

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

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

          \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
        4. neg-mul-1N/A

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

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

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

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

          \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
        9. sin-lowering-sin.f64N/A

          \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{B} \]
        10. /-lowering-/.f6468.9

          \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
      8. Simplified68.9%

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

      if -9.50000000000000029e-17 < F < -4.39999999999999979e-210

      1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}}}{\sin B} \]
        10. sin-lowering-sin.f6447.7

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

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

      if -4.39999999999999979e-210 < F < 0.0030000000000000001

      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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6447.6

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

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

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} + \left(0 - x\right)}{B}} \]
      7. Applied egg-rr47.7%

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

      if 0.0030000000000000001 < F

      1. Initial program 42.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]
      7. Step-by-step derivation
        1. --lowering--.f64N/A

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

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

          \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{B} \]
        4. /-lowering-/.f6484.8

          \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{B}} \]
      8. Simplified84.8%

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

    Alternative 12: 64.7% accurate, 2.7× speedup?

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

      1. Initial program 70.6%

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
      7. Step-by-step derivation
        1. distribute-lft-inN/A

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

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

          \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
        4. neg-mul-1N/A

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

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

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

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

          \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
        9. sin-lowering-sin.f64N/A

          \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{B} \]
        10. /-lowering-/.f6468.2

          \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
      8. Simplified68.2%

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

      if -2.39999999999999986e-17 < F < 0.0030000000000000001

      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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6441.6

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

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

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} + \left(0 - x\right)}{B}} \]
      7. Applied egg-rr41.7%

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

      if 0.0030000000000000001 < F

      1. Initial program 42.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]
      7. Step-by-step derivation
        1. --lowering--.f64N/A

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

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

          \[\leadsto \frac{1}{\color{blue}{\sin B}} - \frac{x}{B} \]
        4. /-lowering-/.f6484.8

          \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{B}} \]
      8. Simplified84.8%

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

    Alternative 13: 57.9% accurate, 2.8× speedup?

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

      1. Initial program 70.6%

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
      7. Step-by-step derivation
        1. distribute-lft-inN/A

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

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

          \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
        4. neg-mul-1N/A

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

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

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

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

          \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
        9. sin-lowering-sin.f64N/A

          \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{B} \]
        10. /-lowering-/.f6468.2

          \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{B}} \]
      8. Simplified68.2%

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

      if -2.39999999999999986e-17 < F < 1.2e9

      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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6440.9

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

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

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} + \left(0 - x\right)}{B}} \]
      7. Applied egg-rr41.0%

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

      if 1.2e9 < F

      1. Initial program 40.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. +-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, 0 - \frac{x}{\tan B}\right)} \]
      5. 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}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{x \cdot \frac{1}{3}} + \frac{1}{6}, 1\right) - x}{B} \]
        7. accelerator-lowering-fma.f6463.9

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right)}, 1\right) - x}{B} \]
      10. Simplified63.9%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right)} - x}{B} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 14: 51.6% accurate, 3.1× speedup?

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

      1. Initial program 68.9%

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{-1}{F}} \]
      7. Step-by-step derivation
        1. /-lowering-/.f6451.8

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

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

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
      10. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
        2. sin-lowering-sin.f6450.7

          \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
      11. Simplified50.7%

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

      if -3.6e13 < F < 2.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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6442.1

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

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

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

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

      if 2.8e9 < F

      1. Initial program 40.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. +-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, 0 - \frac{x}{\tan B}\right)} \]
      5. 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}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{x \cdot \frac{1}{3}} + \frac{1}{6}, 1\right) - x}{B} \]
        7. accelerator-lowering-fma.f6463.9

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right)}, 1\right) - x}{B} \]
      10. Simplified63.9%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right)} - x}{B} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 15: 43.0% accurate, 5.4× speedup?

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

      1. Initial program 73.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. +-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, 0 - \frac{x}{\tan B}\right)} \]
      5. 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}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, x \cdot \frac{1}{3} + \color{blue}{\frac{-1}{6}}, -1\right) - x}{B} \]
        9. accelerator-lowering-fma.f6446.4

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right)}, -1\right) - x}{B} \]
      10. Simplified46.4%

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

      if -7.80000000000000038e-70 < F < -8.80000000000000005e-221 or 2.4000000000000001e-58 < F < 1.15e7

      1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6439.1

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

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

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

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

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

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

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

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

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

          \[\leadsto \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \cdot \frac{F}{B} \]
        8. /-lowering-/.f6433.7

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

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

      if -8.80000000000000005e-221 < F < 2.4000000000000001e-58

      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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6444.6

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

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

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

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
        2. distribute-neg-frac2N/A

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

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

          \[\leadsto \color{blue}{\frac{x}{-1 \cdot B}} \]
        5. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
        6. neg-lowering-neg.f6436.4

          \[\leadsto \frac{x}{\color{blue}{-B}} \]
      8. Simplified36.4%

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

      if 1.15e7 < F

      1. Initial program 40.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. +-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, 0 - \frac{x}{\tan B}\right)} \]
      5. 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}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{x \cdot \frac{1}{3}} + \frac{1}{6}, 1\right) - x}{B} \]
        7. accelerator-lowering-fma.f6463.9

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right)}, 1\right) - x}{B} \]
      10. Simplified63.9%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.8 \cdot 10^{-70}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\ \mathbf{elif}\;F \leq -8.8 \cdot 10^{-221}:\\ \;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-58}:\\ \;\;\;\;\frac{0 - x}{B}\\ \mathbf{elif}\;F \leq 11500000:\\ \;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right) - x}{B}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 16: 51.3% accurate, 6.1× speedup?

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

      1. Initial program 62.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, 0 - \frac{x}{\tan B}\right)} \]
      5. 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}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, x \cdot \frac{1}{3} + \color{blue}{\frac{-1}{6}}, -1\right) - x}{B} \]
        9. accelerator-lowering-fma.f6450.5

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right)}, -1\right) - x}{B} \]
      10. Simplified50.5%

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

      if -3.10000000000000019e93 < F < 1.26e8

      1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6442.2

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

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

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

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

      if 1.26e8 < F

      1. Initial program 40.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. +-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, 0 - \frac{x}{\tan B}\right)} \]
      5. 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}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\frac{1}{3} \cdot x + \frac{1}{6}}, 1\right) - x}{B} \]
        6. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{x \cdot \frac{1}{3}} + \frac{1}{6}, 1\right) - x}{B} \]
        7. accelerator-lowering-fma.f6463.9

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right)}, 1\right) - x}{B} \]
      10. Simplified63.9%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right)} - x}{B} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 17: 50.3% accurate, 6.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -5.2 \cdot 10^{+28}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\ \mathbf{elif}\;F \leq 450:\\ \;\;\;\;\frac{1}{B} \cdot \left(\frac{F}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right) - x}{B}\\ \end{array} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (if (<= F -5.2e+28)
       (/
        (- (fma (* B B) (fma x 0.3333333333333333 -0.16666666666666666) -1.0) x)
        B)
       (if (<= F 450.0)
         (* (/ 1.0 B) (- (/ F (sqrt (fma 2.0 x 2.0))) x))
         (/
          (- (fma (* B B) (fma x 0.3333333333333333 0.16666666666666666) 1.0) x)
          B))))
    double code(double F, double B, double x) {
    	double tmp;
    	if (F <= -5.2e+28) {
    		tmp = (fma((B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B;
    	} else if (F <= 450.0) {
    		tmp = (1.0 / B) * ((F / sqrt(fma(2.0, x, 2.0))) - x);
    	} else {
    		tmp = (fma((B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B;
    	}
    	return tmp;
    }
    
    function code(F, B, x)
    	tmp = 0.0
    	if (F <= -5.2e+28)
    		tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B);
    	elseif (F <= 450.0)
    		tmp = Float64(Float64(1.0 / B) * Float64(Float64(F / sqrt(fma(2.0, x, 2.0))) - x));
    	else
    		tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B);
    	end
    	return tmp
    end
    
    code[F_, B_, x_] := If[LessEqual[F, -5.2e+28], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + -0.16666666666666666), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 450.0], N[(N[(1.0 / B), $MachinePrecision] * N[(N[(F / N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;F \leq -5.2 \cdot 10^{+28}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\
    
    \mathbf{elif}\;F \leq 450:\\
    \;\;\;\;\frac{1}{B} \cdot \left(\frac{F}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right) - x}{B}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if F < -5.2000000000000004e28

      1. Initial program 67.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. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
        2. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        3. associate-*l/N/A

          \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        4. div-invN/A

          \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        5. times-fracN/A

          \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        6. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}, \mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
      4. Applied egg-rr76.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, 0 - \frac{x}{\tan B}\right)} \]
      5. 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}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + \frac{1}{3} \cdot x\right)\right) - x}{B}} \]
      7. Simplified36.4%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(F \cdot 0.16666666666666666, \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, 2 \cdot x\right)}}, x \cdot 0.3333333333333333\right), F \cdot \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, 2 \cdot x\right)}}\right) - x}{B}} \]
      8. Taylor expanded in F around -inf

        \[\leadsto \frac{\color{blue}{\left({B}^{2} \cdot \left(\frac{1}{3} \cdot x - \frac{1}{6}\right) - 1\right)} - x}{B} \]
      9. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto \frac{\color{blue}{\left({B}^{2} \cdot \left(\frac{1}{3} \cdot x - \frac{1}{6}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)} - x}{B} \]
        2. metadata-evalN/A

          \[\leadsto \frac{\left({B}^{2} \cdot \left(\frac{1}{3} \cdot x - \frac{1}{6}\right) + \color{blue}{-1}\right) - x}{B} \]
        3. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({B}^{2}, \frac{1}{3} \cdot x - \frac{1}{6}, -1\right)} - x}{B} \]
        4. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{3} \cdot x - \frac{1}{6}, -1\right) - x}{B} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{3} \cdot x - \frac{1}{6}, -1\right) - x}{B} \]
        6. sub-negN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\frac{1}{3} \cdot x + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)}, -1\right) - x}{B} \]
        7. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{x \cdot \frac{1}{3}} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right), -1\right) - x}{B} \]
        8. metadata-evalN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, x \cdot \frac{1}{3} + \color{blue}{\frac{-1}{6}}, -1\right) - x}{B} \]
        9. accelerator-lowering-fma.f6450.0

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right)}, -1\right) - x}{B} \]
      10. Simplified50.0%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right)} - x}{B} \]

      if -5.2000000000000004e28 < F < 450

      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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-sub0N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6441.7

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      5. Simplified41.7%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
      6. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{B}{F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} + \left(0 - x\right)}}} \]
        2. associate-/r/N/A

          \[\leadsto \color{blue}{\frac{1}{B} \cdot \left(F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} + \left(0 - x\right)\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{\frac{1}{B} \cdot \left(F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} + \left(0 - x\right)\right)} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{1}{B}} \cdot \left(F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} + \left(0 - x\right)\right) \]
        5. sub0-negN/A

          \[\leadsto \frac{1}{B} \cdot \left(F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} + \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
        6. unsub-negN/A

          \[\leadsto \frac{1}{B} \cdot \color{blue}{\left(F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} - x\right)} \]
        7. inv-powN/A

          \[\leadsto \frac{1}{B} \cdot \left(F \cdot \sqrt{\color{blue}{{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}^{-1}}} - x\right) \]
        8. +-commutativeN/A

          \[\leadsto \frac{1}{B} \cdot \left(F \cdot \sqrt{{\color{blue}{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}}^{-1}} - x\right) \]
        9. *-commutativeN/A

          \[\leadsto \frac{1}{B} \cdot \left(F \cdot \sqrt{{\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{-1}} - x\right) \]
        10. sqrt-pow1N/A

          \[\leadsto \frac{1}{B} \cdot \left(F \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-1}{2}\right)}} - x\right) \]
        11. +-commutativeN/A

          \[\leadsto \frac{1}{B} \cdot \left(F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(\frac{-1}{2}\right)} - x\right) \]
        12. metadata-evalN/A

          \[\leadsto \frac{1}{B} \cdot \left(F \cdot {\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\color{blue}{\frac{-1}{2}}} - x\right) \]
        13. --lowering--.f64N/A

          \[\leadsto \frac{1}{B} \cdot \color{blue}{\left(F \cdot {\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}} - x\right)} \]
      7. Applied egg-rr41.7%

        \[\leadsto \color{blue}{\frac{1}{B} \cdot \left(\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x\right)} \]
      8. Taylor expanded in F around 0

        \[\leadsto \frac{1}{B} \cdot \left(\frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x}}} - x\right) \]
      9. Step-by-step derivation
        1. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{1}{B} \cdot \left(\frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x}}} - x\right) \]
        2. +-commutativeN/A

          \[\leadsto \frac{1}{B} \cdot \left(\frac{F}{\sqrt{\color{blue}{2 \cdot x + 2}}} - x\right) \]
        3. accelerator-lowering-fma.f6441.7

          \[\leadsto \frac{1}{B} \cdot \left(\frac{F}{\sqrt{\color{blue}{\mathsf{fma}\left(2, x, 2\right)}}} - x\right) \]
      10. Simplified41.7%

        \[\leadsto \frac{1}{B} \cdot \left(\frac{F}{\color{blue}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}}} - x\right) \]

      if 450 < F

      1. Initial program 40.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. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
        2. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        3. associate-*l/N/A

          \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        4. div-invN/A

          \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        5. times-fracN/A

          \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        6. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}, \mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
      4. Applied egg-rr70.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, 0 - \frac{x}{\tan B}\right)} \]
      5. 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}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + \frac{1}{3} \cdot x\right)\right) - x}{B}} \]
      7. Simplified52.0%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(F \cdot 0.16666666666666666, \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, 2 \cdot x\right)}}, x \cdot 0.3333333333333333\right), F \cdot \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, 2 \cdot x\right)}}\right) - x}{B}} \]
      8. Taylor expanded in F around inf

        \[\leadsto \frac{\color{blue}{\left(1 + {B}^{2} \cdot \left(\frac{1}{6} + \frac{1}{3} \cdot x\right)\right)} - x}{B} \]
      9. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\left({B}^{2} \cdot \left(\frac{1}{6} + \frac{1}{3} \cdot x\right) + 1\right)} - x}{B} \]
        2. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({B}^{2}, \frac{1}{6} + \frac{1}{3} \cdot x, 1\right)} - x}{B} \]
        3. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{6} + \frac{1}{3} \cdot x, 1\right) - x}{B} \]
        4. *-lowering-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{6} + \frac{1}{3} \cdot x, 1\right) - x}{B} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\frac{1}{3} \cdot x + \frac{1}{6}}, 1\right) - x}{B} \]
        6. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{x \cdot \frac{1}{3}} + \frac{1}{6}, 1\right) - x}{B} \]
        7. accelerator-lowering-fma.f6463.9

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right)}, 1\right) - x}{B} \]
      10. Simplified63.9%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right)} - x}{B} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 18: 43.2% accurate, 8.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -8.8 \cdot 10^{-150}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\ \mathbf{elif}\;F \leq 7.2 \cdot 10^{-59}:\\ \;\;\;\;\frac{0 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right) - x}{B}\\ \end{array} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (if (<= F -8.8e-150)
       (/
        (- (fma (* B B) (fma x 0.3333333333333333 -0.16666666666666666) -1.0) x)
        B)
       (if (<= F 7.2e-59)
         (/ (- 0.0 x) B)
         (/
          (- (fma (* B B) (fma x 0.3333333333333333 0.16666666666666666) 1.0) x)
          B))))
    double code(double F, double B, double x) {
    	double tmp;
    	if (F <= -8.8e-150) {
    		tmp = (fma((B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B;
    	} else if (F <= 7.2e-59) {
    		tmp = (0.0 - x) / B;
    	} else {
    		tmp = (fma((B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B;
    	}
    	return tmp;
    }
    
    function code(F, B, x)
    	tmp = 0.0
    	if (F <= -8.8e-150)
    		tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B);
    	elseif (F <= 7.2e-59)
    		tmp = Float64(Float64(0.0 - x) / B);
    	else
    		tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, 0.16666666666666666), 1.0) - x) / B);
    	end
    	return tmp
    end
    
    code[F_, B_, x_] := If[LessEqual[F, -8.8e-150], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + -0.16666666666666666), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.2e-59], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;F \leq -8.8 \cdot 10^{-150}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\
    
    \mathbf{elif}\;F \leq 7.2 \cdot 10^{-59}:\\
    \;\;\;\;\frac{0 - x}{B}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right) - x}{B}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if F < -8.7999999999999997e-150

      1. Initial program 76.1%

        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
        2. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        3. associate-*l/N/A

          \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        4. div-invN/A

          \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        5. times-fracN/A

          \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        6. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}, \mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
      4. Applied egg-rr82.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, 0 - \frac{x}{\tan B}\right)} \]
      5. 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}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + \frac{1}{3} \cdot x\right)\right) - x}{B}} \]
      7. Simplified37.6%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(F \cdot 0.16666666666666666, \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, 2 \cdot x\right)}}, x \cdot 0.3333333333333333\right), F \cdot \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, 2 \cdot x\right)}}\right) - x}{B}} \]
      8. Taylor expanded in F around -inf

        \[\leadsto \frac{\color{blue}{\left({B}^{2} \cdot \left(\frac{1}{3} \cdot x - \frac{1}{6}\right) - 1\right)} - x}{B} \]
      9. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto \frac{\color{blue}{\left({B}^{2} \cdot \left(\frac{1}{3} \cdot x - \frac{1}{6}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)} - x}{B} \]
        2. metadata-evalN/A

          \[\leadsto \frac{\left({B}^{2} \cdot \left(\frac{1}{3} \cdot x - \frac{1}{6}\right) + \color{blue}{-1}\right) - x}{B} \]
        3. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({B}^{2}, \frac{1}{3} \cdot x - \frac{1}{6}, -1\right)} - x}{B} \]
        4. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{3} \cdot x - \frac{1}{6}, -1\right) - x}{B} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{3} \cdot x - \frac{1}{6}, -1\right) - x}{B} \]
        6. sub-negN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\frac{1}{3} \cdot x + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)}, -1\right) - x}{B} \]
        7. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{x \cdot \frac{1}{3}} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right), -1\right) - x}{B} \]
        8. metadata-evalN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, x \cdot \frac{1}{3} + \color{blue}{\frac{-1}{6}}, -1\right) - x}{B} \]
        9. accelerator-lowering-fma.f6442.5

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right)}, -1\right) - x}{B} \]
      10. Simplified42.5%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right)} - x}{B} \]

      if -8.7999999999999997e-150 < F < 7.20000000000000001e-59

      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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-sub0N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6439.4

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      5. Simplified39.4%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
      6. Taylor expanded in F around 0

        \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
        2. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\frac{x}{\mathsf{neg}\left(B\right)}} \]
        3. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{-1 \cdot B}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{-1 \cdot B}} \]
        5. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
        6. neg-lowering-neg.f6430.2

          \[\leadsto \frac{x}{\color{blue}{-B}} \]
      8. Simplified30.2%

        \[\leadsto \color{blue}{\frac{x}{-B}} \]

      if 7.20000000000000001e-59 < F

      1. Initial program 50.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. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
        2. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        3. associate-*l/N/A

          \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        4. div-invN/A

          \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        5. times-fracN/A

          \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        6. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}, \mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
      4. Applied egg-rr75.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, 0 - \frac{x}{\tan B}\right)} \]
      5. 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}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + \frac{1}{3} \cdot x\right)\right) - x}{B}} \]
      7. Simplified52.5%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(F \cdot 0.16666666666666666, \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, 2 \cdot x\right)}}, x \cdot 0.3333333333333333\right), F \cdot \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, 2 \cdot x\right)}}\right) - x}{B}} \]
      8. Taylor expanded in F around inf

        \[\leadsto \frac{\color{blue}{\left(1 + {B}^{2} \cdot \left(\frac{1}{6} + \frac{1}{3} \cdot x\right)\right)} - x}{B} \]
      9. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{\left({B}^{2} \cdot \left(\frac{1}{6} + \frac{1}{3} \cdot x\right) + 1\right)} - x}{B} \]
        2. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({B}^{2}, \frac{1}{6} + \frac{1}{3} \cdot x, 1\right)} - x}{B} \]
        3. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{6} + \frac{1}{3} \cdot x, 1\right) - x}{B} \]
        4. *-lowering-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{6} + \frac{1}{3} \cdot x, 1\right) - x}{B} \]
        5. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\frac{1}{3} \cdot x + \frac{1}{6}}, 1\right) - x}{B} \]
        6. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{x \cdot \frac{1}{3}} + \frac{1}{6}, 1\right) - x}{B} \]
        7. accelerator-lowering-fma.f6456.4

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right)}, 1\right) - x}{B} \]
      10. Simplified56.4%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right)} - x}{B} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification44.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8.8 \cdot 10^{-150}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\ \mathbf{elif}\;F \leq 7.2 \cdot 10^{-59}:\\ \;\;\;\;\frac{0 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, 0.16666666666666666\right), 1\right) - x}{B}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 19: 43.2% accurate, 9.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -7.5 \cdot 10^{-150}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\ \mathbf{elif}\;F \leq 7 \cdot 10^{-59}:\\ \;\;\;\;\frac{0 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (if (<= F -7.5e-150)
       (/
        (- (fma (* B B) (fma x 0.3333333333333333 -0.16666666666666666) -1.0) x)
        B)
       (if (<= F 7e-59) (/ (- 0.0 x) B) (/ (- 1.0 x) B))))
    double code(double F, double B, double x) {
    	double tmp;
    	if (F <= -7.5e-150) {
    		tmp = (fma((B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B;
    	} else if (F <= 7e-59) {
    		tmp = (0.0 - x) / B;
    	} else {
    		tmp = (1.0 - x) / B;
    	}
    	return tmp;
    }
    
    function code(F, B, x)
    	tmp = 0.0
    	if (F <= -7.5e-150)
    		tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B);
    	elseif (F <= 7e-59)
    		tmp = Float64(Float64(0.0 - x) / B);
    	else
    		tmp = Float64(Float64(1.0 - x) / B);
    	end
    	return tmp
    end
    
    code[F_, B_, x_] := If[LessEqual[F, -7.5e-150], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + -0.16666666666666666), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7e-59], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;F \leq -7.5 \cdot 10^{-150}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\
    
    \mathbf{elif}\;F \leq 7 \cdot 10^{-59}:\\
    \;\;\;\;\frac{0 - x}{B}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1 - x}{B}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if F < -7.5000000000000004e-150

      1. Initial program 76.1%

        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
        2. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        3. associate-*l/N/A

          \[\leadsto \color{blue}{\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        4. div-invN/A

          \[\leadsto \frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\sin B \cdot \frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        5. times-fracN/A

          \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}} + \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right) \]
        6. accelerator-lowering-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}, \mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
      4. Applied egg-rr82.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{1}{F}}, 0 - \frac{x}{\tan B}\right)} \]
      5. 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}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + \frac{1}{3} \cdot x\right)\right) - x}{B}} \]
      7. Simplified37.6%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(F \cdot 0.16666666666666666, \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, 2 \cdot x\right)}}, x \cdot 0.3333333333333333\right), F \cdot \sqrt{\frac{1}{2 + \mathsf{fma}\left(F, F, 2 \cdot x\right)}}\right) - x}{B}} \]
      8. Taylor expanded in F around -inf

        \[\leadsto \frac{\color{blue}{\left({B}^{2} \cdot \left(\frac{1}{3} \cdot x - \frac{1}{6}\right) - 1\right)} - x}{B} \]
      9. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto \frac{\color{blue}{\left({B}^{2} \cdot \left(\frac{1}{3} \cdot x - \frac{1}{6}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)} - x}{B} \]
        2. metadata-evalN/A

          \[\leadsto \frac{\left({B}^{2} \cdot \left(\frac{1}{3} \cdot x - \frac{1}{6}\right) + \color{blue}{-1}\right) - x}{B} \]
        3. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({B}^{2}, \frac{1}{3} \cdot x - \frac{1}{6}, -1\right)} - x}{B} \]
        4. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{3} \cdot x - \frac{1}{6}, -1\right) - x}{B} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{B \cdot B}, \frac{1}{3} \cdot x - \frac{1}{6}, -1\right) - x}{B} \]
        6. sub-negN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\frac{1}{3} \cdot x + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)}, -1\right) - x}{B} \]
        7. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{x \cdot \frac{1}{3}} + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right), -1\right) - x}{B} \]
        8. metadata-evalN/A

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, x \cdot \frac{1}{3} + \color{blue}{\frac{-1}{6}}, -1\right) - x}{B} \]
        9. accelerator-lowering-fma.f6442.5

          \[\leadsto \frac{\mathsf{fma}\left(B \cdot B, \color{blue}{\mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right)}, -1\right) - x}{B} \]
      10. Simplified42.5%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right)} - x}{B} \]

      if -7.5000000000000004e-150 < F < 7.0000000000000002e-59

      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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-sub0N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6439.4

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      5. Simplified39.4%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
      6. Taylor expanded in F around 0

        \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
        2. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\frac{x}{\mathsf{neg}\left(B\right)}} \]
        3. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{-1 \cdot B}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{-1 \cdot B}} \]
        5. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
        6. neg-lowering-neg.f6430.2

          \[\leadsto \frac{x}{\color{blue}{-B}} \]
      8. Simplified30.2%

        \[\leadsto \color{blue}{\frac{x}{-B}} \]

      if 7.0000000000000002e-59 < F

      1. Initial program 50.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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-sub0N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6452.0

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      5. Simplified52.0%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
      6. Taylor expanded in F around inf

        \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
      7. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
        2. --lowering--.f6456.0

          \[\leadsto \frac{\color{blue}{1 - x}}{B} \]
      8. Simplified56.0%

        \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification43.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.5 \cdot 10^{-150}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\ \mathbf{elif}\;F \leq 7 \cdot 10^{-59}:\\ \;\;\;\;\frac{0 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 20: 43.6% accurate, 11.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{-90}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B, B \cdot -0.16666666666666666, -1 - x\right)}{B}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{-59}:\\ \;\;\;\;\frac{0 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (if (<= F -3e-90)
       (/ (fma B (* B -0.16666666666666666) (- -1.0 x)) B)
       (if (<= F 7.6e-59) (/ (- 0.0 x) B) (/ (- 1.0 x) B))))
    double code(double F, double B, double x) {
    	double tmp;
    	if (F <= -3e-90) {
    		tmp = fma(B, (B * -0.16666666666666666), (-1.0 - x)) / B;
    	} else if (F <= 7.6e-59) {
    		tmp = (0.0 - x) / B;
    	} else {
    		tmp = (1.0 - x) / B;
    	}
    	return tmp;
    }
    
    function code(F, B, x)
    	tmp = 0.0
    	if (F <= -3e-90)
    		tmp = Float64(fma(B, Float64(B * -0.16666666666666666), Float64(-1.0 - x)) / B);
    	elseif (F <= 7.6e-59)
    		tmp = Float64(Float64(0.0 - x) / B);
    	else
    		tmp = Float64(Float64(1.0 - x) / B);
    	end
    	return tmp
    end
    
    code[F_, B_, x_] := If[LessEqual[F, -3e-90], N[(N[(B * N[(B * -0.16666666666666666), $MachinePrecision] + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.6e-59], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;F \leq -3 \cdot 10^{-90}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(B, B \cdot -0.16666666666666666, -1 - x\right)}{B}\\
    
    \mathbf{elif}\;F \leq 7.6 \cdot 10^{-59}:\\
    \;\;\;\;\frac{0 - x}{B}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1 - x}{B}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if F < -3.0000000000000002e-90

      1. Initial program 74.7%

        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in B around 0

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{x}{B}}\right)\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
      4. Step-by-step derivation
        1. /-lowering-/.f6442.1

          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      5. Simplified42.1%

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      6. Taylor expanded in F around -inf

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{B}\right)\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{-1}{F}} \]
      7. Step-by-step derivation
        1. /-lowering-/.f6447.0

          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{-1}{F}} \]
      8. Simplified47.0%

        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{-1}{F}} \]
      9. Taylor expanded in B around 0

        \[\leadsto \color{blue}{\frac{\frac{-1}{6} \cdot {B}^{2} - \left(1 + x\right)}{B}} \]
      10. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{-1}{6} \cdot {B}^{2} - \left(1 + x\right)}{B}} \]
        2. associate--r+N/A

          \[\leadsto \frac{\color{blue}{\left(\frac{-1}{6} \cdot {B}^{2} - 1\right) - x}}{B} \]
        3. sub-negN/A

          \[\leadsto \frac{\color{blue}{\left(\frac{-1}{6} \cdot {B}^{2} + \left(\mathsf{neg}\left(1\right)\right)\right)} - x}{B} \]
        4. metadata-evalN/A

          \[\leadsto \frac{\left(\frac{-1}{6} \cdot {B}^{2} + \color{blue}{-1}\right) - x}{B} \]
        5. associate--l+N/A

          \[\leadsto \frac{\color{blue}{\frac{-1}{6} \cdot {B}^{2} + \left(-1 - x\right)}}{B} \]
        6. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{{B}^{2} \cdot \frac{-1}{6}} + \left(-1 - x\right)}{B} \]
        7. unpow2N/A

          \[\leadsto \frac{\color{blue}{\left(B \cdot B\right)} \cdot \frac{-1}{6} + \left(-1 - x\right)}{B} \]
        8. associate-*l*N/A

          \[\leadsto \frac{\color{blue}{B \cdot \left(B \cdot \frac{-1}{6}\right)} + \left(-1 - x\right)}{B} \]
        9. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(B, B \cdot \frac{-1}{6}, -1 - x\right)}}{B} \]
        10. *-lowering-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(B, \color{blue}{B \cdot \frac{-1}{6}}, -1 - x\right)}{B} \]
        11. --lowering--.f6444.1

          \[\leadsto \frac{\mathsf{fma}\left(B, B \cdot -0.16666666666666666, \color{blue}{-1 - x}\right)}{B} \]
      11. Simplified44.1%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(B, B \cdot -0.16666666666666666, -1 - x\right)}{B}} \]

      if -3.0000000000000002e-90 < F < 7.59999999999999966e-59

      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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-sub0N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6439.5

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      5. Simplified39.5%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
      6. Taylor expanded in F around 0

        \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
        2. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\frac{x}{\mathsf{neg}\left(B\right)}} \]
        3. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{-1 \cdot B}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{-1 \cdot B}} \]
        5. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
        6. neg-lowering-neg.f6428.5

          \[\leadsto \frac{x}{\color{blue}{-B}} \]
      8. Simplified28.5%

        \[\leadsto \color{blue}{\frac{x}{-B}} \]

      if 7.59999999999999966e-59 < F

      1. Initial program 50.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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-sub0N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6452.0

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      5. Simplified52.0%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
      6. Taylor expanded in F around inf

        \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
      7. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
        2. --lowering--.f6456.0

          \[\leadsto \frac{\color{blue}{1 - x}}{B} \]
      8. Simplified56.0%

        \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification43.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{-90}:\\ \;\;\;\;\frac{\mathsf{fma}\left(B, B \cdot -0.16666666666666666, -1 - x\right)}{B}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{-59}:\\ \;\;\;\;\frac{0 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 21: 43.6% accurate, 13.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6.7 \cdot 10^{-93}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-59}:\\ \;\;\;\;\frac{0 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (if (<= F -6.7e-93)
       (/ (- -1.0 x) B)
       (if (<= F 8.2e-59) (/ (- 0.0 x) B) (/ (- 1.0 x) B))))
    double code(double F, double B, double x) {
    	double tmp;
    	if (F <= -6.7e-93) {
    		tmp = (-1.0 - x) / B;
    	} else if (F <= 8.2e-59) {
    		tmp = (0.0 - x) / B;
    	} else {
    		tmp = (1.0 - x) / B;
    	}
    	return tmp;
    }
    
    real(8) function code(f, b, x)
        real(8), intent (in) :: f
        real(8), intent (in) :: b
        real(8), intent (in) :: x
        real(8) :: tmp
        if (f <= (-6.7d-93)) then
            tmp = ((-1.0d0) - x) / b
        else if (f <= 8.2d-59) then
            tmp = (0.0d0 - x) / b
        else
            tmp = (1.0d0 - x) / b
        end if
        code = tmp
    end function
    
    public static double code(double F, double B, double x) {
    	double tmp;
    	if (F <= -6.7e-93) {
    		tmp = (-1.0 - x) / B;
    	} else if (F <= 8.2e-59) {
    		tmp = (0.0 - x) / B;
    	} else {
    		tmp = (1.0 - x) / B;
    	}
    	return tmp;
    }
    
    def code(F, B, x):
    	tmp = 0
    	if F <= -6.7e-93:
    		tmp = (-1.0 - x) / B
    	elif F <= 8.2e-59:
    		tmp = (0.0 - x) / B
    	else:
    		tmp = (1.0 - x) / B
    	return tmp
    
    function code(F, B, x)
    	tmp = 0.0
    	if (F <= -6.7e-93)
    		tmp = Float64(Float64(-1.0 - x) / B);
    	elseif (F <= 8.2e-59)
    		tmp = Float64(Float64(0.0 - x) / B);
    	else
    		tmp = Float64(Float64(1.0 - x) / B);
    	end
    	return tmp
    end
    
    function tmp_2 = code(F, B, x)
    	tmp = 0.0;
    	if (F <= -6.7e-93)
    		tmp = (-1.0 - x) / B;
    	elseif (F <= 8.2e-59)
    		tmp = (0.0 - x) / B;
    	else
    		tmp = (1.0 - x) / B;
    	end
    	tmp_2 = tmp;
    end
    
    code[F_, B_, x_] := If[LessEqual[F, -6.7e-93], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.2e-59], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;F \leq -6.7 \cdot 10^{-93}:\\
    \;\;\;\;\frac{-1 - x}{B}\\
    
    \mathbf{elif}\;F \leq 8.2 \cdot 10^{-59}:\\
    \;\;\;\;\frac{0 - x}{B}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1 - x}{B}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if F < -6.69999999999999973e-93

      1. Initial program 74.7%

        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in B around 0

        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
      4. Step-by-step derivation
        1. /-lowering-/.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. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-sub0N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6436.2

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      5. Simplified36.2%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
      6. Taylor expanded in F around -inf

        \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
      7. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
        2. mul-1-negN/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
        4. distribute-neg-inN/A

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
        5. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
        6. unsub-negN/A

          \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
        7. --lowering--.f6443.7

          \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
      8. Simplified43.7%

        \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]

      if -6.69999999999999973e-93 < F < 8.1999999999999991e-59

      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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-sub0N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6439.5

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      5. Simplified39.5%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
      6. Taylor expanded in F around 0

        \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
        2. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\frac{x}{\mathsf{neg}\left(B\right)}} \]
        3. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{-1 \cdot B}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{-1 \cdot B}} \]
        5. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
        6. neg-lowering-neg.f6428.5

          \[\leadsto \frac{x}{\color{blue}{-B}} \]
      8. Simplified28.5%

        \[\leadsto \color{blue}{\frac{x}{-B}} \]

      if 8.1999999999999991e-59 < F

      1. Initial program 50.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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-sub0N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6452.0

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      5. Simplified52.0%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
      6. Taylor expanded in F around inf

        \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
      7. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
        2. --lowering--.f6456.0

          \[\leadsto \frac{\color{blue}{1 - x}}{B} \]
      8. Simplified56.0%

        \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification43.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.7 \cdot 10^{-93}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 8.2 \cdot 10^{-59}:\\ \;\;\;\;\frac{0 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 22: 36.8% accurate, 17.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.45 \cdot 10^{-90}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{0 - x}{B}\\ \end{array} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (if (<= F -1.45e-90) (/ (- -1.0 x) B) (/ (- 0.0 x) B)))
    double code(double F, double B, double x) {
    	double tmp;
    	if (F <= -1.45e-90) {
    		tmp = (-1.0 - x) / B;
    	} else {
    		tmp = (0.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-90)) then
            tmp = ((-1.0d0) - x) / b
        else
            tmp = (0.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-90) {
    		tmp = (-1.0 - x) / B;
    	} else {
    		tmp = (0.0 - x) / B;
    	}
    	return tmp;
    }
    
    def code(F, B, x):
    	tmp = 0
    	if F <= -1.45e-90:
    		tmp = (-1.0 - x) / B
    	else:
    		tmp = (0.0 - x) / B
    	return tmp
    
    function code(F, B, x)
    	tmp = 0.0
    	if (F <= -1.45e-90)
    		tmp = Float64(Float64(-1.0 - x) / B);
    	else
    		tmp = Float64(Float64(0.0 - x) / B);
    	end
    	return tmp
    end
    
    function tmp_2 = code(F, B, x)
    	tmp = 0.0;
    	if (F <= -1.45e-90)
    		tmp = (-1.0 - x) / B;
    	else
    		tmp = (0.0 - x) / B;
    	end
    	tmp_2 = tmp;
    end
    
    code[F_, B_, x_] := If[LessEqual[F, -1.45e-90], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;F \leq -1.45 \cdot 10^{-90}:\\
    \;\;\;\;\frac{-1 - x}{B}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{0 - x}{B}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if F < -1.44999999999999992e-90

      1. Initial program 74.7%

        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in B around 0

        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
      4. Step-by-step derivation
        1. /-lowering-/.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. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-sub0N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6436.2

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      5. Simplified36.2%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
      6. Taylor expanded in F around -inf

        \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
      7. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
        2. mul-1-negN/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
        4. distribute-neg-inN/A

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
        5. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
        6. unsub-negN/A

          \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
        7. --lowering--.f6443.7

          \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
      8. Simplified43.7%

        \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]

      if -1.44999999999999992e-90 < F

      1. Initial program 72.8%

        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in B around 0

        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
      4. Step-by-step derivation
        1. /-lowering-/.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. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-sub0N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6446.4

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      5. Simplified46.4%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
      6. Taylor expanded in F around 0

        \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
        2. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\frac{x}{\mathsf{neg}\left(B\right)}} \]
        3. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{-1 \cdot B}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{-1 \cdot B}} \]
        5. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
        6. neg-lowering-neg.f6429.7

          \[\leadsto \frac{x}{\color{blue}{-B}} \]
      8. Simplified29.7%

        \[\leadsto \color{blue}{\frac{x}{-B}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification34.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.45 \cdot 10^{-90}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{0 - x}{B}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 23: 30.1% accurate, 17.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -5.2 \cdot 10^{+28}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{0 - x}{B}\\ \end{array} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (if (<= F -5.2e+28) (/ -1.0 B) (/ (- 0.0 x) B)))
    double code(double F, double B, double x) {
    	double tmp;
    	if (F <= -5.2e+28) {
    		tmp = -1.0 / B;
    	} else {
    		tmp = (0.0 - x) / B;
    	}
    	return tmp;
    }
    
    real(8) function code(f, b, x)
        real(8), intent (in) :: f
        real(8), intent (in) :: b
        real(8), intent (in) :: x
        real(8) :: tmp
        if (f <= (-5.2d+28)) then
            tmp = (-1.0d0) / b
        else
            tmp = (0.0d0 - x) / b
        end if
        code = tmp
    end function
    
    public static double code(double F, double B, double x) {
    	double tmp;
    	if (F <= -5.2e+28) {
    		tmp = -1.0 / B;
    	} else {
    		tmp = (0.0 - x) / B;
    	}
    	return tmp;
    }
    
    def code(F, B, x):
    	tmp = 0
    	if F <= -5.2e+28:
    		tmp = -1.0 / B
    	else:
    		tmp = (0.0 - x) / B
    	return tmp
    
    function code(F, B, x)
    	tmp = 0.0
    	if (F <= -5.2e+28)
    		tmp = Float64(-1.0 / B);
    	else
    		tmp = Float64(Float64(0.0 - x) / B);
    	end
    	return tmp
    end
    
    function tmp_2 = code(F, B, x)
    	tmp = 0.0;
    	if (F <= -5.2e+28)
    		tmp = -1.0 / B;
    	else
    		tmp = (0.0 - x) / B;
    	end
    	tmp_2 = tmp;
    end
    
    code[F_, B_, x_] := If[LessEqual[F, -5.2e+28], N[(-1.0 / B), $MachinePrecision], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;F \leq -5.2 \cdot 10^{+28}:\\
    \;\;\;\;\frac{-1}{B}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{0 - x}{B}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if F < -5.2000000000000004e28

      1. Initial program 67.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. /-lowering-/.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. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-sub0N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6435.1

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      5. Simplified35.1%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
      6. Taylor expanded in F around -inf

        \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
      7. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
        2. mul-1-negN/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
        4. distribute-neg-inN/A

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
        5. metadata-evalN/A

          \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
        6. unsub-negN/A

          \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
        7. --lowering--.f6448.8

          \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
      8. Simplified48.8%

        \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]
      9. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{-1}{B}} \]
      10. Step-by-step derivation
        1. /-lowering-/.f6432.8

          \[\leadsto \color{blue}{\frac{-1}{B}} \]
      11. Simplified32.8%

        \[\leadsto \color{blue}{\frac{-1}{B}} \]

      if -5.2000000000000004e28 < F

      1. Initial program 75.7%

        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in B around 0

        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
      4. Step-by-step derivation
        1. /-lowering-/.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. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
        4. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        6. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        7. associate-+l+N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        12. unpow2N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        13. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
        14. neg-sub0N/A

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
        15. --lowering--.f6445.6

          \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      5. Simplified45.6%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
      6. Taylor expanded in F around 0

        \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{B}\right)} \]
        2. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\frac{x}{\mathsf{neg}\left(B\right)}} \]
        3. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{-1 \cdot B}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{-1 \cdot B}} \]
        5. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
        6. neg-lowering-neg.f6429.3

          \[\leadsto \frac{x}{\color{blue}{-B}} \]
      8. Simplified29.3%

        \[\leadsto \color{blue}{\frac{x}{-B}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification30.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -5.2 \cdot 10^{+28}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{0 - x}{B}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 24: 10.2% accurate, 30.7× speedup?

    \[\begin{array}{l} \\ \frac{-1}{B} \end{array} \]
    (FPCore (F B x) :precision binary64 (/ -1.0 B))
    double code(double F, double B, double x) {
    	return -1.0 / B;
    }
    
    real(8) function code(f, b, x)
        real(8), intent (in) :: f
        real(8), intent (in) :: b
        real(8), intent (in) :: x
        code = (-1.0d0) / b
    end function
    
    public static double code(double F, double B, double x) {
    	return -1.0 / B;
    }
    
    def code(F, B, x):
    	return -1.0 / B
    
    function code(F, B, x)
    	return Float64(-1.0 / B)
    end
    
    function tmp = code(F, B, x)
    	tmp = -1.0 / B;
    end
    
    code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \frac{-1}{B}
    \end{array}
    
    Derivation
    1. Initial program 73.5%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
    4. Step-by-step derivation
      1. /-lowering-/.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. accelerator-lowering-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(F, \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, \mathsf{neg}\left(x\right)\right)}}{B} \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(F, \color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
      6. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
      7. associate-+l+N/A

        \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{2 \cdot x + \left({F}^{2} + 2\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
      8. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{x \cdot 2} + \left({F}^{2} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
      9. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{x \cdot 2 + \color{blue}{\left(2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
      10. accelerator-lowering-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(x, 2, 2 + {F}^{2}\right)}}}, \mathsf{neg}\left(x\right)\right)}{B} \]
      11. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{{F}^{2} + 2}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
      12. unpow2N/A

        \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F} + 2\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
      13. accelerator-lowering-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \mathsf{neg}\left(x\right)\right)}{B} \]
      14. neg-sub0N/A

        \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
      15. --lowering--.f6442.8

        \[\leadsto \frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \color{blue}{0 - x}\right)}{B} \]
    5. Simplified42.8%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, 0 - x\right)}{B}} \]
    6. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(1 + x\right)}{B}} \]
      2. mul-1-negN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(1 + x\right)\right)}}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B}} \]
      4. distribute-neg-inN/A

        \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
      5. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{-1} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
      6. unsub-negN/A

        \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
      7. --lowering--.f6430.2

        \[\leadsto \frac{\color{blue}{-1 - x}}{B} \]
    8. Simplified30.2%

      \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]
    9. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{-1}{B}} \]
    10. Step-by-step derivation
      1. /-lowering-/.f6411.2

        \[\leadsto \color{blue}{\frac{-1}{B}} \]
    11. Simplified11.2%

      \[\leadsto \color{blue}{\frac{-1}{B}} \]
    12. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2024197 
    (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))))))