VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.3% → 99.6%
Time: 12.8s
Alternatives: 23
Speedup: 1.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 23 alternatives:

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

Initial Program: 77.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.65 \cdot 10^{+28}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - \frac{x}{\tan B}\\

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

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


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

    1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(-1 \cdot F\right)}} - \frac{x}{\tan B} \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

    if -1.65e28 < F < 1.75e8

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

    if 1.75e8 < F

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 77.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{\sin B}\\ t_1 := \frac{F}{\sin B}\\ t_2 := x \cdot \frac{-1}{\tan B} + t\_1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-1}{2}\right)}\\ t_3 := \frac{x}{\tan B}\\ t_4 := \sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}} \cdot \frac{F}{B} - t\_3\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+19}:\\ \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(1 + x, 2, F \cdot F\right)} \cdot B} - t\_3\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-165}:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot t\_0, -\frac{x}{B}\right)\\ \mathbf{elif}\;t\_2 \leq 10^{-160}:\\ \;\;\;\;t\_0 - \frac{x}{B}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-51}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_2 \leq 50:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ -1.0 (sin B)))
        (t_1 (/ F (sin B)))
        (t_2
         (+
          (* x (/ -1.0 (tan B)))
          (* t_1 (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (/ -1.0 2.0)))))
        (t_3 (/ x (tan B)))
        (t_4 (- (* (sqrt (pow (fma F F (fma 2.0 x 2.0)) -1.0)) (/ F B)) t_3)))
   (if (<= t_2 -1e+19)
     (- (/ F (* (sqrt (fma (+ 1.0 x) 2.0 (* F F))) B)) t_3)
     (if (<= t_2 -2e-165)
       (fma -1.0 (* (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) t_0) (- (/ x B)))
       (if (<= t_2 1e-160)
         (- t_0 (/ x B))
         (if (<= t_2 2e-51)
           t_4
           (if (<= t_2 50.0)
             (* (sqrt (pow (fma F F 2.0) -1.0)) t_1)
             (if (<= t_2 2e+277) t_4 (- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
	double t_0 = -1.0 / sin(B);
	double t_1 = F / sin(B);
	double t_2 = (x * (-1.0 / tan(B))) + (t_1 * pow((((F * F) + 2.0) + (2.0 * x)), (-1.0 / 2.0)));
	double t_3 = x / tan(B);
	double t_4 = (sqrt(pow(fma(F, F, fma(2.0, x, 2.0)), -1.0)) * (F / B)) - t_3;
	double tmp;
	if (t_2 <= -1e+19) {
		tmp = (F / (sqrt(fma((1.0 + x), 2.0, (F * F))) * B)) - t_3;
	} else if (t_2 <= -2e-165) {
		tmp = fma(-1.0, ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) * t_0), -(x / B));
	} else if (t_2 <= 1e-160) {
		tmp = t_0 - (x / B);
	} else if (t_2 <= 2e-51) {
		tmp = t_4;
	} else if (t_2 <= 50.0) {
		tmp = sqrt(pow(fma(F, F, 2.0), -1.0)) * t_1;
	} else if (t_2 <= 2e+277) {
		tmp = t_4;
	} else {
		tmp = (1.0 / sin(B)) - (x / B);
	}
	return tmp;
}
function code(F, B, x)
	t_0 = Float64(-1.0 / sin(B))
	t_1 = Float64(F / sin(B))
	t_2 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_1 * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-1.0 / 2.0))))
	t_3 = Float64(x / tan(B))
	t_4 = Float64(Float64(sqrt((fma(F, F, fma(2.0, x, 2.0)) ^ -1.0)) * Float64(F / B)) - t_3)
	tmp = 0.0
	if (t_2 <= -1e+19)
		tmp = Float64(Float64(F / Float64(sqrt(fma(Float64(1.0 + x), 2.0, Float64(F * F))) * B)) - t_3);
	elseif (t_2 <= -2e-165)
		tmp = fma(-1.0, Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) * t_0), Float64(-Float64(x / B)));
	elseif (t_2 <= 1e-160)
		tmp = Float64(t_0 - Float64(x / B));
	elseif (t_2 <= 2e-51)
		tmp = t_4;
	elseif (t_2 <= 50.0)
		tmp = Float64(sqrt((fma(F, F, 2.0) ^ -1.0)) * t_1);
	elseif (t_2 <= 2e+277)
		tmp = t_4;
	else
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	end
	return tmp
end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * 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]}, Block[{t$95$3 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[Sqrt[N[Power[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+19], N[(N[(F / N[(N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] * 2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t$95$2, -2e-165], N[(-1.0 * N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] + (-N[(x / B), $MachinePrecision])), $MachinePrecision], If[LessEqual[t$95$2, 1e-160], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e-51], t$95$4, If[LessEqual[t$95$2, 50.0], N[(N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e+277], t$95$4, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
t_1 := \frac{F}{\sin B}\\
t_2 := x \cdot \frac{-1}{\tan B} + t\_1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-1}{2}\right)}\\
t_3 := \frac{x}{\tan B}\\
t_4 := \sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}} \cdot \frac{F}{B} - t\_3\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+19}:\\
\;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(1 + x, 2, F \cdot F\right)} \cdot B} - t\_3\\

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

\mathbf{elif}\;t\_2 \leq 10^{-160}:\\
\;\;\;\;t\_0 - \frac{x}{B}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-51}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;t\_2 \leq 50:\\
\;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot t\_1\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+277}:\\
\;\;\;\;t\_4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -1e19

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e19 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -2e-165

    1. Initial program 89.0%

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

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

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

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

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

    if -2e-165 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 9.9999999999999999e-161

    1. Initial program 17.5%

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

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

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    5. Applied rewrites17.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. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(-\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)}} \]
      2. +-commutativeN/A

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

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

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

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

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

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

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

      if 9.9999999999999999e-161 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 2e-51 or 50 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 2.00000000000000001e277

      1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2e-51 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 50

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.00000000000000001e277 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))))))

      1. Initial program 29.8%

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

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

          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      5. Applied rewrites25.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. Step-by-step derivation
        1. lift-+.f64N/A

          \[\leadsto \color{blue}{\left(-\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)}} \]
        2. +-commutativeN/A

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

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

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

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

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

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

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

      Alternative 3: 77.9% accurate, 0.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{\sin B}\\ t_1 := x \cdot \frac{-1}{\tan B} + t\_0 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-1}{2}\right)}\\ t_2 := \frac{x}{\tan B}\\ t_3 := \sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}} \cdot \frac{F}{B} - t\_2\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+19}:\\ \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(1 + x, 2, F \cdot F\right)} \cdot B} - t\_2\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-165}:\\ \;\;\;\;\frac{t\_0}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{elif}\;t\_1 \leq 10^{-160}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-51}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_1 \leq 50:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot t\_0\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (let* ((t_0 (/ F (sin B)))
              (t_1
               (+
                (* x (/ -1.0 (tan B)))
                (* t_0 (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (/ -1.0 2.0)))))
              (t_2 (/ x (tan B)))
              (t_3 (- (* (sqrt (pow (fma F F (fma 2.0 x 2.0)) -1.0)) (/ F B)) t_2)))
         (if (<= t_1 -1e+19)
           (- (/ F (* (sqrt (fma (+ 1.0 x) 2.0 (* F F))) B)) t_2)
           (if (<= t_1 -2e-165)
             (- (/ t_0 (sqrt (fma x 2.0 (fma F F 2.0)))) (/ x B))
             (if (<= t_1 1e-160)
               (- (/ -1.0 (sin B)) (/ x B))
               (if (<= t_1 2e-51)
                 t_3
                 (if (<= t_1 50.0)
                   (* (sqrt (pow (fma F F 2.0) -1.0)) t_0)
                   (if (<= t_1 2e+277) t_3 (- (/ 1.0 (sin B)) (/ x B))))))))))
      double code(double F, double B, double x) {
      	double t_0 = F / sin(B);
      	double t_1 = (x * (-1.0 / tan(B))) + (t_0 * pow((((F * F) + 2.0) + (2.0 * x)), (-1.0 / 2.0)));
      	double t_2 = x / tan(B);
      	double t_3 = (sqrt(pow(fma(F, F, fma(2.0, x, 2.0)), -1.0)) * (F / B)) - t_2;
      	double tmp;
      	if (t_1 <= -1e+19) {
      		tmp = (F / (sqrt(fma((1.0 + x), 2.0, (F * F))) * B)) - t_2;
      	} else if (t_1 <= -2e-165) {
      		tmp = (t_0 / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - (x / B);
      	} else if (t_1 <= 1e-160) {
      		tmp = (-1.0 / sin(B)) - (x / B);
      	} else if (t_1 <= 2e-51) {
      		tmp = t_3;
      	} else if (t_1 <= 50.0) {
      		tmp = sqrt(pow(fma(F, F, 2.0), -1.0)) * t_0;
      	} else if (t_1 <= 2e+277) {
      		tmp = t_3;
      	} else {
      		tmp = (1.0 / sin(B)) - (x / B);
      	}
      	return tmp;
      }
      
      function code(F, B, x)
      	t_0 = Float64(F / sin(B))
      	t_1 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-1.0 / 2.0))))
      	t_2 = Float64(x / tan(B))
      	t_3 = Float64(Float64(sqrt((fma(F, F, fma(2.0, x, 2.0)) ^ -1.0)) * Float64(F / B)) - t_2)
      	tmp = 0.0
      	if (t_1 <= -1e+19)
      		tmp = Float64(Float64(F / Float64(sqrt(fma(Float64(1.0 + x), 2.0, Float64(F * F))) * B)) - t_2);
      	elseif (t_1 <= -2e-165)
      		tmp = Float64(Float64(t_0 / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - Float64(x / B));
      	elseif (t_1 <= 1e-160)
      		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
      	elseif (t_1 <= 2e-51)
      		tmp = t_3;
      	elseif (t_1 <= 50.0)
      		tmp = Float64(sqrt((fma(F, F, 2.0) ^ -1.0)) * t_0);
      	elseif (t_1 <= 2e+277)
      		tmp = t_3;
      	else
      		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
      	end
      	return tmp
      end
      
      code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * 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]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Sqrt[N[Power[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+19], N[(N[(F / N[(N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] * 2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t$95$1, -2e-165], N[(N[(t$95$0 / N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-160], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-51], t$95$3, If[LessEqual[t$95$1, 50.0], N[(N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[t$95$1, 2e+277], t$95$3, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{F}{\sin B}\\
      t_1 := x \cdot \frac{-1}{\tan B} + t\_0 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-1}{2}\right)}\\
      t_2 := \frac{x}{\tan B}\\
      t_3 := \sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}} \cdot \frac{F}{B} - t\_2\\
      \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+19}:\\
      \;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(1 + x, 2, F \cdot F\right)} \cdot B} - t\_2\\
      
      \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-165}:\\
      \;\;\;\;\frac{t\_0}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\
      
      \mathbf{elif}\;t\_1 \leq 10^{-160}:\\
      \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
      
      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-51}:\\
      \;\;\;\;t\_3\\
      
      \mathbf{elif}\;t\_1 \leq 50:\\
      \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot t\_0\\
      
      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+277}:\\
      \;\;\;\;t\_3\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 6 regimes
      2. if (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -1e19

        1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1e19 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -2e-165

        1. Initial program 89.0%

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

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

            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        5. Applied rewrites76.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. Step-by-step derivation
          1. lift-+.f64N/A

            \[\leadsto \color{blue}{\left(-\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)}} \]
          2. +-commutativeN/A

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

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

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

            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
        7. Applied rewrites76.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}{B}} \]
        8. Step-by-step derivation
          1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

        if -2e-165 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 9.9999999999999999e-161

        1. Initial program 17.5%

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

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

            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        5. Applied rewrites17.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. Step-by-step derivation
          1. lift-+.f64N/A

            \[\leadsto \color{blue}{\left(-\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)}} \]
          2. +-commutativeN/A

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

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

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

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

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

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

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

          if 9.9999999999999999e-161 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 2e-51 or 50 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 2.00000000000000001e277

          1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 2e-51 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 50

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

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

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

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

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

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

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

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

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

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

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

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

          if 2.00000000000000001e277 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))))))

          1. Initial program 29.8%

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

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

              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          5. Applied rewrites25.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. Step-by-step derivation
            1. lift-+.f64N/A

              \[\leadsto \color{blue}{\left(-\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)}} \]
            2. +-commutativeN/A

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

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

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

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

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

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

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

          Alternative 4: 78.0% accurate, 0.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(1 + x, 2, F \cdot F\right)} \cdot B} - \frac{x}{\tan B}\\ t_1 := \frac{F}{\sin B}\\ t_2 := x \cdot \frac{-1}{\tan B} + t\_1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-1}{2}\right)}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+19}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-165}:\\ \;\;\;\;\frac{t\_1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{elif}\;t\_2 \leq 10^{-160}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-41}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_2 \leq 50:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
          (FPCore (F B x)
           :precision binary64
           (let* ((t_0 (- (/ F (* (sqrt (fma (+ 1.0 x) 2.0 (* F F))) B)) (/ x (tan B))))
                  (t_1 (/ F (sin B)))
                  (t_2
                   (+
                    (* x (/ -1.0 (tan B)))
                    (* t_1 (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (/ -1.0 2.0))))))
             (if (<= t_2 -1e+19)
               t_0
               (if (<= t_2 -2e-165)
                 (- (/ t_1 (sqrt (fma x 2.0 (fma F F 2.0)))) (/ x B))
                 (if (<= t_2 1e-160)
                   (- (/ -1.0 (sin B)) (/ x B))
                   (if (<= t_2 2e-41)
                     t_0
                     (if (<= t_2 50.0)
                       (* (sqrt (pow (fma F F 2.0) -1.0)) t_1)
                       (if (<= t_2 2e+277) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))))
          double code(double F, double B, double x) {
          	double t_0 = (F / (sqrt(fma((1.0 + x), 2.0, (F * F))) * B)) - (x / tan(B));
          	double t_1 = F / sin(B);
          	double t_2 = (x * (-1.0 / tan(B))) + (t_1 * pow((((F * F) + 2.0) + (2.0 * x)), (-1.0 / 2.0)));
          	double tmp;
          	if (t_2 <= -1e+19) {
          		tmp = t_0;
          	} else if (t_2 <= -2e-165) {
          		tmp = (t_1 / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - (x / B);
          	} else if (t_2 <= 1e-160) {
          		tmp = (-1.0 / sin(B)) - (x / B);
          	} else if (t_2 <= 2e-41) {
          		tmp = t_0;
          	} else if (t_2 <= 50.0) {
          		tmp = sqrt(pow(fma(F, F, 2.0), -1.0)) * t_1;
          	} else if (t_2 <= 2e+277) {
          		tmp = t_0;
          	} else {
          		tmp = (1.0 / sin(B)) - (x / B);
          	}
          	return tmp;
          }
          
          function code(F, B, x)
          	t_0 = Float64(Float64(F / Float64(sqrt(fma(Float64(1.0 + x), 2.0, Float64(F * F))) * B)) - Float64(x / tan(B)))
          	t_1 = Float64(F / sin(B))
          	t_2 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_1 * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-1.0 / 2.0))))
          	tmp = 0.0
          	if (t_2 <= -1e+19)
          		tmp = t_0;
          	elseif (t_2 <= -2e-165)
          		tmp = Float64(Float64(t_1 / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - Float64(x / B));
          	elseif (t_2 <= 1e-160)
          		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
          	elseif (t_2 <= 2e-41)
          		tmp = t_0;
          	elseif (t_2 <= 50.0)
          		tmp = Float64(sqrt((fma(F, F, 2.0) ^ -1.0)) * t_1);
          	elseif (t_2 <= 2e+277)
          		tmp = t_0;
          	else
          		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
          	end
          	return tmp
          end
          
          code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[(N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] * 2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * 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]}, If[LessEqual[t$95$2, -1e+19], t$95$0, If[LessEqual[t$95$2, -2e-165], N[(N[(t$95$1 / N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-160], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e-41], t$95$0, If[LessEqual[t$95$2, 50.0], N[(N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e+277], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(1 + x, 2, F \cdot F\right)} \cdot B} - \frac{x}{\tan B}\\
          t_1 := \frac{F}{\sin B}\\
          t_2 := x \cdot \frac{-1}{\tan B} + t\_1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-1}{2}\right)}\\
          \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+19}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-165}:\\
          \;\;\;\;\frac{t\_1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\
          
          \mathbf{elif}\;t\_2 \leq 10^{-160}:\\
          \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
          
          \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-41}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;t\_2 \leq 50:\\
          \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot t\_1\\
          
          \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+277}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 5 regimes
          2. if (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -1e19 or 9.9999999999999999e-161 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 2.00000000000000001e-41 or 50 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 2.00000000000000001e277

            1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -1e19 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -2e-165

            1. Initial program 89.0%

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

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

                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
            5. Applied rewrites76.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. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto \color{blue}{\left(-\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)}} \]
              2. +-commutativeN/A

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

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

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

                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
            7. Applied rewrites76.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}{B}} \]
            8. Step-by-step derivation
              1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

            if -2e-165 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 9.9999999999999999e-161

            1. Initial program 17.5%

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

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

                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
            5. Applied rewrites17.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. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto \color{blue}{\left(-\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)}} \]
              2. +-commutativeN/A

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

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

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

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

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

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

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

              if 2.00000000000000001e-41 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 50

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

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

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

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

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

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

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

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

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

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

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

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

              if 2.00000000000000001e277 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))))))

              1. Initial program 29.8%

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

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

                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
              5. Applied rewrites25.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. Step-by-step derivation
                1. lift-+.f64N/A

                  \[\leadsto \color{blue}{\left(-\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)}} \]
                2. +-commutativeN/A

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

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

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

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

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

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

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

              Alternative 5: 78.0% accurate, 0.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(1 + x, 2, F \cdot F\right)} \cdot B} - \frac{x}{\tan B}\\ t_1 := \frac{F}{\sin B}\\ t_2 := x \cdot \frac{-1}{\tan B} + t\_1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-1}{2}\right)}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+19}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-165}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{elif}\;t\_2 \leq 10^{-160}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-41}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_2 \leq 50:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
              (FPCore (F B x)
               :precision binary64
               (let* ((t_0 (- (/ F (* (sqrt (fma (+ 1.0 x) 2.0 (* F F))) B)) (/ x (tan B))))
                      (t_1 (/ F (sin B)))
                      (t_2
                       (+
                        (* x (/ -1.0 (tan B)))
                        (* t_1 (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (/ -1.0 2.0))))))
                 (if (<= t_2 -1e+19)
                   t_0
                   (if (<= t_2 -2e-165)
                     (- (/ F (* (sin B) (sqrt (fma x 2.0 (fma F F 2.0))))) (/ x B))
                     (if (<= t_2 1e-160)
                       (- (/ -1.0 (sin B)) (/ x B))
                       (if (<= t_2 2e-41)
                         t_0
                         (if (<= t_2 50.0)
                           (* (sqrt (pow (fma F F 2.0) -1.0)) t_1)
                           (if (<= t_2 2e+277) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))))
              double code(double F, double B, double x) {
              	double t_0 = (F / (sqrt(fma((1.0 + x), 2.0, (F * F))) * B)) - (x / tan(B));
              	double t_1 = F / sin(B);
              	double t_2 = (x * (-1.0 / tan(B))) + (t_1 * pow((((F * F) + 2.0) + (2.0 * x)), (-1.0 / 2.0)));
              	double tmp;
              	if (t_2 <= -1e+19) {
              		tmp = t_0;
              	} else if (t_2 <= -2e-165) {
              		tmp = (F / (sin(B) * sqrt(fma(x, 2.0, fma(F, F, 2.0))))) - (x / B);
              	} else if (t_2 <= 1e-160) {
              		tmp = (-1.0 / sin(B)) - (x / B);
              	} else if (t_2 <= 2e-41) {
              		tmp = t_0;
              	} else if (t_2 <= 50.0) {
              		tmp = sqrt(pow(fma(F, F, 2.0), -1.0)) * t_1;
              	} else if (t_2 <= 2e+277) {
              		tmp = t_0;
              	} else {
              		tmp = (1.0 / sin(B)) - (x / B);
              	}
              	return tmp;
              }
              
              function code(F, B, x)
              	t_0 = Float64(Float64(F / Float64(sqrt(fma(Float64(1.0 + x), 2.0, Float64(F * F))) * B)) - Float64(x / tan(B)))
              	t_1 = Float64(F / sin(B))
              	t_2 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_1 * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-1.0 / 2.0))))
              	tmp = 0.0
              	if (t_2 <= -1e+19)
              		tmp = t_0;
              	elseif (t_2 <= -2e-165)
              		tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(x, 2.0, fma(F, F, 2.0))))) - Float64(x / B));
              	elseif (t_2 <= 1e-160)
              		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
              	elseif (t_2 <= 2e-41)
              		tmp = t_0;
              	elseif (t_2 <= 50.0)
              		tmp = Float64(sqrt((fma(F, F, 2.0) ^ -1.0)) * t_1);
              	elseif (t_2 <= 2e+277)
              		tmp = t_0;
              	else
              		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
              	end
              	return tmp
              end
              
              code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[(N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] * 2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * 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]}, If[LessEqual[t$95$2, -1e+19], t$95$0, If[LessEqual[t$95$2, -2e-165], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-160], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e-41], t$95$0, If[LessEqual[t$95$2, 50.0], N[(N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e+277], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(1 + x, 2, F \cdot F\right)} \cdot B} - \frac{x}{\tan B}\\
              t_1 := \frac{F}{\sin B}\\
              t_2 := x \cdot \frac{-1}{\tan B} + t\_1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-1}{2}\right)}\\
              \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+19}:\\
              \;\;\;\;t\_0\\
              
              \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-165}:\\
              \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\
              
              \mathbf{elif}\;t\_2 \leq 10^{-160}:\\
              \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
              
              \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-41}:\\
              \;\;\;\;t\_0\\
              
              \mathbf{elif}\;t\_2 \leq 50:\\
              \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot t\_1\\
              
              \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+277}:\\
              \;\;\;\;t\_0\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 5 regimes
              2. if (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -1e19 or 9.9999999999999999e-161 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 2.00000000000000001e-41 or 50 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 2.00000000000000001e277

                1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -1e19 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -2e-165

                1. Initial program 89.0%

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

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

                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                5. Applied rewrites76.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. Step-by-step derivation
                  1. lift-+.f64N/A

                    \[\leadsto \color{blue}{\left(-\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)}} \]
                  2. +-commutativeN/A

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

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

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

                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                7. Applied rewrites76.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}{B}} \]
                8. Step-by-step derivation
                  1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

                if -2e-165 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 9.9999999999999999e-161

                1. Initial program 17.5%

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

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

                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                5. Applied rewrites17.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. Step-by-step derivation
                  1. lift-+.f64N/A

                    \[\leadsto \color{blue}{\left(-\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)}} \]
                  2. +-commutativeN/A

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

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

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

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

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

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

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

                  if 2.00000000000000001e-41 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 50

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

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

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

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

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

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

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

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

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

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

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

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

                  if 2.00000000000000001e277 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))))))

                  1. Initial program 29.8%

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

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

                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                  5. Applied rewrites25.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. Step-by-step derivation
                    1. lift-+.f64N/A

                      \[\leadsto \color{blue}{\left(-\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)}} \]
                    2. +-commutativeN/A

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

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

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

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

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

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

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

                  Alternative 6: 99.6% accurate, 0.8× speedup?

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

                    1. Initial program 31.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(-1 \cdot F\right)}} - \frac{x}{\tan B} \]
                    9. Step-by-step derivation
                      1. mul-1-negN/A

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

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

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

                    if -9.99999999999999978e122 < F < 2e7

                    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

                    if 2e7 < F

                    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 7: 99.7% accurate, 0.8× speedup?

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

                    1. Initial program 28.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(-1 \cdot F\right)}} - \frac{x}{\tan B} \]
                    9. Step-by-step derivation
                      1. mul-1-negN/A

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

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

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

                    if -1e153 < F < 2e8

                    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(-F, \frac{-1}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
                    5. Applied rewrites99.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}} \]

                    if 2e8 < F

                    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 8: 92.3% accurate, 1.0× speedup?

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

                    1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(-1 \cdot F\right)}} - \frac{x}{\tan B} \]
                    9. Step-by-step derivation
                      1. mul-1-negN/A

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

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

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

                    if -1.65e28 < F < -9.50000000000000013e-150

                    1. Initial program 96.8%

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

                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    4. Step-by-step derivation
                      1. lower-/.f6483.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. Applied rewrites83.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. Step-by-step derivation
                      1. lift-+.f64N/A

                        \[\leadsto \color{blue}{\left(-\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)}} \]
                      2. +-commutativeN/A

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

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

                    if -9.50000000000000013e-150 < F < 8.99999999999999994e-98

                    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 8.99999999999999994e-98 < F < 2.5e5

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

                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    5. Applied rewrites84.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. Step-by-step derivation
                      1. lift-+.f64N/A

                        \[\leadsto \color{blue}{\left(-\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)}} \]
                      2. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 2.5e5 < F

                    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{-1}{\frac{\tan B}{x}}} + \frac{1}{\sin B} \]
                      9. lower-/.f6499.7

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

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

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

                  Alternative 9: 92.6% accurate, 1.0× speedup?

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

                    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(-1 \cdot F\right)}} - \frac{x}{\tan B} \]
                    9. Step-by-step derivation
                      1. mul-1-negN/A

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

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

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

                    if -6.5e7 < F < -9.50000000000000013e-150

                    1. Initial program 99.5%

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

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

                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    5. Applied rewrites85.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. Step-by-step derivation
                      1. lift-+.f64N/A

                        \[\leadsto \color{blue}{\left(-\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)}} \]
                      2. +-commutativeN/A

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

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

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

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                    7. Applied rewrites85.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}{B}} \]
                    8. Step-by-step derivation
                      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                    if -9.50000000000000013e-150 < F < 8.99999999999999994e-98

                    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 8.99999999999999994e-98 < F < 2.5e5

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

                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    5. Applied rewrites84.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. Step-by-step derivation
                      1. lift-+.f64N/A

                        \[\leadsto \color{blue}{\left(-\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)}} \]
                      2. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 2.5e5 < F

                    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{-1}{\frac{\tan B}{x}}} + \frac{1}{\sin B} \]
                      9. lower-/.f6499.7

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

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

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

                  Alternative 10: 99.5% accurate, 1.1× speedup?

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

                    1. Initial program 28.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(-1 \cdot F\right)}} - \frac{x}{\tan B} \]
                    9. Step-by-step derivation
                      1. mul-1-negN/A

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

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

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

                    if -1e153 < F < 1.5499999999999999e157

                    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(-F, \frac{-1}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
                    5. Applied rewrites99.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}} \]

                    if 1.5499999999999999e157 < F

                    1. Initial program 34.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 F around inf

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

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

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

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

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

                  Alternative 11: 99.4% accurate, 1.1× speedup?

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

                    1. Initial program 28.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(-1 \cdot F\right)}} - \frac{x}{\tan B} \]
                    9. Step-by-step derivation
                      1. mul-1-negN/A

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

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

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

                    if -1.00000000000000001e155 < F < 1.5499999999999999e157

                    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 1.5499999999999999e157 < F

                    1. Initial program 34.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 F around inf

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

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

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\color{blue}{\sin B}} \]
                    5. Applied rewrites99.8%

                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{1}{\sin B}} \]
                  3. Recombined 3 regimes into one program.
                  4. Final simplification99.7%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1 \cdot 10^{+155}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.55 \cdot 10^{+157}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + {\sin B}^{-1}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 12: 92.6% accurate, 1.3× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -65000000:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - t\_1\\ \mathbf{elif}\;F \leq -9.5 \cdot 10^{-150}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{t\_0} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-98}:\\ \;\;\;\;\mathsf{fma}\left(-F, \frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}}}{-B}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 250000:\\ \;\;\;\;\frac{F}{\sin B \cdot t\_0} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t\_1\\ \end{array} \end{array} \]
                  (FPCore (F B x)
                   :precision binary64
                   (let* ((t_0 (sqrt (fma x 2.0 (fma F F 2.0)))) (t_1 (/ x (tan B))))
                     (if (<= F -65000000.0)
                       (- (/ F (* (sin B) (- F))) t_1)
                       (if (<= F -9.5e-150)
                         (- (/ (/ F (sin B)) t_0) (/ x B))
                         (if (<= F 9e-98)
                           (fma
                            (- F)
                            (/ (sqrt (pow (fma F F (fma 2.0 x 2.0)) -1.0)) (- B))
                            (/ (- x) (tan B)))
                           (if (<= F 250000.0)
                             (- (/ F (* (sin B) t_0)) (/ x B))
                             (- (/ 1.0 (sin B)) t_1)))))))
                  double code(double F, double B, double x) {
                  	double t_0 = sqrt(fma(x, 2.0, fma(F, F, 2.0)));
                  	double t_1 = x / tan(B);
                  	double tmp;
                  	if (F <= -65000000.0) {
                  		tmp = (F / (sin(B) * -F)) - t_1;
                  	} else if (F <= -9.5e-150) {
                  		tmp = ((F / sin(B)) / t_0) - (x / B);
                  	} else if (F <= 9e-98) {
                  		tmp = fma(-F, (sqrt(pow(fma(F, F, fma(2.0, x, 2.0)), -1.0)) / -B), (-x / tan(B)));
                  	} else if (F <= 250000.0) {
                  		tmp = (F / (sin(B) * t_0)) - (x / B);
                  	} else {
                  		tmp = (1.0 / sin(B)) - t_1;
                  	}
                  	return tmp;
                  }
                  
                  function code(F, B, x)
                  	t_0 = sqrt(fma(x, 2.0, fma(F, F, 2.0)))
                  	t_1 = Float64(x / tan(B))
                  	tmp = 0.0
                  	if (F <= -65000000.0)
                  		tmp = Float64(Float64(F / Float64(sin(B) * Float64(-F))) - t_1);
                  	elseif (F <= -9.5e-150)
                  		tmp = Float64(Float64(Float64(F / sin(B)) / t_0) - Float64(x / B));
                  	elseif (F <= 9e-98)
                  		tmp = fma(Float64(-F), Float64(sqrt((fma(F, F, fma(2.0, x, 2.0)) ^ -1.0)) / Float64(-B)), Float64(Float64(-x) / tan(B)));
                  	elseif (F <= 250000.0)
                  		tmp = Float64(Float64(F / Float64(sin(B) * t_0)) - Float64(x / B));
                  	else
                  		tmp = Float64(Float64(1.0 / sin(B)) - t_1);
                  	end
                  	return tmp
                  end
                  
                  code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -65000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -9.5e-150], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9e-98], N[((-F) * N[(N[Sqrt[N[Power[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] / (-B)), $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 250000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}\\
                  t_1 := \frac{x}{\tan B}\\
                  \mathbf{if}\;F \leq -65000000:\\
                  \;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - t\_1\\
                  
                  \mathbf{elif}\;F \leq -9.5 \cdot 10^{-150}:\\
                  \;\;\;\;\frac{\frac{F}{\sin B}}{t\_0} - \frac{x}{B}\\
                  
                  \mathbf{elif}\;F \leq 9 \cdot 10^{-98}:\\
                  \;\;\;\;\mathsf{fma}\left(-F, \frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}}}{-B}, \frac{-x}{\tan B}\right)\\
                  
                  \mathbf{elif}\;F \leq 250000:\\
                  \;\;\;\;\frac{F}{\sin B \cdot t\_0} - \frac{x}{B}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{1}{\sin B} - t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 5 regimes
                  2. if F < -6.5e7

                    1. Initial program 54.4%

                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-+.f64N/A

                        \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                      2. +-commutativeN/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                      3. lift-*.f64N/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      4. lift-/.f64N/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      5. frac-2negN/A

                        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\sin B\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      6. div-invN/A

                        \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(F\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\sin B\right)}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      7. associate-*l*N/A

                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      8. lower-fma.f64N/A

                        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                    4. Applied rewrites71.0%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(-F, \frac{-1}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
                    5. Applied rewrites71.1%

                      \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{\tan B}} \]
                    6. Step-by-step derivation
                      1. lift-/.f64N/A

                        \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}} - \frac{x}{\tan B} \]
                      2. lift-/.f64N/A

                        \[\leadsto \frac{\color{blue}{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B} - \frac{x}{\tan B} \]
                      3. associate-/l/N/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{\tan B} \]
                      4. lower-/.f64N/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{\tan B} \]
                      5. lower-*.f6471.1

                        \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{\tan B} \]
                      6. lift-fma.f64N/A

                        \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}} - \frac{x}{\tan B} \]
                      7. *-commutativeN/A

                        \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{x \cdot 2} + \mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{\tan B} \]
                      8. lower-fma.f6471.1

                        \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{\tan B} \]
                    7. Applied rewrites71.1%

                      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{\tan B} \]
                    8. Taylor expanded in F around -inf

                      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(-1 \cdot F\right)}} - \frac{x}{\tan B} \]
                    9. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)}} - \frac{x}{\tan B} \]
                      2. lower-neg.f6499.8

                        \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(-F\right)}} - \frac{x}{\tan B} \]
                    10. Applied rewrites99.8%

                      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(-F\right)}} - \frac{x}{\tan B} \]

                    if -6.5e7 < F < -9.50000000000000013e-150

                    1. Initial program 99.5%

                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    2. Add Preprocessing
                    3. Taylor expanded in B around 0

                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    4. Step-by-step derivation
                      1. lower-/.f6485.5

                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    5. Applied rewrites85.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. Step-by-step derivation
                      1. lift-+.f64N/A

                        \[\leadsto \color{blue}{\left(-\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)}} \]
                      2. +-commutativeN/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                      3. lift-neg.f64N/A

                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                      4. unsub-negN/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                      5. lower--.f6485.5

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                    7. Applied rewrites85.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}{B}} \]
                    8. Step-by-step derivation
                      1. lift-/.f64N/A

                        \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}} - \frac{x}{B} \]
                      2. lift-/.f64N/A

                        \[\leadsto \frac{\color{blue}{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B} - \frac{x}{B} \]
                      3. associate-/l/N/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                      4. associate-/r*N/A

                        \[\leadsto \color{blue}{\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                      5. lift-sin.f64N/A

                        \[\leadsto \frac{\frac{F}{\color{blue}{\sin B}}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B} \]
                      6. lower-/.f64N/A

                        \[\leadsto \color{blue}{\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                      7. lift-sin.f64N/A

                        \[\leadsto \frac{\frac{F}{\color{blue}{\sin B}}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B} \]
                      8. lower-/.f6485.4

                        \[\leadsto \frac{\color{blue}{\frac{F}{\sin B}}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B} \]
                      9. lift-fma.f64N/A

                        \[\leadsto \frac{\frac{F}{\sin B}}{\sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}} - \frac{x}{B} \]
                      10. *-commutativeN/A

                        \[\leadsto \frac{\frac{F}{\sin B}}{\sqrt{\color{blue}{x \cdot 2} + \mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{B} \]
                      11. lower-fma.f6485.4

                        \[\leadsto \frac{\frac{F}{\sin B}}{\sqrt{\color{blue}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                    9. Applied rewrites85.4%

                      \[\leadsto \color{blue}{\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]

                    if -9.50000000000000013e-150 < F < 8.99999999999999994e-98

                    1. Initial program 99.4%

                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-+.f64N/A

                        \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                      2. +-commutativeN/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                      3. lift-*.f64N/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      4. lift-/.f64N/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      5. frac-2negN/A

                        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\sin B\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      6. div-invN/A

                        \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(F\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\sin B\right)}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      7. associate-*l*N/A

                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      8. lower-fma.f64N/A

                        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                    4. Applied rewrites99.8%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(-F, \frac{-1}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
                    5. Taylor expanded in B around 0

                      \[\leadsto \mathsf{fma}\left(-F, \color{blue}{-1 \cdot \left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \frac{-x}{\tan B}\right) \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\mathsf{neg}\left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \frac{-x}{\tan B}\right) \]
                      2. associate-*l/N/A

                        \[\leadsto \mathsf{fma}\left(-F, \mathsf{neg}\left(\color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}}\right), \frac{-x}{\tan B}\right) \]
                      3. *-lft-identityN/A

                        \[\leadsto \mathsf{fma}\left(-F, \mathsf{neg}\left(\frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}}{B}\right), \frac{-x}{\tan B}\right) \]
                      4. distribute-neg-frac2N/A

                        \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\mathsf{neg}\left(B\right)}}, \frac{-x}{\tan B}\right) \]
                      5. mul-1-negN/A

                        \[\leadsto \mathsf{fma}\left(-F, \frac{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\color{blue}{-1 \cdot B}}, \frac{-x}{\tan B}\right) \]
                      6. lower-/.f64N/A

                        \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{-1 \cdot B}}, \frac{-x}{\tan B}\right) \]
                    7. Applied rewrites95.2%

                      \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}{-B}}, \frac{-x}{\tan B}\right) \]

                    if 8.99999999999999994e-98 < F < 2.5e5

                    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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    4. Step-by-step derivation
                      1. lower-/.f6484.2

                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    5. Applied rewrites84.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. Step-by-step derivation
                      1. lift-+.f64N/A

                        \[\leadsto \color{blue}{\left(-\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)}} \]
                      2. +-commutativeN/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                      3. lift-neg.f64N/A

                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                      4. unsub-negN/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                      5. lower--.f6484.2

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                    7. Applied rewrites84.1%

                      \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{B}} \]
                    8. Step-by-step derivation
                      1. lift-/.f64N/A

                        \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}} - \frac{x}{B} \]
                      2. lift-/.f64N/A

                        \[\leadsto \frac{\color{blue}{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B} - \frac{x}{B} \]
                      3. associate-/l/N/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                      4. lower-/.f64N/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                      5. lower-*.f6484.3

                        \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                      6. lift-fma.f64N/A

                        \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}} - \frac{x}{B} \]
                      7. *-commutativeN/A

                        \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{x \cdot 2} + \mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{B} \]
                      8. lower-fma.f6484.3

                        \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                    9. Applied rewrites84.3%

                      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]

                    if 2.5e5 < F

                    1. Initial program 62.3%

                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-+.f64N/A

                        \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                      2. +-commutativeN/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                      3. lift-*.f64N/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      4. lift-/.f64N/A

                        \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      5. frac-2negN/A

                        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\sin B\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      6. div-invN/A

                        \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(F\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\sin B\right)}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      7. associate-*l*N/A

                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                      8. lower-fma.f64N/A

                        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                    4. Applied rewrites72.9%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(-F, \frac{-1}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
                    5. Applied rewrites72.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}} \]
                    6. Taylor expanded in F around inf

                      \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                    7. Step-by-step derivation
                      1. Applied rewrites99.7%

                        \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                    8. Recombined 5 regimes into one program.
                    9. Final simplification95.8%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -65000000:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -9.5 \cdot 10^{-150}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-98}:\\ \;\;\;\;\mathsf{fma}\left(-F, \frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}}}{-B}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 250000:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
                    10. Add Preprocessing

                    Alternative 13: 92.6% accurate, 1.3× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}\\ \mathbf{if}\;F \leq -65000000:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -9.5 \cdot 10^{-150}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{t\_0} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-98}:\\ \;\;\;\;\mathsf{fma}\left(-F, \frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}}}{-B}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 250000:\\ \;\;\;\;\frac{F}{\sin B \cdot t\_0} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \end{array} \]
                    (FPCore (F B x)
                     :precision binary64
                     (let* ((t_0 (sqrt (fma x 2.0 (fma F F 2.0)))))
                       (if (<= F -65000000.0)
                         (+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
                         (if (<= F -9.5e-150)
                           (- (/ (/ F (sin B)) t_0) (/ x B))
                           (if (<= F 9e-98)
                             (fma
                              (- F)
                              (/ (sqrt (pow (fma F F (fma 2.0 x 2.0)) -1.0)) (- B))
                              (/ (- x) (tan B)))
                             (if (<= F 250000.0)
                               (- (/ F (* (sin B) t_0)) (/ x B))
                               (- (/ 1.0 (sin B)) (/ x (tan B)))))))))
                    double code(double F, double B, double x) {
                    	double t_0 = sqrt(fma(x, 2.0, fma(F, F, 2.0)));
                    	double tmp;
                    	if (F <= -65000000.0) {
                    		tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
                    	} else if (F <= -9.5e-150) {
                    		tmp = ((F / sin(B)) / t_0) - (x / B);
                    	} else if (F <= 9e-98) {
                    		tmp = fma(-F, (sqrt(pow(fma(F, F, fma(2.0, x, 2.0)), -1.0)) / -B), (-x / tan(B)));
                    	} else if (F <= 250000.0) {
                    		tmp = (F / (sin(B) * t_0)) - (x / B);
                    	} else {
                    		tmp = (1.0 / sin(B)) - (x / tan(B));
                    	}
                    	return tmp;
                    }
                    
                    function code(F, B, x)
                    	t_0 = sqrt(fma(x, 2.0, fma(F, F, 2.0)))
                    	tmp = 0.0
                    	if (F <= -65000000.0)
                    		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B)));
                    	elseif (F <= -9.5e-150)
                    		tmp = Float64(Float64(Float64(F / sin(B)) / t_0) - Float64(x / B));
                    	elseif (F <= 9e-98)
                    		tmp = fma(Float64(-F), Float64(sqrt((fma(F, F, fma(2.0, x, 2.0)) ^ -1.0)) / Float64(-B)), Float64(Float64(-x) / tan(B)));
                    	elseif (F <= 250000.0)
                    		tmp = Float64(Float64(F / Float64(sin(B) * t_0)) - Float64(x / B));
                    	else
                    		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B)));
                    	end
                    	return tmp
                    end
                    
                    code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -65000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.5e-150], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9e-98], N[((-F) * N[(N[Sqrt[N[Power[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] / (-B)), $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 250000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}\\
                    \mathbf{if}\;F \leq -65000000:\\
                    \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
                    
                    \mathbf{elif}\;F \leq -9.5 \cdot 10^{-150}:\\
                    \;\;\;\;\frac{\frac{F}{\sin B}}{t\_0} - \frac{x}{B}\\
                    
                    \mathbf{elif}\;F \leq 9 \cdot 10^{-98}:\\
                    \;\;\;\;\mathsf{fma}\left(-F, \frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}}}{-B}, \frac{-x}{\tan B}\right)\\
                    
                    \mathbf{elif}\;F \leq 250000:\\
                    \;\;\;\;\frac{F}{\sin B \cdot t\_0} - \frac{x}{B}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 5 regimes
                    2. if F < -6.5e7

                      1. Initial program 54.4%

                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      2. Add Preprocessing
                      3. Taylor expanded in F around -inf

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                      4. Step-by-step derivation
                        1. lower-/.f64N/A

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                        2. lower-sin.f6499.7

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\color{blue}{\sin B}} \]
                      5. Applied rewrites99.7%

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]

                      if -6.5e7 < F < -9.50000000000000013e-150

                      1. Initial program 99.5%

                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      2. Add Preprocessing
                      3. Taylor expanded in B around 0

                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      4. Step-by-step derivation
                        1. lower-/.f6485.5

                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      5. Applied rewrites85.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. Step-by-step derivation
                        1. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(-\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)}} \]
                        2. +-commutativeN/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                        3. lift-neg.f64N/A

                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                        4. unsub-negN/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                        5. lower--.f6485.5

                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                      7. Applied rewrites85.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}{B}} \]
                      8. Step-by-step derivation
                        1. lift-/.f64N/A

                          \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}} - \frac{x}{B} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{\color{blue}{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B} - \frac{x}{B} \]
                        3. associate-/l/N/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                        4. associate-/r*N/A

                          \[\leadsto \color{blue}{\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                        5. lift-sin.f64N/A

                          \[\leadsto \frac{\frac{F}{\color{blue}{\sin B}}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B} \]
                        6. lower-/.f64N/A

                          \[\leadsto \color{blue}{\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                        7. lift-sin.f64N/A

                          \[\leadsto \frac{\frac{F}{\color{blue}{\sin B}}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B} \]
                        8. lower-/.f6485.4

                          \[\leadsto \frac{\color{blue}{\frac{F}{\sin B}}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B} \]
                        9. lift-fma.f64N/A

                          \[\leadsto \frac{\frac{F}{\sin B}}{\sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}} - \frac{x}{B} \]
                        10. *-commutativeN/A

                          \[\leadsto \frac{\frac{F}{\sin B}}{\sqrt{\color{blue}{x \cdot 2} + \mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{B} \]
                        11. lower-fma.f6485.4

                          \[\leadsto \frac{\frac{F}{\sin B}}{\sqrt{\color{blue}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                      9. Applied rewrites85.4%

                        \[\leadsto \color{blue}{\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]

                      if -9.50000000000000013e-150 < F < 8.99999999999999994e-98

                      1. Initial program 99.4%

                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                        2. +-commutativeN/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                        3. lift-*.f64N/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                        4. lift-/.f64N/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                        5. frac-2negN/A

                          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\sin B\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                        6. div-invN/A

                          \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(F\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\sin B\right)}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                        7. associate-*l*N/A

                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                        8. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                      4. Applied rewrites99.8%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(-F, \frac{-1}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
                      5. Taylor expanded in B around 0

                        \[\leadsto \mathsf{fma}\left(-F, \color{blue}{-1 \cdot \left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \frac{-x}{\tan B}\right) \]
                      6. Step-by-step derivation
                        1. mul-1-negN/A

                          \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\mathsf{neg}\left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \frac{-x}{\tan B}\right) \]
                        2. associate-*l/N/A

                          \[\leadsto \mathsf{fma}\left(-F, \mathsf{neg}\left(\color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}}\right), \frac{-x}{\tan B}\right) \]
                        3. *-lft-identityN/A

                          \[\leadsto \mathsf{fma}\left(-F, \mathsf{neg}\left(\frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}}{B}\right), \frac{-x}{\tan B}\right) \]
                        4. distribute-neg-frac2N/A

                          \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\mathsf{neg}\left(B\right)}}, \frac{-x}{\tan B}\right) \]
                        5. mul-1-negN/A

                          \[\leadsto \mathsf{fma}\left(-F, \frac{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\color{blue}{-1 \cdot B}}, \frac{-x}{\tan B}\right) \]
                        6. lower-/.f64N/A

                          \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{-1 \cdot B}}, \frac{-x}{\tan B}\right) \]
                      7. Applied rewrites95.2%

                        \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}{-B}}, \frac{-x}{\tan B}\right) \]

                      if 8.99999999999999994e-98 < F < 2.5e5

                      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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      4. Step-by-step derivation
                        1. lower-/.f6484.2

                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      5. Applied rewrites84.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. Step-by-step derivation
                        1. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(-\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)}} \]
                        2. +-commutativeN/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                        3. lift-neg.f64N/A

                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                        4. unsub-negN/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                        5. lower--.f6484.2

                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                      7. Applied rewrites84.1%

                        \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{B}} \]
                      8. Step-by-step derivation
                        1. lift-/.f64N/A

                          \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}} - \frac{x}{B} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{\color{blue}{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B} - \frac{x}{B} \]
                        3. associate-/l/N/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                        4. lower-/.f64N/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                        5. lower-*.f6484.3

                          \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                        6. lift-fma.f64N/A

                          \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}} - \frac{x}{B} \]
                        7. *-commutativeN/A

                          \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{x \cdot 2} + \mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{B} \]
                        8. lower-fma.f6484.3

                          \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                      9. Applied rewrites84.3%

                        \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]

                      if 2.5e5 < F

                      1. Initial program 62.3%

                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                        2. +-commutativeN/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                        3. lift-*.f64N/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                        4. lift-/.f64N/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                        5. frac-2negN/A

                          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\sin B\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                        6. div-invN/A

                          \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(F\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\sin B\right)}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                        7. associate-*l*N/A

                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                        8. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                      4. Applied rewrites72.9%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(-F, \frac{-1}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
                      5. Applied rewrites72.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}} \]
                      6. Taylor expanded in F around inf

                        \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                      7. Step-by-step derivation
                        1. Applied rewrites99.7%

                          \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                      8. Recombined 5 regimes into one program.
                      9. Final simplification95.8%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -65000000:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq -9.5 \cdot 10^{-150}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-98}:\\ \;\;\;\;\mathsf{fma}\left(-F, \frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}}}{-B}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 250000:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
                      10. Add Preprocessing

                      Alternative 14: 84.6% accurate, 1.4× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.4 \cdot 10^{+110}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-98}:\\ \;\;\;\;\mathsf{fma}\left(-F, \frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}}}{-B}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 250000:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \end{array} \]
                      (FPCore (F B x)
                       :precision binary64
                       (if (<= F -1.4e+110)
                         (- (/ -1.0 (sin B)) (/ x B))
                         (if (<= F 9e-98)
                           (fma
                            (- F)
                            (/ (sqrt (pow (fma F F (fma 2.0 x 2.0)) -1.0)) (- B))
                            (/ (- x) (tan B)))
                           (if (<= F 250000.0)
                             (- (/ F (* (sin B) (sqrt (fma x 2.0 (fma F F 2.0))))) (/ x B))
                             (- (/ 1.0 (sin B)) (/ x (tan B)))))))
                      double code(double F, double B, double x) {
                      	double tmp;
                      	if (F <= -1.4e+110) {
                      		tmp = (-1.0 / sin(B)) - (x / B);
                      	} else if (F <= 9e-98) {
                      		tmp = fma(-F, (sqrt(pow(fma(F, F, fma(2.0, x, 2.0)), -1.0)) / -B), (-x / tan(B)));
                      	} else if (F <= 250000.0) {
                      		tmp = (F / (sin(B) * sqrt(fma(x, 2.0, fma(F, F, 2.0))))) - (x / B);
                      	} else {
                      		tmp = (1.0 / sin(B)) - (x / tan(B));
                      	}
                      	return tmp;
                      }
                      
                      function code(F, B, x)
                      	tmp = 0.0
                      	if (F <= -1.4e+110)
                      		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
                      	elseif (F <= 9e-98)
                      		tmp = fma(Float64(-F), Float64(sqrt((fma(F, F, fma(2.0, x, 2.0)) ^ -1.0)) / Float64(-B)), Float64(Float64(-x) / tan(B)));
                      	elseif (F <= 250000.0)
                      		tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(x, 2.0, fma(F, F, 2.0))))) - Float64(x / B));
                      	else
                      		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B)));
                      	end
                      	return tmp
                      end
                      
                      code[F_, B_, x_] := If[LessEqual[F, -1.4e+110], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9e-98], N[((-F) * N[(N[Sqrt[N[Power[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] / (-B)), $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 250000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;F \leq -1.4 \cdot 10^{+110}:\\
                      \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
                      
                      \mathbf{elif}\;F \leq 9 \cdot 10^{-98}:\\
                      \;\;\;\;\mathsf{fma}\left(-F, \frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}}}{-B}, \frac{-x}{\tan B}\right)\\
                      
                      \mathbf{elif}\;F \leq 250000:\\
                      \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 4 regimes
                      2. if F < -1.39999999999999993e110

                        1. Initial program 33.1%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. Add Preprocessing
                        3. Taylor expanded in B around 0

                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        4. Step-by-step derivation
                          1. lower-/.f6418.4

                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        5. Applied rewrites18.4%

                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        6. Step-by-step derivation
                          1. lift-+.f64N/A

                            \[\leadsto \color{blue}{\left(-\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)}} \]
                          2. +-commutativeN/A

                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                          3. lift-neg.f64N/A

                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                          4. unsub-negN/A

                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                          5. lower--.f6418.4

                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                        7. Applied rewrites41.5%

                          \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{B}} \]
                        8. Taylor expanded in F around -inf

                          \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
                        9. Step-by-step derivation
                          1. Applied rewrites85.2%

                            \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]

                          if -1.39999999999999993e110 < F < 8.99999999999999994e-98

                          1. Initial program 98.7%

                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          2. Add Preprocessing
                          3. Step-by-step derivation
                            1. lift-+.f64N/A

                              \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                            2. +-commutativeN/A

                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                            3. lift-*.f64N/A

                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                            4. lift-/.f64N/A

                              \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                            5. frac-2negN/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\sin B\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                            6. div-invN/A

                              \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(F\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\sin B\right)}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                            7. associate-*l*N/A

                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                            8. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                          4. Applied rewrites99.7%

                            \[\leadsto \color{blue}{\mathsf{fma}\left(-F, \frac{-1}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
                          5. Taylor expanded in B around 0

                            \[\leadsto \mathsf{fma}\left(-F, \color{blue}{-1 \cdot \left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \frac{-x}{\tan B}\right) \]
                          6. Step-by-step derivation
                            1. mul-1-negN/A

                              \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\mathsf{neg}\left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \frac{-x}{\tan B}\right) \]
                            2. associate-*l/N/A

                              \[\leadsto \mathsf{fma}\left(-F, \mathsf{neg}\left(\color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}}\right), \frac{-x}{\tan B}\right) \]
                            3. *-lft-identityN/A

                              \[\leadsto \mathsf{fma}\left(-F, \mathsf{neg}\left(\frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}}{B}\right), \frac{-x}{\tan B}\right) \]
                            4. distribute-neg-frac2N/A

                              \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\mathsf{neg}\left(B\right)}}, \frac{-x}{\tan B}\right) \]
                            5. mul-1-negN/A

                              \[\leadsto \mathsf{fma}\left(-F, \frac{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\color{blue}{-1 \cdot B}}, \frac{-x}{\tan B}\right) \]
                            6. lower-/.f64N/A

                              \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{-1 \cdot B}}, \frac{-x}{\tan B}\right) \]
                          7. Applied rewrites84.9%

                            \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}{-B}}, \frac{-x}{\tan B}\right) \]

                          if 8.99999999999999994e-98 < F < 2.5e5

                          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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          4. Step-by-step derivation
                            1. lower-/.f6484.2

                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          5. Applied rewrites84.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. Step-by-step derivation
                            1. lift-+.f64N/A

                              \[\leadsto \color{blue}{\left(-\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)}} \]
                            2. +-commutativeN/A

                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                            3. lift-neg.f64N/A

                              \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                            4. unsub-negN/A

                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                            5. lower--.f6484.2

                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                          7. Applied rewrites84.1%

                            \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{B}} \]
                          8. Step-by-step derivation
                            1. lift-/.f64N/A

                              \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}} - \frac{x}{B} \]
                            2. lift-/.f64N/A

                              \[\leadsto \frac{\color{blue}{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B} - \frac{x}{B} \]
                            3. associate-/l/N/A

                              \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                            4. lower-/.f64N/A

                              \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                            5. lower-*.f6484.3

                              \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                            6. lift-fma.f64N/A

                              \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}} - \frac{x}{B} \]
                            7. *-commutativeN/A

                              \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{x \cdot 2} + \mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{B} \]
                            8. lower-fma.f6484.3

                              \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                          9. Applied rewrites84.3%

                            \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]

                          if 2.5e5 < F

                          1. Initial program 62.3%

                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          2. Add Preprocessing
                          3. Step-by-step derivation
                            1. lift-+.f64N/A

                              \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                            2. +-commutativeN/A

                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                            3. lift-*.f64N/A

                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                            4. lift-/.f64N/A

                              \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                            5. frac-2negN/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\sin B\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                            6. div-invN/A

                              \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(F\right)\right) \cdot \frac{1}{\mathsf{neg}\left(\sin B\right)}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                            7. associate-*l*N/A

                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                            8. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                          4. Applied rewrites72.9%

                            \[\leadsto \color{blue}{\mathsf{fma}\left(-F, \frac{-1}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
                          5. Applied rewrites72.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}} \]
                          6. Taylor expanded in F around inf

                            \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                          7. Step-by-step derivation
                            1. Applied rewrites99.7%

                              \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                          8. Recombined 4 regimes into one program.
                          9. Final simplification89.3%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.4 \cdot 10^{+110}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-98}:\\ \;\;\;\;\mathsf{fma}\left(-F, \frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}}}{-B}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 250000:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
                          10. Add Preprocessing

                          Alternative 15: 72.1% accurate, 2.2× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -5.8 \cdot 10^{+51}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1800000000:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 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 -5.8e+51)
                             (- (/ -1.0 (sin B)) (/ x B))
                             (if (<= F 1800000000.0)
                               (- (/ F (* (sin B) (sqrt (fma x 2.0 (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 <= -5.8e+51) {
                          		tmp = (-1.0 / sin(B)) - (x / B);
                          	} else if (F <= 1800000000.0) {
                          		tmp = (F / (sin(B) * sqrt(fma(x, 2.0, 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 <= -5.8e+51)
                          		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
                          	elseif (F <= 1800000000.0)
                          		tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(x, 2.0, fma(F, F, 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, -5.8e+51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1800000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(x * 2.0 + N[(F * F + 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 -5.8 \cdot 10^{+51}:\\
                          \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
                          
                          \mathbf{elif}\;F \leq 1800000000:\\
                          \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 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 < -5.7999999999999997e51

                            1. Initial program 46.6%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Add Preprocessing
                            3. Taylor expanded in B around 0

                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            4. Step-by-step derivation
                              1. lower-/.f6425.0

                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            5. Applied rewrites25.0%

                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            6. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \color{blue}{\left(-\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)}} \]
                              2. +-commutativeN/A

                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                              3. lift-neg.f64N/A

                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                              4. unsub-negN/A

                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                              5. lower--.f6425.0

                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                            7. Applied rewrites43.5%

                              \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{B}} \]
                            8. Taylor expanded in F around -inf

                              \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
                            9. Step-by-step derivation
                              1. Applied rewrites78.2%

                                \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]

                              if -5.7999999999999997e51 < F < 1.8e9

                              1. Initial program 98.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(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              4. Step-by-step derivation
                                1. lower-/.f6476.5

                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              5. Applied rewrites76.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. Step-by-step derivation
                                1. lift-+.f64N/A

                                  \[\leadsto \color{blue}{\left(-\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)}} \]
                                2. +-commutativeN/A

                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                3. lift-neg.f64N/A

                                  \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                4. unsub-negN/A

                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                5. lower--.f6476.5

                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                              7. Applied rewrites77.2%

                                \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{B}} \]
                              8. Step-by-step derivation
                                1. lift-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}} - \frac{x}{B} \]
                                2. lift-/.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B} - \frac{x}{B} \]
                                3. associate-/l/N/A

                                  \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                                4. lower-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                                5. lower-*.f6477.2

                                  \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                                6. lift-fma.f64N/A

                                  \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}} - \frac{x}{B} \]
                                7. *-commutativeN/A

                                  \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{x \cdot 2} + \mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{B} \]
                                8. lower-fma.f6477.2

                                  \[\leadsto \frac{F}{\sin B \cdot \sqrt{\color{blue}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]
                              9. Applied rewrites77.2%

                                \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}} - \frac{x}{B} \]

                              if 1.8e9 < F

                              1. Initial program 62.3%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              4. Step-by-step derivation
                                1. lower-/.f6435.7

                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              5. Applied rewrites35.7%

                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              6. Step-by-step derivation
                                1. lift-+.f64N/A

                                  \[\leadsto \color{blue}{\left(-\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)}} \]
                                2. +-commutativeN/A

                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                3. lift-neg.f64N/A

                                  \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                4. unsub-negN/A

                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                5. lower--.f6435.7

                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                              7. Applied rewrites46.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}{B}} \]
                              8. Taylor expanded in F around inf

                                \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{B} \]
                              9. Step-by-step derivation
                                1. Applied rewrites72.5%

                                  \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{B} \]
                              10. Recombined 3 regimes into one program.
                              11. Add Preprocessing

                              Alternative 16: 50.8% accurate, 2.5× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -65000000:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.55:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}}, F, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{x}{B}\\ \end{array} \end{array} \]
                              (FPCore (F B x)
                               :precision binary64
                               (if (<= F -65000000.0)
                                 (/ (- -1.0 x) B)
                                 (if (<= F 1.55)
                                   (/ (fma (sqrt (pow (fma 2.0 x 2.0) -1.0)) F (- x)) B)
                                   (- (/ 1.0 (* (fma -0.16666666666666666 (* B B) 1.0) B)) (/ x B)))))
                              double code(double F, double B, double x) {
                              	double tmp;
                              	if (F <= -65000000.0) {
                              		tmp = (-1.0 - x) / B;
                              	} else if (F <= 1.55) {
                              		tmp = fma(sqrt(pow(fma(2.0, x, 2.0), -1.0)), F, -x) / B;
                              	} else {
                              		tmp = (1.0 / (fma(-0.16666666666666666, (B * B), 1.0) * B)) - (x / B);
                              	}
                              	return tmp;
                              }
                              
                              function code(F, B, x)
                              	tmp = 0.0
                              	if (F <= -65000000.0)
                              		tmp = Float64(Float64(-1.0 - x) / B);
                              	elseif (F <= 1.55)
                              		tmp = Float64(fma(sqrt((fma(2.0, x, 2.0) ^ -1.0)), F, Float64(-x)) / B);
                              	else
                              		tmp = Float64(Float64(1.0 / Float64(fma(-0.16666666666666666, Float64(B * B), 1.0) * B)) - Float64(x / B));
                              	end
                              	return tmp
                              end
                              
                              code[F_, B_, x_] := If[LessEqual[F, -65000000.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.55], N[(N[(N[Sqrt[N[Power[N[(2.0 * x + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * F + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;F \leq -65000000:\\
                              \;\;\;\;\frac{-1 - x}{B}\\
                              
                              \mathbf{elif}\;F \leq 1.55:\\
                              \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}}, F, -x\right)}{B}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{x}{B}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if F < -6.5e7

                                1. Initial program 54.4%

                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                2. Add Preprocessing
                                3. Taylor expanded in B around 0

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                4. Step-by-step derivation
                                  1. lower-/.f64N/A

                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                  2. sub-negN/A

                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                  3. *-commutativeN/A

                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                  4. lower-fma.f64N/A

                                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                  5. lower-sqrt.f64N/A

                                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                  6. lower-/.f64N/A

                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                  7. associate-+r+N/A

                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                  8. +-commutativeN/A

                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                  9. unpow2N/A

                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                  10. lower-fma.f64N/A

                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                  11. +-commutativeN/A

                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                  12. lower-fma.f64N/A

                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                  13. lower-neg.f6440.8

                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                5. Applied rewrites40.8%

                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                6. Taylor expanded in F around -inf

                                  \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites53.4%

                                    \[\leadsto \frac{-1 - x}{B} \]

                                  if -6.5e7 < F < 1.55000000000000004

                                  1. Initial program 99.4%

                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in B around 0

                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                  4. Step-by-step derivation
                                    1. lower-/.f64N/A

                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                    2. sub-negN/A

                                      \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                    3. *-commutativeN/A

                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                    4. lower-fma.f64N/A

                                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                    5. lower-sqrt.f64N/A

                                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                    6. lower-/.f64N/A

                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                    7. associate-+r+N/A

                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                    8. +-commutativeN/A

                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                    9. unpow2N/A

                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                    10. lower-fma.f64N/A

                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                    11. +-commutativeN/A

                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                    12. lower-fma.f64N/A

                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                    13. lower-neg.f6458.1

                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                  5. Applied rewrites58.1%

                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                  6. Taylor expanded in F around 0

                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{2 + 2 \cdot x}}, F, -x\right)}{B} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites57.6%

                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}, F, -x\right)}{B} \]

                                    if 1.55000000000000004 < F

                                    1. Initial program 62.8%

                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in B around 0

                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f6436.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. Applied rewrites36.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. Step-by-step derivation
                                      1. lift-+.f64N/A

                                        \[\leadsto \color{blue}{\left(-\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)}} \]
                                      2. +-commutativeN/A

                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                      3. lift-neg.f64N/A

                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                      4. unsub-negN/A

                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                      5. lower--.f6436.6

                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                    7. Applied rewrites47.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}{B}} \]
                                    8. Taylor expanded in F around inf

                                      \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{B} \]
                                    9. Step-by-step derivation
                                      1. Applied rewrites72.3%

                                        \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{B} \]
                                      2. Taylor expanded in B around 0

                                        \[\leadsto \frac{1}{\color{blue}{B \cdot \left(1 + \frac{-1}{6} \cdot {B}^{2}\right)}} - \frac{x}{B} \]
                                      3. Step-by-step derivation
                                        1. *-commutativeN/A

                                          \[\leadsto \frac{1}{\color{blue}{\left(1 + \frac{-1}{6} \cdot {B}^{2}\right) \cdot B}} - \frac{x}{B} \]
                                        2. lower-*.f64N/A

                                          \[\leadsto \frac{1}{\color{blue}{\left(1 + \frac{-1}{6} \cdot {B}^{2}\right) \cdot B}} - \frac{x}{B} \]
                                        3. +-commutativeN/A

                                          \[\leadsto \frac{1}{\color{blue}{\left(\frac{-1}{6} \cdot {B}^{2} + 1\right)} \cdot B} - \frac{x}{B} \]
                                        4. lower-fma.f64N/A

                                          \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(\frac{-1}{6}, {B}^{2}, 1\right)} \cdot B} - \frac{x}{B} \]
                                        5. unpow2N/A

                                          \[\leadsto \frac{1}{\mathsf{fma}\left(\frac{-1}{6}, \color{blue}{B \cdot B}, 1\right) \cdot B} - \frac{x}{B} \]
                                        6. lower-*.f6443.0

                                          \[\leadsto \frac{1}{\mathsf{fma}\left(-0.16666666666666666, \color{blue}{B \cdot B}, 1\right) \cdot B} - \frac{x}{B} \]
                                      4. Applied rewrites43.0%

                                        \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B}} - \frac{x}{B} \]
                                    10. Recombined 3 regimes into one program.
                                    11. Final simplification52.0%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -65000000:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.55:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}}, F, -x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{x}{B}\\ \end{array} \]
                                    12. Add Preprocessing

                                    Alternative 17: 64.8% accurate, 2.7× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -0.07:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 28500:\\ \;\;\;\;\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 -0.07)
                                       (- (/ -1.0 (sin B)) (/ x B))
                                       (if (<= F 28500.0)
                                         (/ (- (/ 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 <= -0.07) {
                                    		tmp = (-1.0 / sin(B)) - (x / B);
                                    	} else if (F <= 28500.0) {
                                    		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 <= -0.07)
                                    		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
                                    	elseif (F <= 28500.0)
                                    		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, -0.07], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 28500.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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;F \leq -0.07:\\
                                    \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
                                    
                                    \mathbf{elif}\;F \leq 28500:\\
                                    \;\;\;\;\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 < -0.070000000000000007

                                      1. Initial program 55.6%

                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in B around 0

                                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      4. Step-by-step derivation
                                        1. lower-/.f6435.5

                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      5. Applied rewrites35.5%

                                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      6. Step-by-step derivation
                                        1. lift-+.f64N/A

                                          \[\leadsto \color{blue}{\left(-\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)}} \]
                                        2. +-commutativeN/A

                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                        3. lift-neg.f64N/A

                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                        4. unsub-negN/A

                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                        5. lower--.f6435.5

                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                      7. Applied rewrites51.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}{B}} \]
                                      8. Taylor expanded in F around -inf

                                        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
                                      9. Step-by-step derivation
                                        1. Applied rewrites78.5%

                                          \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]

                                        if -0.070000000000000007 < F < 28500

                                        1. Initial program 99.4%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in B around 0

                                          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                        4. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                          2. sub-negN/A

                                            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                          3. *-commutativeN/A

                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                          4. lower-fma.f64N/A

                                            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                          5. lower-sqrt.f64N/A

                                            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                          6. lower-/.f64N/A

                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                          7. associate-+r+N/A

                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                          8. +-commutativeN/A

                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                          9. unpow2N/A

                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                          10. lower-fma.f64N/A

                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                          11. +-commutativeN/A

                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                          12. lower-fma.f64N/A

                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                          13. lower-neg.f6459.5

                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                        5. Applied rewrites59.5%

                                          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                        6. Applied rewrites59.5%

                                          \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                                        if 28500 < F

                                        1. Initial program 62.3%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in B around 0

                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        4. Step-by-step derivation
                                          1. lower-/.f6435.7

                                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        5. Applied rewrites35.7%

                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        6. Step-by-step derivation
                                          1. lift-+.f64N/A

                                            \[\leadsto \color{blue}{\left(-\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)}} \]
                                          2. +-commutativeN/A

                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                          3. lift-neg.f64N/A

                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                          4. unsub-negN/A

                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                          5. lower--.f6435.7

                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                        7. Applied rewrites46.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}{B}} \]
                                        8. Taylor expanded in F around inf

                                          \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{B} \]
                                        9. Step-by-step derivation
                                          1. Applied rewrites72.5%

                                            \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{B} \]
                                        10. Recombined 3 regimes into one program.
                                        11. Add Preprocessing

                                        Alternative 18: 57.9% accurate, 2.8× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -0.07:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{+173}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{x}{B}\\ \end{array} \end{array} \]
                                        (FPCore (F B x)
                                         :precision binary64
                                         (if (<= F -0.07)
                                           (- (/ -1.0 (sin B)) (/ x B))
                                           (if (<= F 7.6e+173)
                                             (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
                                             (- (/ 1.0 (* (fma -0.16666666666666666 (* B B) 1.0) B)) (/ x B)))))
                                        double code(double F, double B, double x) {
                                        	double tmp;
                                        	if (F <= -0.07) {
                                        		tmp = (-1.0 / sin(B)) - (x / B);
                                        	} else if (F <= 7.6e+173) {
                                        		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
                                        	} else {
                                        		tmp = (1.0 / (fma(-0.16666666666666666, (B * B), 1.0) * B)) - (x / B);
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(F, B, x)
                                        	tmp = 0.0
                                        	if (F <= -0.07)
                                        		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
                                        	elseif (F <= 7.6e+173)
                                        		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B);
                                        	else
                                        		tmp = Float64(Float64(1.0 / Float64(fma(-0.16666666666666666, Float64(B * B), 1.0) * B)) - Float64(x / B));
                                        	end
                                        	return tmp
                                        end
                                        
                                        code[F_, B_, x_] := If[LessEqual[F, -0.07], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.6e+173], 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[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;F \leq -0.07:\\
                                        \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
                                        
                                        \mathbf{elif}\;F \leq 7.6 \cdot 10^{+173}:\\
                                        \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\frac{1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{x}{B}\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if F < -0.070000000000000007

                                          1. Initial program 55.6%

                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in B around 0

                                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                          4. Step-by-step derivation
                                            1. lower-/.f6435.5

                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                          5. Applied rewrites35.5%

                                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                          6. Step-by-step derivation
                                            1. lift-+.f64N/A

                                              \[\leadsto \color{blue}{\left(-\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)}} \]
                                            2. +-commutativeN/A

                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                            3. lift-neg.f64N/A

                                              \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                            4. unsub-negN/A

                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                            5. lower--.f6435.5

                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                          7. Applied rewrites51.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}{B}} \]
                                          8. Taylor expanded in F around -inf

                                            \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
                                          9. Step-by-step derivation
                                            1. Applied rewrites78.5%

                                              \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]

                                            if -0.070000000000000007 < F < 7.60000000000000022e173

                                            1. Initial program 94.3%

                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in B around 0

                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                            4. Step-by-step derivation
                                              1. lower-/.f64N/A

                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                              2. sub-negN/A

                                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                              3. *-commutativeN/A

                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                              4. lower-fma.f64N/A

                                                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                              5. lower-sqrt.f64N/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              6. lower-/.f64N/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              7. associate-+r+N/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              8. +-commutativeN/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              9. unpow2N/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              10. lower-fma.f64N/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              11. +-commutativeN/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              12. lower-fma.f64N/A

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                              13. lower-neg.f6453.7

                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                            5. Applied rewrites53.7%

                                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                            6. Applied rewrites53.7%

                                              \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                                            if 7.60000000000000022e173 < F

                                            1. Initial program 37.3%

                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in B around 0

                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                            4. Step-by-step derivation
                                              1. lower-/.f644.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. Applied rewrites4.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. Step-by-step derivation
                                              1. lift-+.f64N/A

                                                \[\leadsto \color{blue}{\left(-\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)}} \]
                                              2. +-commutativeN/A

                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                              3. lift-neg.f64N/A

                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                              4. unsub-negN/A

                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                              5. lower--.f644.8

                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                            7. Applied rewrites14.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}{B}} \]
                                            8. Taylor expanded in F around inf

                                              \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{B} \]
                                            9. Step-by-step derivation
                                              1. Applied rewrites65.8%

                                                \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{B} \]
                                              2. Taylor expanded in B around 0

                                                \[\leadsto \frac{1}{\color{blue}{B \cdot \left(1 + \frac{-1}{6} \cdot {B}^{2}\right)}} - \frac{x}{B} \]
                                              3. Step-by-step derivation
                                                1. *-commutativeN/A

                                                  \[\leadsto \frac{1}{\color{blue}{\left(1 + \frac{-1}{6} \cdot {B}^{2}\right) \cdot B}} - \frac{x}{B} \]
                                                2. lower-*.f64N/A

                                                  \[\leadsto \frac{1}{\color{blue}{\left(1 + \frac{-1}{6} \cdot {B}^{2}\right) \cdot B}} - \frac{x}{B} \]
                                                3. +-commutativeN/A

                                                  \[\leadsto \frac{1}{\color{blue}{\left(\frac{-1}{6} \cdot {B}^{2} + 1\right)} \cdot B} - \frac{x}{B} \]
                                                4. lower-fma.f64N/A

                                                  \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(\frac{-1}{6}, {B}^{2}, 1\right)} \cdot B} - \frac{x}{B} \]
                                                5. unpow2N/A

                                                  \[\leadsto \frac{1}{\mathsf{fma}\left(\frac{-1}{6}, \color{blue}{B \cdot B}, 1\right) \cdot B} - \frac{x}{B} \]
                                                6. lower-*.f6447.3

                                                  \[\leadsto \frac{1}{\mathsf{fma}\left(-0.16666666666666666, \color{blue}{B \cdot B}, 1\right) \cdot B} - \frac{x}{B} \]
                                              4. Applied rewrites47.3%

                                                \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B}} - \frac{x}{B} \]
                                            10. Recombined 3 regimes into one program.
                                            11. Add Preprocessing

                                            Alternative 19: 50.7% accurate, 6.1× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -0.07:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{0.5}{F}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F}, -1 - x\right)}{B}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{+173}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{x}{B}\\ \end{array} \end{array} \]
                                            (FPCore (F B x)
                                             :precision binary64
                                             (if (<= F -0.07)
                                               (/ (fma (/ 0.5 F) (/ (fma 2.0 x 2.0) F) (- -1.0 x)) B)
                                               (if (<= F 7.6e+173)
                                                 (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
                                                 (- (/ 1.0 (* (fma -0.16666666666666666 (* B B) 1.0) B)) (/ x B)))))
                                            double code(double F, double B, double x) {
                                            	double tmp;
                                            	if (F <= -0.07) {
                                            		tmp = fma((0.5 / F), (fma(2.0, x, 2.0) / F), (-1.0 - x)) / B;
                                            	} else if (F <= 7.6e+173) {
                                            		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
                                            	} else {
                                            		tmp = (1.0 / (fma(-0.16666666666666666, (B * B), 1.0) * B)) - (x / B);
                                            	}
                                            	return tmp;
                                            }
                                            
                                            function code(F, B, x)
                                            	tmp = 0.0
                                            	if (F <= -0.07)
                                            		tmp = Float64(fma(Float64(0.5 / F), Float64(fma(2.0, x, 2.0) / F), Float64(-1.0 - x)) / B);
                                            	elseif (F <= 7.6e+173)
                                            		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B);
                                            	else
                                            		tmp = Float64(Float64(1.0 / Float64(fma(-0.16666666666666666, Float64(B * B), 1.0) * B)) - Float64(x / B));
                                            	end
                                            	return tmp
                                            end
                                            
                                            code[F_, B_, x_] := If[LessEqual[F, -0.07], N[(N[(N[(0.5 / F), $MachinePrecision] * N[(N[(2.0 * x + 2.0), $MachinePrecision] / F), $MachinePrecision] + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.6e+173], 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[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;F \leq -0.07:\\
                                            \;\;\;\;\frac{\mathsf{fma}\left(\frac{0.5}{F}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F}, -1 - x\right)}{B}\\
                                            
                                            \mathbf{elif}\;F \leq 7.6 \cdot 10^{+173}:\\
                                            \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\frac{1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{x}{B}\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if F < -0.070000000000000007

                                              1. Initial program 55.6%

                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in B around 0

                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                              4. Step-by-step derivation
                                                1. lower-/.f64N/A

                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                2. sub-negN/A

                                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                3. *-commutativeN/A

                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                4. lower-fma.f64N/A

                                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                5. lower-sqrt.f64N/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                6. lower-/.f64N/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                7. associate-+r+N/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                8. +-commutativeN/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                9. unpow2N/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                10. lower-fma.f64N/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                11. +-commutativeN/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                12. lower-fma.f64N/A

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                13. lower-neg.f6439.9

                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                              5. Applied rewrites39.9%

                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                              6. Taylor expanded in F around -inf

                                                \[\leadsto \frac{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}{B} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites52.1%

                                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{0.5}{F}, \frac{\mathsf{fma}\left(2, x, 2\right)}{F}, -1 - x\right)}{B} \]

                                                if -0.070000000000000007 < F < 7.60000000000000022e173

                                                1. Initial program 94.3%

                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in B around 0

                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                4. Step-by-step derivation
                                                  1. lower-/.f64N/A

                                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                  2. sub-negN/A

                                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                  3. *-commutativeN/A

                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                  4. lower-fma.f64N/A

                                                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                  5. lower-sqrt.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  6. lower-/.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  7. associate-+r+N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  8. +-commutativeN/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  9. unpow2N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  10. lower-fma.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  11. +-commutativeN/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  12. lower-fma.f64N/A

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                  13. lower-neg.f6453.7

                                                    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                5. Applied rewrites53.7%

                                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                6. Applied rewrites53.7%

                                                  \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                                                if 7.60000000000000022e173 < F

                                                1. Initial program 37.3%

                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in B around 0

                                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                4. Step-by-step derivation
                                                  1. lower-/.f644.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. Applied rewrites4.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. Step-by-step derivation
                                                  1. lift-+.f64N/A

                                                    \[\leadsto \color{blue}{\left(-\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)}} \]
                                                  2. +-commutativeN/A

                                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                                  3. lift-neg.f64N/A

                                                    \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                                  4. unsub-negN/A

                                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                  5. lower--.f644.8

                                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                7. Applied rewrites14.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}{B}} \]
                                                8. Taylor expanded in F around inf

                                                  \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{B} \]
                                                9. Step-by-step derivation
                                                  1. Applied rewrites65.8%

                                                    \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{B} \]
                                                  2. Taylor expanded in B around 0

                                                    \[\leadsto \frac{1}{\color{blue}{B \cdot \left(1 + \frac{-1}{6} \cdot {B}^{2}\right)}} - \frac{x}{B} \]
                                                  3. Step-by-step derivation
                                                    1. *-commutativeN/A

                                                      \[\leadsto \frac{1}{\color{blue}{\left(1 + \frac{-1}{6} \cdot {B}^{2}\right) \cdot B}} - \frac{x}{B} \]
                                                    2. lower-*.f64N/A

                                                      \[\leadsto \frac{1}{\color{blue}{\left(1 + \frac{-1}{6} \cdot {B}^{2}\right) \cdot B}} - \frac{x}{B} \]
                                                    3. +-commutativeN/A

                                                      \[\leadsto \frac{1}{\color{blue}{\left(\frac{-1}{6} \cdot {B}^{2} + 1\right)} \cdot B} - \frac{x}{B} \]
                                                    4. lower-fma.f64N/A

                                                      \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(\frac{-1}{6}, {B}^{2}, 1\right)} \cdot B} - \frac{x}{B} \]
                                                    5. unpow2N/A

                                                      \[\leadsto \frac{1}{\mathsf{fma}\left(\frac{-1}{6}, \color{blue}{B \cdot B}, 1\right) \cdot B} - \frac{x}{B} \]
                                                    6. lower-*.f6447.3

                                                      \[\leadsto \frac{1}{\mathsf{fma}\left(-0.16666666666666666, \color{blue}{B \cdot B}, 1\right) \cdot B} - \frac{x}{B} \]
                                                  4. Applied rewrites47.3%

                                                    \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B}} - \frac{x}{B} \]
                                                10. Recombined 3 regimes into one program.
                                                11. Add Preprocessing

                                                Alternative 20: 50.5% accurate, 6.1× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -5.5 \cdot 10^{+160}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 7.6 \cdot 10^{+173}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{x}{B}\\ \end{array} \end{array} \]
                                                (FPCore (F B x)
                                                 :precision binary64
                                                 (if (<= F -5.5e+160)
                                                   (/ (- -1.0 x) B)
                                                   (if (<= F 7.6e+173)
                                                     (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
                                                     (- (/ 1.0 (* (fma -0.16666666666666666 (* B B) 1.0) B)) (/ x B)))))
                                                double code(double F, double B, double x) {
                                                	double tmp;
                                                	if (F <= -5.5e+160) {
                                                		tmp = (-1.0 - x) / B;
                                                	} else if (F <= 7.6e+173) {
                                                		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
                                                	} else {
                                                		tmp = (1.0 / (fma(-0.16666666666666666, (B * B), 1.0) * B)) - (x / B);
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(F, B, x)
                                                	tmp = 0.0
                                                	if (F <= -5.5e+160)
                                                		tmp = Float64(Float64(-1.0 - x) / B);
                                                	elseif (F <= 7.6e+173)
                                                		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B);
                                                	else
                                                		tmp = Float64(Float64(1.0 / Float64(fma(-0.16666666666666666, Float64(B * B), 1.0) * B)) - Float64(x / B));
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[F_, B_, x_] := If[LessEqual[F, -5.5e+160], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.6e+173], 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[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;F \leq -5.5 \cdot 10^{+160}:\\
                                                \;\;\;\;\frac{-1 - x}{B}\\
                                                
                                                \mathbf{elif}\;F \leq 7.6 \cdot 10^{+173}:\\
                                                \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\frac{1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{x}{B}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 3 regimes
                                                2. if F < -5.5e160

                                                  1. Initial program 25.4%

                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                  2. Add Preprocessing
                                                  3. Taylor expanded in B around 0

                                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                  4. Step-by-step derivation
                                                    1. lower-/.f64N/A

                                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                    2. sub-negN/A

                                                      \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                    3. *-commutativeN/A

                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                    4. lower-fma.f64N/A

                                                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                    5. lower-sqrt.f64N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    6. lower-/.f64N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    7. associate-+r+N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    8. +-commutativeN/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    9. unpow2N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    10. lower-fma.f64N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    11. +-commutativeN/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    12. lower-fma.f64N/A

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                    13. lower-neg.f6433.5

                                                      \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                  5. Applied rewrites33.5%

                                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                  6. Taylor expanded in F around -inf

                                                    \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites57.5%

                                                      \[\leadsto \frac{-1 - x}{B} \]

                                                    if -5.5e160 < F < 7.60000000000000022e173

                                                    1. Initial program 92.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. lower-/.f64N/A

                                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                      2. sub-negN/A

                                                        \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                      3. *-commutativeN/A

                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                      4. lower-fma.f64N/A

                                                        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                      5. lower-sqrt.f64N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      6. lower-/.f64N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      7. associate-+r+N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      8. +-commutativeN/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      9. unpow2N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      10. lower-fma.f64N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      11. +-commutativeN/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      12. lower-fma.f64N/A

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                      13. lower-neg.f6452.3

                                                        \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                    5. Applied rewrites52.3%

                                                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                    6. Applied rewrites52.3%

                                                      \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                                                    if 7.60000000000000022e173 < F

                                                    1. Initial program 37.3%

                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                    2. Add Preprocessing
                                                    3. Taylor expanded in B around 0

                                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                    4. Step-by-step derivation
                                                      1. lower-/.f644.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. Applied rewrites4.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. Step-by-step derivation
                                                      1. lift-+.f64N/A

                                                        \[\leadsto \color{blue}{\left(-\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)}} \]
                                                      2. +-commutativeN/A

                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                                      3. lift-neg.f64N/A

                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                                      4. unsub-negN/A

                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                      5. lower--.f644.8

                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                    7. Applied rewrites14.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}{B}} \]
                                                    8. Taylor expanded in F around inf

                                                      \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{B} \]
                                                    9. Step-by-step derivation
                                                      1. Applied rewrites65.8%

                                                        \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{B} \]
                                                      2. Taylor expanded in B around 0

                                                        \[\leadsto \frac{1}{\color{blue}{B \cdot \left(1 + \frac{-1}{6} \cdot {B}^{2}\right)}} - \frac{x}{B} \]
                                                      3. Step-by-step derivation
                                                        1. *-commutativeN/A

                                                          \[\leadsto \frac{1}{\color{blue}{\left(1 + \frac{-1}{6} \cdot {B}^{2}\right) \cdot B}} - \frac{x}{B} \]
                                                        2. lower-*.f64N/A

                                                          \[\leadsto \frac{1}{\color{blue}{\left(1 + \frac{-1}{6} \cdot {B}^{2}\right) \cdot B}} - \frac{x}{B} \]
                                                        3. +-commutativeN/A

                                                          \[\leadsto \frac{1}{\color{blue}{\left(\frac{-1}{6} \cdot {B}^{2} + 1\right)} \cdot B} - \frac{x}{B} \]
                                                        4. lower-fma.f64N/A

                                                          \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(\frac{-1}{6}, {B}^{2}, 1\right)} \cdot B} - \frac{x}{B} \]
                                                        5. unpow2N/A

                                                          \[\leadsto \frac{1}{\mathsf{fma}\left(\frac{-1}{6}, \color{blue}{B \cdot B}, 1\right) \cdot B} - \frac{x}{B} \]
                                                        6. lower-*.f6447.3

                                                          \[\leadsto \frac{1}{\mathsf{fma}\left(-0.16666666666666666, \color{blue}{B \cdot B}, 1\right) \cdot B} - \frac{x}{B} \]
                                                      4. Applied rewrites47.3%

                                                        \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B}} - \frac{x}{B} \]
                                                    10. Recombined 3 regimes into one program.
                                                    11. Add Preprocessing

                                                    Alternative 21: 43.8% accurate, 13.6× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.96 \cdot 10^{-47}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{-27}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                    (FPCore (F B x)
                                                     :precision binary64
                                                     (if (<= F -1.96e-47)
                                                       (/ (- -1.0 x) B)
                                                       (if (<= F 9.5e-27) (/ (- x) B) (/ (- 1.0 x) B))))
                                                    double code(double F, double B, double x) {
                                                    	double tmp;
                                                    	if (F <= -1.96e-47) {
                                                    		tmp = (-1.0 - x) / B;
                                                    	} else if (F <= 9.5e-27) {
                                                    		tmp = -x / B;
                                                    	} else {
                                                    		tmp = (1.0 - x) / B;
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    real(8) function code(f, b, x)
                                                        real(8), intent (in) :: f
                                                        real(8), intent (in) :: b
                                                        real(8), intent (in) :: x
                                                        real(8) :: tmp
                                                        if (f <= (-1.96d-47)) then
                                                            tmp = ((-1.0d0) - x) / b
                                                        else if (f <= 9.5d-27) then
                                                            tmp = -x / b
                                                        else
                                                            tmp = (1.0d0 - x) / b
                                                        end if
                                                        code = tmp
                                                    end function
                                                    
                                                    public static double code(double F, double B, double x) {
                                                    	double tmp;
                                                    	if (F <= -1.96e-47) {
                                                    		tmp = (-1.0 - x) / B;
                                                    	} else if (F <= 9.5e-27) {
                                                    		tmp = -x / B;
                                                    	} else {
                                                    		tmp = (1.0 - x) / B;
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    def code(F, B, x):
                                                    	tmp = 0
                                                    	if F <= -1.96e-47:
                                                    		tmp = (-1.0 - x) / B
                                                    	elif F <= 9.5e-27:
                                                    		tmp = -x / B
                                                    	else:
                                                    		tmp = (1.0 - x) / B
                                                    	return tmp
                                                    
                                                    function code(F, B, x)
                                                    	tmp = 0.0
                                                    	if (F <= -1.96e-47)
                                                    		tmp = Float64(Float64(-1.0 - x) / B);
                                                    	elseif (F <= 9.5e-27)
                                                    		tmp = Float64(Float64(-x) / B);
                                                    	else
                                                    		tmp = Float64(Float64(1.0 - x) / B);
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    function tmp_2 = code(F, B, x)
                                                    	tmp = 0.0;
                                                    	if (F <= -1.96e-47)
                                                    		tmp = (-1.0 - x) / B;
                                                    	elseif (F <= 9.5e-27)
                                                    		tmp = -x / B;
                                                    	else
                                                    		tmp = (1.0 - x) / B;
                                                    	end
                                                    	tmp_2 = tmp;
                                                    end
                                                    
                                                    code[F_, B_, x_] := If[LessEqual[F, -1.96e-47], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 9.5e-27], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    \mathbf{if}\;F \leq -1.96 \cdot 10^{-47}:\\
                                                    \;\;\;\;\frac{-1 - x}{B}\\
                                                    
                                                    \mathbf{elif}\;F \leq 9.5 \cdot 10^{-27}:\\
                                                    \;\;\;\;\frac{-x}{B}\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\frac{1 - x}{B}\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 3 regimes
                                                    2. if F < -1.9600000000000001e-47

                                                      1. Initial program 60.9%

                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in B around 0

                                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                      4. Step-by-step derivation
                                                        1. lower-/.f64N/A

                                                          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                        2. sub-negN/A

                                                          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                        3. *-commutativeN/A

                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                        4. lower-fma.f64N/A

                                                          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                        5. lower-sqrt.f64N/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        6. lower-/.f64N/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        7. associate-+r+N/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        8. +-commutativeN/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        9. unpow2N/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        10. lower-fma.f64N/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        11. +-commutativeN/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        12. lower-fma.f64N/A

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                        13. lower-neg.f6441.2

                                                          \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                      5. Applied rewrites41.2%

                                                        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                      6. Taylor expanded in F around -inf

                                                        \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                      7. Step-by-step derivation
                                                        1. Applied rewrites47.6%

                                                          \[\leadsto \frac{-1 - x}{B} \]

                                                        if -1.9600000000000001e-47 < F < 9.50000000000000037e-27

                                                        1. Initial program 99.4%

                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                        2. Add Preprocessing
                                                        3. Taylor expanded in B around 0

                                                          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                        4. Step-by-step derivation
                                                          1. lower-/.f64N/A

                                                            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                          2. sub-negN/A

                                                            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                          3. *-commutativeN/A

                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                          4. lower-fma.f64N/A

                                                            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                          5. lower-sqrt.f64N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          6. lower-/.f64N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          7. associate-+r+N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          8. +-commutativeN/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          9. unpow2N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          10. lower-fma.f64N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          11. +-commutativeN/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          12. lower-fma.f64N/A

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                          13. lower-neg.f6459.7

                                                            \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                        5. Applied rewrites59.7%

                                                          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                        6. Taylor expanded in F around 0

                                                          \[\leadsto \frac{-1 \cdot x}{B} \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites41.2%

                                                            \[\leadsto \frac{-x}{B} \]

                                                          if 9.50000000000000037e-27 < F

                                                          1. Initial program 64.2%

                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in B around 0

                                                            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                          4. Step-by-step derivation
                                                            1. lower-/.f64N/A

                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                            2. sub-negN/A

                                                              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                            3. *-commutativeN/A

                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                            4. lower-fma.f64N/A

                                                              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                            5. lower-sqrt.f64N/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            6. lower-/.f64N/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            7. associate-+r+N/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            8. +-commutativeN/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            9. unpow2N/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            10. lower-fma.f64N/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            11. +-commutativeN/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            12. lower-fma.f64N/A

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                            13. lower-neg.f6431.0

                                                              \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                          5. Applied rewrites31.0%

                                                            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                          6. Taylor expanded in F around inf

                                                            \[\leadsto \frac{1 - x}{B} \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites42.8%

                                                              \[\leadsto \frac{1 - x}{B} \]
                                                          8. Recombined 3 regimes into one program.
                                                          9. Add Preprocessing

                                                          Alternative 22: 36.3% accurate, 17.5× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.96 \cdot 10^{-47}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \end{array} \]
                                                          (FPCore (F B x)
                                                           :precision binary64
                                                           (if (<= F -1.96e-47) (/ (- -1.0 x) B) (/ (- x) B)))
                                                          double code(double F, double B, double x) {
                                                          	double tmp;
                                                          	if (F <= -1.96e-47) {
                                                          		tmp = (-1.0 - x) / B;
                                                          	} else {
                                                          		tmp = -x / B;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          real(8) function code(f, b, x)
                                                              real(8), intent (in) :: f
                                                              real(8), intent (in) :: b
                                                              real(8), intent (in) :: x
                                                              real(8) :: tmp
                                                              if (f <= (-1.96d-47)) then
                                                                  tmp = ((-1.0d0) - x) / b
                                                              else
                                                                  tmp = -x / b
                                                              end if
                                                              code = tmp
                                                          end function
                                                          
                                                          public static double code(double F, double B, double x) {
                                                          	double tmp;
                                                          	if (F <= -1.96e-47) {
                                                          		tmp = (-1.0 - x) / B;
                                                          	} else {
                                                          		tmp = -x / B;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(F, B, x):
                                                          	tmp = 0
                                                          	if F <= -1.96e-47:
                                                          		tmp = (-1.0 - x) / B
                                                          	else:
                                                          		tmp = -x / B
                                                          	return tmp
                                                          
                                                          function code(F, B, x)
                                                          	tmp = 0.0
                                                          	if (F <= -1.96e-47)
                                                          		tmp = Float64(Float64(-1.0 - x) / B);
                                                          	else
                                                          		tmp = Float64(Float64(-x) / B);
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(F, B, x)
                                                          	tmp = 0.0;
                                                          	if (F <= -1.96e-47)
                                                          		tmp = (-1.0 - x) / B;
                                                          	else
                                                          		tmp = -x / B;
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[F_, B_, x_] := If[LessEqual[F, -1.96e-47], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          \mathbf{if}\;F \leq -1.96 \cdot 10^{-47}:\\
                                                          \;\;\;\;\frac{-1 - x}{B}\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\frac{-x}{B}\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if F < -1.9600000000000001e-47

                                                            1. Initial program 60.9%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Add Preprocessing
                                                            3. Taylor expanded in B around 0

                                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                            4. Step-by-step derivation
                                                              1. lower-/.f64N/A

                                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                              2. sub-negN/A

                                                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                              3. *-commutativeN/A

                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                              4. lower-fma.f64N/A

                                                                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                              5. lower-sqrt.f64N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              6. lower-/.f64N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              7. associate-+r+N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              8. +-commutativeN/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              9. unpow2N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              10. lower-fma.f64N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              11. +-commutativeN/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              12. lower-fma.f64N/A

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                              13. lower-neg.f6441.2

                                                                \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                            5. Applied rewrites41.2%

                                                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                            6. Taylor expanded in F around -inf

                                                              \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites47.6%

                                                                \[\leadsto \frac{-1 - x}{B} \]

                                                              if -1.9600000000000001e-47 < F

                                                              1. Initial program 83.1%

                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              2. Add Preprocessing
                                                              3. Taylor expanded in B around 0

                                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                              4. Step-by-step derivation
                                                                1. lower-/.f64N/A

                                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                2. sub-negN/A

                                                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                3. *-commutativeN/A

                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                4. lower-fma.f64N/A

                                                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                5. lower-sqrt.f64N/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                6. lower-/.f64N/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                7. associate-+r+N/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                8. +-commutativeN/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                9. unpow2N/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                10. lower-fma.f64N/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                11. +-commutativeN/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                12. lower-fma.f64N/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                13. lower-neg.f6446.4

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                              5. Applied rewrites46.4%

                                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                              6. Taylor expanded in F around 0

                                                                \[\leadsto \frac{-1 \cdot x}{B} \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites32.5%

                                                                  \[\leadsto \frac{-x}{B} \]
                                                              8. Recombined 2 regimes into one program.
                                                              9. Add Preprocessing

                                                              Alternative 23: 29.5% accurate, 26.3× speedup?

                                                              \[\begin{array}{l} \\ \frac{-x}{B} \end{array} \]
                                                              (FPCore (F B x) :precision binary64 (/ (- x) B))
                                                              double code(double F, double B, double x) {
                                                              	return -x / B;
                                                              }
                                                              
                                                              real(8) function code(f, b, x)
                                                                  real(8), intent (in) :: f
                                                                  real(8), intent (in) :: b
                                                                  real(8), intent (in) :: x
                                                                  code = -x / b
                                                              end function
                                                              
                                                              public static double code(double F, double B, double x) {
                                                              	return -x / B;
                                                              }
                                                              
                                                              def code(F, B, x):
                                                              	return -x / B
                                                              
                                                              function code(F, B, x)
                                                              	return Float64(Float64(-x) / B)
                                                              end
                                                              
                                                              function tmp = code(F, B, x)
                                                              	tmp = -x / B;
                                                              end
                                                              
                                                              code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \frac{-x}{B}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Initial program 75.9%

                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              2. Add Preprocessing
                                                              3. Taylor expanded in B around 0

                                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                              4. Step-by-step derivation
                                                                1. lower-/.f64N/A

                                                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                                2. sub-negN/A

                                                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + \left(\mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                3. *-commutativeN/A

                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                                4. lower-fma.f64N/A

                                                                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}}{B} \]
                                                                5. lower-sqrt.f64N/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                6. lower-/.f64N/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                7. associate-+r+N/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                8. +-commutativeN/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                9. unpow2N/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                10. lower-fma.f64N/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                11. +-commutativeN/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                12. lower-fma.f64N/A

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}}, F, \mathsf{neg}\left(x\right)\right)}{B} \]
                                                                13. lower-neg.f6444.7

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, \color{blue}{-x}\right)}{B} \]
                                                              5. Applied rewrites44.7%

                                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{B}} \]
                                                              6. Taylor expanded in F around 0

                                                                \[\leadsto \frac{-1 \cdot x}{B} \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites31.2%

                                                                  \[\leadsto \frac{-x}{B} \]
                                                                2. Add Preprocessing

                                                                Reproduce

                                                                ?
                                                                herbie shell --seed 2024304 
                                                                (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))))))