VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.1% → 99.6%
Time: 12.0s
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)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(f, b, x)
use fmin_fmax_functions
    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.1% 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)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(f, b, x)
use fmin_fmax_functions
    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, 1.0× speedup?

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

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

\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.40000000000000009e43

    1. Initial program 54.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 F around -inf

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{\mathsf{fma}\left(\cos B, x, 1\right)}}{\sin B} \]
      9. lower-cos.f64N/A

        \[\leadsto \frac{-\mathsf{fma}\left(\color{blue}{\cos B}, x, 1\right)}{\sin B} \]
      10. lower-sin.f6499.8

        \[\leadsto \frac{-\mathsf{fma}\left(\cos B, x, 1\right)}{\color{blue}{\sin B}} \]
    5. Applied rewrites99.8%

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

    if -1.40000000000000009e43 < F < 35000

    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. associate-*l/N/A

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

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

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

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

    if 35000 < F

    1. Initial program 52.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 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.4 \cdot 10^{+43}:\\ \;\;\;\;\frac{-\mathsf{fma}\left(\cos B, x, 1\right)}{\sin B}\\ \mathbf{elif}\;F \leq 35000:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \frac{-x}{\tan B}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + {\sin B}^{-1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 99.6% accurate, 1.0× speedup?

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

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

\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 < -5e50

    1. Initial program 54.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 F around -inf

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{\mathsf{fma}\left(\cos B, x, 1\right)}}{\sin B} \]
      9. lower-cos.f64N/A

        \[\leadsto \frac{-\mathsf{fma}\left(\color{blue}{\cos B}, x, 1\right)}{\sin B} \]
      10. lower-sin.f6499.8

        \[\leadsto \frac{-\mathsf{fma}\left(\cos B, x, 1\right)}{\color{blue}{\sin B}} \]
    5. Applied rewrites99.8%

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

    if -5e50 < F < 35000

    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. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 35000 < F

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

Alternative 3: 99.0% accurate, 1.0× speedup?

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

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

\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 < -4.29999999999999989e-4

    1. Initial program 58.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 F around -inf

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{\mathsf{fma}\left(\cos B, x, 1\right)}}{\sin B} \]
      9. lower-cos.f64N/A

        \[\leadsto \frac{-\mathsf{fma}\left(\color{blue}{\cos B}, x, 1\right)}{\sin B} \]
      10. lower-sin.f6499.8

        \[\leadsto \frac{-\mathsf{fma}\left(\cos B, x, 1\right)}{\color{blue}{\sin B}} \]
    5. Applied rewrites99.8%

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

    if -4.29999999999999989e-4 < F < 1.69999999999999996

    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. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.69999999999999996 < F

      1. Initial program 53.3%

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

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

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

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

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

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

    Alternative 4: 92.0% accurate, 1.1× speedup?

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

      1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{-\color{blue}{\mathsf{fma}\left(\cos B, x, 1\right)}}{\sin B} \]
        9. lower-cos.f64N/A

          \[\leadsto \frac{-\mathsf{fma}\left(\color{blue}{\cos B}, x, 1\right)}{\sin B} \]
        10. lower-sin.f6498.2

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

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

      if -3.59999999999999995e-17 < F < 5.70000000000000014e-121

      1. Initial program 99.5%

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

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

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

          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
        4. 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. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.70000000000000014e-121 < F < 3e4

      1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}\right) \]
        9. lift-/.f6484.4

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

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

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

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

      if 3e4 < F

      1. Initial program 52.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 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 4 regimes into one program.
    4. Final simplification93.2%

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

    Alternative 5: 78.8% accurate, 1.3× speedup?

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

      1. Initial program 52.0%

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

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

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

          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
        4. 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. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\sin B \cdot F}, \frac{-x}{\mathsf{fma}\left(0.3333333333333333, \color{blue}{B \cdot B}, 1\right) \cdot B}\right) \]
      10. Applied rewrites79.1%

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

      if -7.49999999999999995e52 < F < 5.70000000000000014e-121

      1. Initial program 98.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. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.70000000000000014e-121 < F < 7.19999999999999967e48

      1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 7.19999999999999967e48 < F

      1. Initial program 48.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. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 85.0% accurate, 1.4× speedup?

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

      1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{-\color{blue}{\mathsf{fma}\left(\cos B, x, 1\right)}}{\sin B} \]
        9. lower-cos.f64N/A

          \[\leadsto \frac{-\mathsf{fma}\left(\color{blue}{\cos B}, x, 1\right)}{\sin B} \]
        10. lower-sin.f6498.2

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

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

      if -3.59999999999999995e-17 < F < 5.70000000000000014e-121

      1. Initial program 99.5%

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

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

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

          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
        4. 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. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.70000000000000014e-121 < F < 1.15000000000000001e49

      1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{F \cdot \frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} + \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}} \]
      11. Applied rewrites82.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}{\mathsf{fma}\left(B \cdot B, 0.3333333333333333, 1\right) \cdot B}} \]

      if 1.15000000000000001e49 < F

      1. Initial program 47.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. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 78.7% accurate, 1.4× speedup?

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

      1. Initial program 52.0%

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

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

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

          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
        4. 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. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\sin B \cdot F}, \frac{-x}{\mathsf{fma}\left(0.3333333333333333, \color{blue}{B \cdot B}, 1\right) \cdot B}\right) \]
      10. Applied rewrites79.1%

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

      if -7.49999999999999995e52 < F < 5.70000000000000014e-121

      1. Initial program 98.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. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.70000000000000014e-121 < F < 1.15000000000000001e49

      1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{F \cdot \frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} + \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}} \]
      11. Applied rewrites82.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}{\mathsf{fma}\left(B \cdot B, 0.3333333333333333, 1\right) \cdot B}} \]

      if 1.15000000000000001e49 < F

      1. Initial program 47.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. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 68.9% accurate, 1.4× speedup?

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

      1. Initial program 74.7%

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\color{blue}{\sin B \cdot F}}, \frac{-x}{\tan B}\right) \]
        4. lower-sin.f6452.3

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

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

        \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\left(B \cdot \left(1 + \frac{-1}{6} \cdot {B}^{2}\right)\right) \cdot F}, \frac{-x}{\tan B}\right) \]
      9. Step-by-step derivation
        1. Applied rewrites64.8%

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

        if -1.0000000000000001e-114 < x < 8.5000000000000006e-114

        1. Initial program 78.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 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.3

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

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

        if 8.5000000000000006e-114 < x < 1.1499999999999999e-58

        1. Initial program 26.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. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.1499999999999999e-58 < x

        1. Initial program 79.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 9: 92.0% accurate, 1.4× speedup?

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

            1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{-\color{blue}{\mathsf{fma}\left(\cos B, x, 1\right)}}{\sin B} \]
              9. lower-cos.f64N/A

                \[\leadsto \frac{-\mathsf{fma}\left(\color{blue}{\cos B}, x, 1\right)}{\sin B} \]
              10. lower-sin.f6498.2

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

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

            if -3.59999999999999995e-17 < F < 5.70000000000000014e-121

            1. Initial program 99.5%

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

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

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

                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              4. 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. associate-*l/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{F \cdot F + \color{blue}{\left(2 \cdot x + 2\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              20. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{F \cdot F + \left(\color{blue}{2 \cdot x} + 2\right)}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              21. associate-+r+N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{\left(F \cdot F + 2 \cdot x\right) + 2}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              22. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{\left(2 \cdot x + F \cdot F\right)} + 2}}}{\sin B}, \frac{-x}{\tan B}\right) \]
            6. Applied rewrites99.7%

              \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
            7. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}}, \frac{-x}{\tan B}\right) \]
              2. lift-/.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              3. associate-/l/N/A

                \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
              4. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
              5. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}, \frac{-x}{\tan B}\right) \]
              6. lower-*.f6499.7

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}, \frac{-x}{\tan B}\right) \]
              7. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)}}, \frac{-x}{\tan B}\right) \]
              8. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sin B \cdot \sqrt{\color{blue}{x \cdot 2 + \left(F \cdot F + 2\right)}}}, \frac{-x}{\tan B}\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sin B \cdot \sqrt{\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)}}, \frac{-x}{\tan B}\right) \]
              10. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sin B \cdot \sqrt{\color{blue}{\mathsf{fma}\left(2, x, F \cdot F + 2\right)}}}, \frac{-x}{\tan B}\right) \]
              11. lift-fma.f6499.7

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \frac{-x}{\tan B}\right) \]
            8. Applied rewrites99.7%

              \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}, \frac{-x}{\tan B}\right) \]
            9. Taylor expanded in B around 0

              \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{B \cdot \sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \frac{-x}{\tan B}\right) \]
            10. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)} \cdot B}}, \frac{-x}{\tan B}\right) \]
              2. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)} \cdot B}}, \frac{-x}{\tan B}\right) \]
              3. lower-sqrt.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot B}, \frac{-x}{\tan B}\right) \]
              4. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sqrt{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}} \cdot B}, \frac{-x}{\tan B}\right) \]
              5. lower-+.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sqrt{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}} \cdot B}, \frac{-x}{\tan B}\right) \]
              6. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sqrt{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2} \cdot B}, \frac{-x}{\tan B}\right) \]
              7. unpow2N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sqrt{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2} \cdot B}, \frac{-x}{\tan B}\right) \]
              8. lower-*.f6486.8

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sqrt{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2} \cdot B}, \frac{-x}{\tan B}\right) \]
            11. Applied rewrites86.8%

              \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sqrt{\mathsf{fma}\left(2, x, F \cdot F\right) + 2} \cdot B}}, \frac{-x}{\tan B}\right) \]

            if 5.70000000000000014e-121 < F < 3e4

            1. Initial program 99.2%

              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
            2. Add Preprocessing
            3. 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. associate-*l/N/A

                \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              6. associate-/l*N/A

                \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              7. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, -x \cdot \frac{1}{\tan B}\right)} \]
            4. Applied rewrites99.4%

              \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \frac{-x}{\tan B}\right)} \]
            5. Step-by-step derivation
              1. lift-pow.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              2. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              3. sqrt-pow2N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{{\left(\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}\right)}^{-1}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              4. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              5. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{2 \cdot x} + \mathsf{fma}\left(F, F, 2\right)}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              6. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right) + 2 \cdot x}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              7. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              8. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              9. associate-+l+N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{F \cdot F + \left(2 + 2 \cdot x\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              10. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{F \cdot F + \color{blue}{\left(2 \cdot x + 2\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              11. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{F \cdot F} + \left(2 \cdot x + 2\right)}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              12. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{F \cdot F + \left(\color{blue}{2 \cdot x} + 2\right)}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              13. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{F \cdot F + \color{blue}{\mathsf{fma}\left(2, x, 2\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              14. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              15. inv-powN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              16. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              17. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{F \cdot F + \mathsf{fma}\left(2, x, 2\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              18. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{F \cdot F} + \mathsf{fma}\left(2, x, 2\right)}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              19. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{F \cdot F + \color{blue}{\left(2 \cdot x + 2\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              20. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{F \cdot F + \left(\color{blue}{2 \cdot x} + 2\right)}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              21. associate-+r+N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{\left(F \cdot F + 2 \cdot x\right) + 2}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              22. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{\left(2 \cdot x + F \cdot F\right)} + 2}}}{\sin B}, \frac{-x}{\tan B}\right) \]
            6. Applied rewrites99.1%

              \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
            7. Taylor expanded in B around 0

              \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\color{blue}{B \cdot \left(1 + \frac{1}{3} \cdot {B}^{2}\right)}}\right) \]
            8. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\color{blue}{\left(1 + \frac{1}{3} \cdot {B}^{2}\right) \cdot B}}\right) \]
              2. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\color{blue}{\left(1 + \frac{1}{3} \cdot {B}^{2}\right) \cdot B}}\right) \]
              3. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\color{blue}{\left(\frac{1}{3} \cdot {B}^{2} + 1\right)} \cdot B}\right) \]
              4. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\color{blue}{\mathsf{fma}\left(\frac{1}{3}, {B}^{2}, 1\right)} \cdot B}\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, 1\right) \cdot B}\right) \]
              6. lower-*.f6484.2

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\mathsf{fma}\left(0.3333333333333333, \color{blue}{B \cdot B}, 1\right) \cdot B}\right) \]
            9. Applied rewrites84.2%

              \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\color{blue}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B}}\right) \]
            10. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}\right) \]
              2. lift-/.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}\right) \]
              3. associate-/l/N/A

                \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot \sin B}}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}\right) \]
              4. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sqrt{\color{blue}{x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)}} \cdot \sin B}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}\right) \]
              5. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sqrt{\color{blue}{2 \cdot x} + \mathsf{fma}\left(F, F, 2\right)} \cdot \sin B}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}\right) \]
              6. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sqrt{\color{blue}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \sin B}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}\right) \]
              8. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}\right) \]
              9. lift-/.f6484.4

                \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}, \frac{-x}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B}\right) \]
              10. lower-fma.f64N/A

                \[\leadsto \color{blue}{F \cdot \frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} + \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}} \]
              11. lower-+.f64N/A

                \[\leadsto \color{blue}{F \cdot \frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} + \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}} \]
            11. Applied rewrites84.5%

              \[\leadsto \color{blue}{\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} + \frac{-x}{\mathsf{fma}\left(B \cdot B, 0.3333333333333333, 1\right) \cdot B}} \]

            if 3e4 < F

            1. Initial program 52.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. associate-*l/N/A

                \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              6. associate-/l*N/A

                \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              7. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, -x \cdot \frac{1}{\tan B}\right)} \]
            4. Applied rewrites67.3%

              \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \frac{-x}{\tan B}\right)} \]
            5. Taylor expanded in F around inf

              \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B} + \frac{1}{\sin B}} \]
            6. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} + \frac{1}{\sin B} \]
              2. div-add-revN/A

                \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right) + 1}{\sin B}} \]
              3. lower-/.f64N/A

                \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right) + 1}{\sin B}} \]
              4. lower-fma.f64N/A

                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-1, x \cdot \cos B, 1\right)}}{\sin B} \]
              5. *-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(-1, \color{blue}{\cos B \cdot x}, 1\right)}{\sin B} \]
              6. lower-*.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(-1, \color{blue}{\cos B \cdot x}, 1\right)}{\sin B} \]
              7. lower-cos.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(-1, \color{blue}{\cos B} \cdot x, 1\right)}{\sin B} \]
              8. lower-sin.f6499.7

                \[\leadsto \frac{\mathsf{fma}\left(-1, \cos B \cdot x, 1\right)}{\color{blue}{\sin B}} \]
            7. Applied rewrites99.7%

              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-1, \cos B \cdot x, 1\right)}{\sin B}} \]
          3. Recombined 4 regimes into one program.
          4. Final simplification93.2%

            \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.6 \cdot 10^{-17}:\\ \;\;\;\;\frac{-\mathsf{fma}\left(\cos B, x, 1\right)}{\sin B}\\ \mathbf{elif}\;F \leq 5.7 \cdot 10^{-121}:\\ \;\;\;\;\mathsf{fma}\left(F, {\left(\sqrt{\mathsf{fma}\left(2, x, F \cdot F\right) + 2} \cdot B\right)}^{-1}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 30000:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{\mathsf{fma}\left(B \cdot B, 0.3333333333333333, 1\right) \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-1, \cos B \cdot x, 1\right)}{\sin B}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 10: 78.1% accurate, 1.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-x}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B}\\ \mathbf{if}\;F \leq -7.5 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{\sin B \cdot F}, t\_0\right)\\ \mathbf{elif}\;F \leq 10000000:\\ \;\;\;\;\mathsf{fma}\left(F, {\left(\sqrt{\mathsf{fma}\left(2, x, F \cdot F\right) + 2} \cdot B\right)}^{-1}, \frac{-x}{\tan B}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{{F}^{-1}}{\sin B}, t\_0\right)\\ \end{array} \end{array} \]
          (FPCore (F B x)
           :precision binary64
           (let* ((t_0 (/ (- x) (* (fma 0.3333333333333333 (* B B) 1.0) B))))
             (if (<= F -7.5e+52)
               (fma F (/ -1.0 (* (sin B) F)) t_0)
               (if (<= F 10000000.0)
                 (fma
                  F
                  (pow (* (sqrt (+ (fma 2.0 x (* F F)) 2.0)) B) -1.0)
                  (/ (- x) (tan B)))
                 (fma F (/ (pow F -1.0) (sin B)) t_0)))))
          double code(double F, double B, double x) {
          	double t_0 = -x / (fma(0.3333333333333333, (B * B), 1.0) * B);
          	double tmp;
          	if (F <= -7.5e+52) {
          		tmp = fma(F, (-1.0 / (sin(B) * F)), t_0);
          	} else if (F <= 10000000.0) {
          		tmp = fma(F, pow((sqrt((fma(2.0, x, (F * F)) + 2.0)) * B), -1.0), (-x / tan(B)));
          	} else {
          		tmp = fma(F, (pow(F, -1.0) / sin(B)), t_0);
          	}
          	return tmp;
          }
          
          function code(F, B, x)
          	t_0 = Float64(Float64(-x) / Float64(fma(0.3333333333333333, Float64(B * B), 1.0) * B))
          	tmp = 0.0
          	if (F <= -7.5e+52)
          		tmp = fma(F, Float64(-1.0 / Float64(sin(B) * F)), t_0);
          	elseif (F <= 10000000.0)
          		tmp = fma(F, (Float64(sqrt(Float64(fma(2.0, x, Float64(F * F)) + 2.0)) * B) ^ -1.0), Float64(Float64(-x) / tan(B)));
          	else
          		tmp = fma(F, Float64((F ^ -1.0) / sin(B)), t_0);
          	end
          	return tmp
          end
          
          code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[(N[(0.3333333333333333 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.5e+52], N[(F * N[(-1.0 / N[(N[Sin[B], $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[F, 10000000.0], N[(F * N[Power[N[(N[Sqrt[N[(N[(2.0 * x + N[(F * F), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]], $MachinePrecision] * B), $MachinePrecision], -1.0], $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(F * N[(N[Power[F, -1.0], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \frac{-x}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B}\\
          \mathbf{if}\;F \leq -7.5 \cdot 10^{+52}:\\
          \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{\sin B \cdot F}, t\_0\right)\\
          
          \mathbf{elif}\;F \leq 10000000:\\
          \;\;\;\;\mathsf{fma}\left(F, {\left(\sqrt{\mathsf{fma}\left(2, x, F \cdot F\right) + 2} \cdot B\right)}^{-1}, \frac{-x}{\tan B}\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(F, \frac{{F}^{-1}}{\sin B}, t\_0\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if F < -7.49999999999999995e52

            1. Initial program 52.0%

              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
              2. +-commutativeN/A

                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
              3. lift-*.f64N/A

                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              4. 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. associate-*l/N/A

                \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              6. associate-/l*N/A

                \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              7. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, -x \cdot \frac{1}{\tan B}\right)} \]
            4. Applied rewrites65.3%

              \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \frac{-x}{\tan B}\right)} \]
            5. Taylor expanded in F around -inf

              \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{-1}{F \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{-1}{F \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
              2. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\color{blue}{\sin B \cdot F}}, \frac{-x}{\tan B}\right) \]
              3. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\color{blue}{\sin B \cdot F}}, \frac{-x}{\tan B}\right) \]
              4. lower-sin.f6499.6

                \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\color{blue}{\sin B} \cdot F}, \frac{-x}{\tan B}\right) \]
            7. Applied rewrites99.6%

              \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{-1}{\sin B \cdot F}}, \frac{-x}{\tan B}\right) \]
            8. Taylor expanded in B around 0

              \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\sin B \cdot F}, \frac{-x}{\color{blue}{B \cdot \left(1 + \frac{1}{3} \cdot {B}^{2}\right)}}\right) \]
            9. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\sin B \cdot F}, \frac{-x}{\color{blue}{\left(1 + \frac{1}{3} \cdot {B}^{2}\right) \cdot B}}\right) \]
              2. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\sin B \cdot F}, \frac{-x}{\color{blue}{\left(1 + \frac{1}{3} \cdot {B}^{2}\right) \cdot B}}\right) \]
              3. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\sin B \cdot F}, \frac{-x}{\color{blue}{\left(\frac{1}{3} \cdot {B}^{2} + 1\right)} \cdot B}\right) \]
              4. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\sin B \cdot F}, \frac{-x}{\color{blue}{\mathsf{fma}\left(\frac{1}{3}, {B}^{2}, 1\right)} \cdot B}\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\sin B \cdot F}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, 1\right) \cdot B}\right) \]
              6. lower-*.f6479.1

                \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\sin B \cdot F}, \frac{-x}{\mathsf{fma}\left(0.3333333333333333, \color{blue}{B \cdot B}, 1\right) \cdot B}\right) \]
            10. Applied rewrites79.1%

              \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\sin B \cdot F}, \frac{-x}{\color{blue}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B}}\right) \]

            if -7.49999999999999995e52 < F < 1e7

            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. associate-*l/N/A

                \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              6. associate-/l*N/A

                \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              7. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, -x \cdot \frac{1}{\tan B}\right)} \]
            4. Applied rewrites99.6%

              \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \frac{-x}{\tan B}\right)} \]
            5. Step-by-step derivation
              1. lift-pow.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              2. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              3. sqrt-pow2N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{{\left(\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}\right)}^{-1}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              4. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              5. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{2 \cdot x} + \mathsf{fma}\left(F, F, 2\right)}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              6. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right) + 2 \cdot x}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              7. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              8. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              9. associate-+l+N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{F \cdot F + \left(2 + 2 \cdot x\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              10. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{F \cdot F + \color{blue}{\left(2 \cdot x + 2\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              11. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{F \cdot F} + \left(2 \cdot x + 2\right)}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              12. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{F \cdot F + \left(\color{blue}{2 \cdot x} + 2\right)}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              13. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{F \cdot F + \color{blue}{\mathsf{fma}\left(2, x, 2\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              14. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              15. inv-powN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              16. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              17. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{F \cdot F + \mathsf{fma}\left(2, x, 2\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              18. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{F \cdot F} + \mathsf{fma}\left(2, x, 2\right)}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              19. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{F \cdot F + \color{blue}{\left(2 \cdot x + 2\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              20. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{F \cdot F + \left(\color{blue}{2 \cdot x} + 2\right)}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              21. associate-+r+N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{\left(F \cdot F + 2 \cdot x\right) + 2}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              22. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{\left(2 \cdot x + F \cdot F\right)} + 2}}}{\sin B}, \frac{-x}{\tan B}\right) \]
            6. Applied rewrites99.5%

              \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
            7. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}}, \frac{-x}{\tan B}\right) \]
              2. lift-/.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              3. associate-/l/N/A

                \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
              4. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
              5. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}, \frac{-x}{\tan B}\right) \]
              6. lower-*.f6499.6

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}, \frac{-x}{\tan B}\right) \]
              7. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)}}, \frac{-x}{\tan B}\right) \]
              8. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sin B \cdot \sqrt{\color{blue}{x \cdot 2 + \left(F \cdot F + 2\right)}}}, \frac{-x}{\tan B}\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sin B \cdot \sqrt{\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)}}, \frac{-x}{\tan B}\right) \]
              10. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sin B \cdot \sqrt{\color{blue}{\mathsf{fma}\left(2, x, F \cdot F + 2\right)}}}, \frac{-x}{\tan B}\right) \]
              11. lift-fma.f6499.6

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)}}, \frac{-x}{\tan B}\right) \]
            8. Applied rewrites99.6%

              \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{1}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}, \frac{-x}{\tan B}\right) \]
            9. Taylor expanded in B around 0

              \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{B \cdot \sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}}}, \frac{-x}{\tan B}\right) \]
            10. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)} \cdot B}}, \frac{-x}{\tan B}\right) \]
              2. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)} \cdot B}}, \frac{-x}{\tan B}\right) \]
              3. lower-sqrt.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot B}, \frac{-x}{\tan B}\right) \]
              4. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sqrt{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}} \cdot B}, \frac{-x}{\tan B}\right) \]
              5. lower-+.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sqrt{\color{blue}{\left(2 \cdot x + {F}^{2}\right) + 2}} \cdot B}, \frac{-x}{\tan B}\right) \]
              6. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sqrt{\color{blue}{\mathsf{fma}\left(2, x, {F}^{2}\right)} + 2} \cdot B}, \frac{-x}{\tan B}\right) \]
              7. unpow2N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sqrt{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2} \cdot B}, \frac{-x}{\tan B}\right) \]
              8. lower-*.f6481.9

                \[\leadsto \mathsf{fma}\left(F, \frac{1}{\sqrt{\mathsf{fma}\left(2, x, \color{blue}{F \cdot F}\right) + 2} \cdot B}, \frac{-x}{\tan B}\right) \]
            11. Applied rewrites81.9%

              \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{\sqrt{\mathsf{fma}\left(2, x, F \cdot F\right) + 2} \cdot B}}, \frac{-x}{\tan B}\right) \]

            if 1e7 < F

            1. Initial program 52.2%

              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
              2. +-commutativeN/A

                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
              3. lift-*.f64N/A

                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              4. lift-/.f64N/A

                \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              5. associate-*l/N/A

                \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              6. associate-/l*N/A

                \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
              7. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, -x \cdot \frac{1}{\tan B}\right)} \]
            4. Applied rewrites66.9%

              \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \frac{-x}{\tan B}\right)} \]
            5. Step-by-step derivation
              1. lift-pow.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              2. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              3. sqrt-pow2N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{{\left(\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}\right)}^{-1}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              4. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              5. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{2 \cdot x} + \mathsf{fma}\left(F, F, 2\right)}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              6. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{\mathsf{fma}\left(F, F, 2\right) + 2 \cdot x}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              7. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              8. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              9. associate-+l+N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{F \cdot F + \left(2 + 2 \cdot x\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              10. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{F \cdot F + \color{blue}{\left(2 \cdot x + 2\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              11. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{F \cdot F} + \left(2 \cdot x + 2\right)}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              12. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{F \cdot F + \left(\color{blue}{2 \cdot x} + 2\right)}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              13. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{F \cdot F + \color{blue}{\mathsf{fma}\left(2, x, 2\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              14. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\sqrt{\color{blue}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\right)}^{-1}}{\sin B}, \frac{-x}{\tan B}\right) \]
              15. inv-powN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              16. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              17. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{F \cdot F + \mathsf{fma}\left(2, x, 2\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              18. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{F \cdot F} + \mathsf{fma}\left(2, x, 2\right)}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              19. lift-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{F \cdot F + \color{blue}{\left(2 \cdot x + 2\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              20. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{F \cdot F + \left(\color{blue}{2 \cdot x} + 2\right)}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              21. associate-+r+N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{\left(F \cdot F + 2 \cdot x\right) + 2}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
              22. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\color{blue}{\left(2 \cdot x + F \cdot F\right)} + 2}}}{\sin B}, \frac{-x}{\tan B}\right) \]
            6. Applied rewrites66.9%

              \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}}{\sin B}, \frac{-x}{\tan B}\right) \]
            7. Taylor expanded in B around 0

              \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\color{blue}{B \cdot \left(1 + \frac{1}{3} \cdot {B}^{2}\right)}}\right) \]
            8. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\color{blue}{\left(1 + \frac{1}{3} \cdot {B}^{2}\right) \cdot B}}\right) \]
              2. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\color{blue}{\left(1 + \frac{1}{3} \cdot {B}^{2}\right) \cdot B}}\right) \]
              3. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\color{blue}{\left(\frac{1}{3} \cdot {B}^{2} + 1\right)} \cdot B}\right) \]
              4. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\color{blue}{\mathsf{fma}\left(\frac{1}{3}, {B}^{2}, 1\right)} \cdot B}\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, \color{blue}{B \cdot B}, 1\right) \cdot B}\right) \]
              6. lower-*.f6451.4

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\mathsf{fma}\left(0.3333333333333333, \color{blue}{B \cdot B}, 1\right) \cdot B}\right) \]
            9. Applied rewrites51.4%

              \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}, \frac{-x}{\color{blue}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B}}\right) \]
            10. Taylor expanded in F around inf

              \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{F}}}{\sin B}, \frac{-x}{\mathsf{fma}\left(\frac{1}{3}, B \cdot B, 1\right) \cdot B}\right) \]
            11. Step-by-step derivation
              1. lower-/.f6483.2

                \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{F}}}{\sin B}, \frac{-x}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B}\right) \]
            12. Applied rewrites83.2%

              \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{1}{F}}}{\sin B}, \frac{-x}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B}\right) \]
          3. Recombined 3 regimes into one program.
          4. Final simplification81.8%

            \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.5 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{\sin B \cdot F}, \frac{-x}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B}\right)\\ \mathbf{elif}\;F \leq 10000000:\\ \;\;\;\;\mathsf{fma}\left(F, {\left(\sqrt{\mathsf{fma}\left(2, x, F \cdot F\right) + 2} \cdot B\right)}^{-1}, \frac{-x}{\tan B}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{{F}^{-1}}{\sin B}, \frac{-x}{\mathsf{fma}\left(0.3333333333333333, B \cdot B, 1\right) \cdot B}\right)\\ \end{array} \]
          5. Add Preprocessing

          Alternative 11: 69.2% accurate, 1.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \mathbf{if}\;x \leq -620000000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq -7.2 \cdot 10^{-145}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-102}:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
          (FPCore (F B x)
           :precision binary64
           (let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
             (if (<= x -620000000000.0)
               t_0
               (if (<= x -7.2e-145)
                 (/ (- (/ F (sqrt (fma x 2.0 (fma F F 2.0)))) x) B)
                 (if (<= x 3.6e-102)
                   (* (sqrt (pow (fma F F 2.0) -1.0)) (/ F (sin B)))
                   t_0)))))
          double code(double F, double B, double x) {
          	double t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
          	double tmp;
          	if (x <= -620000000000.0) {
          		tmp = t_0;
          	} else if (x <= -7.2e-145) {
          		tmp = ((F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B;
          	} else if (x <= 3.6e-102) {
          		tmp = sqrt(pow(fma(F, F, 2.0), -1.0)) * (F / sin(B));
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          function code(F, B, x)
          	t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B))
          	tmp = 0.0
          	if (x <= -620000000000.0)
          		tmp = t_0;
          	elseif (x <= -7.2e-145)
          		tmp = Float64(Float64(Float64(F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B);
          	elseif (x <= 3.6e-102)
          		tmp = Float64(sqrt((fma(F, F, 2.0) ^ -1.0)) * Float64(F / sin(B)));
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -620000000000.0], t$95$0, If[LessEqual[x, -7.2e-145], N[(N[(N[(F / N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[x, 3.6e-102], N[(N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
          \mathbf{if}\;x \leq -620000000000:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;x \leq -7.2 \cdot 10^{-145}:\\
          \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
          
          \mathbf{elif}\;x \leq 3.6 \cdot 10^{-102}:\\
          \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if x < -6.2e11 or 3.6e-102 < x

            1. Initial program 77.0%

              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
            2. Add Preprocessing
            3. Taylor expanded in B around 0

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
              2. associate-*l*N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
              3. associate-*r*N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
              4. *-commutativeN/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
              5. +-commutativeN/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
              6. lower-/.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
            5. Applied rewrites55.9%

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.16666666666666666, F\right)}{B}} \]
            6. Taylor expanded in F around -inf

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
            7. Step-by-step derivation
              1. Applied rewrites60.5%

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
              2. Taylor expanded in B around 0

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B} \]
              3. Step-by-step derivation
                1. Applied rewrites85.9%

                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B} \]

                if -6.2e11 < x < -7.2000000000000001e-145

                1. Initial program 70.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. lower--.f64N/A

                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                  3. *-commutativeN/A

                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                  4. lower-*.f64N/A

                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                  5. lower-sqrt.f64N/A

                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                  6. lower-/.f64N/A

                    \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                  7. associate-+r+N/A

                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                  8. +-commutativeN/A

                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                  9. unpow2N/A

                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                  10. lower-fma.f64N/A

                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                  11. +-commutativeN/A

                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                  12. lower-fma.f6441.6

                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                5. Applied rewrites41.6%

                  \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                6. Step-by-step derivation
                  1. Applied rewrites41.7%

                    \[\leadsto \frac{\frac{F \cdot 1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B} \]

                  if -7.2000000000000001e-145 < x < 3.6e-102

                  1. Initial program 75.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 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.4

                      \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\color{blue}{\sin B}} \]
                  5. Applied rewrites62.4%

                    \[\leadsto \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\sin B}} \]
                7. Recombined 3 regimes into one program.
                8. Final simplification70.2%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -620000000000:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \mathbf{elif}\;x \leq -7.2 \cdot 10^{-145}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-102}:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \end{array} \]
                9. Add Preprocessing

                Alternative 12: 69.3% accurate, 1.5× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1 \cdot 10^{-114}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{\left(\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B\right) \cdot F}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-102}:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \end{array} \end{array} \]
                (FPCore (F B x)
                 :precision binary64
                 (if (<= x -1e-114)
                   (fma
                    F
                    (/ -1.0 (* (* (fma -0.16666666666666666 (* B B) 1.0) B) F))
                    (/ (- x) (tan B)))
                   (if (<= x 3.6e-102)
                     (* (sqrt (pow (fma F F 2.0) -1.0)) (/ F (sin B)))
                     (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)))))
                double code(double F, double B, double x) {
                	double tmp;
                	if (x <= -1e-114) {
                		tmp = fma(F, (-1.0 / ((fma(-0.16666666666666666, (B * B), 1.0) * B) * F)), (-x / tan(B)));
                	} else if (x <= 3.6e-102) {
                		tmp = sqrt(pow(fma(F, F, 2.0), -1.0)) * (F / sin(B));
                	} else {
                		tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
                	}
                	return tmp;
                }
                
                function code(F, B, x)
                	tmp = 0.0
                	if (x <= -1e-114)
                		tmp = fma(F, Float64(-1.0 / Float64(Float64(fma(-0.16666666666666666, Float64(B * B), 1.0) * B) * F)), Float64(Float64(-x) / tan(B)));
                	elseif (x <= 3.6e-102)
                		tmp = Float64(sqrt((fma(F, F, 2.0) ^ -1.0)) * Float64(F / sin(B)));
                	else
                		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B));
                	end
                	return tmp
                end
                
                code[F_, B_, x_] := If[LessEqual[x, -1e-114], N[(F * N[(-1.0 / N[(N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e-102], N[(N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;x \leq -1 \cdot 10^{-114}:\\
                \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{\left(\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B\right) \cdot F}, \frac{-x}{\tan B}\right)\\
                
                \mathbf{elif}\;x \leq 3.6 \cdot 10^{-102}:\\
                \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}\\
                
                \mathbf{else}:\\
                \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if x < -1.0000000000000001e-114

                  1. Initial program 74.7%

                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                  2. Add Preprocessing
                  3. 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. associate-*l/N/A

                      \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                    6. associate-/l*N/A

                      \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                    7. lower-fma.f64N/A

                      \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, -x \cdot \frac{1}{\tan B}\right)} \]
                  4. Applied rewrites84.1%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \frac{-x}{\tan B}\right)} \]
                  5. Taylor expanded in F around -inf

                    \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{-1}{F \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
                  6. Step-by-step derivation
                    1. lower-/.f64N/A

                      \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{-1}{F \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\color{blue}{\sin B \cdot F}}, \frac{-x}{\tan B}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\color{blue}{\sin B \cdot F}}, \frac{-x}{\tan B}\right) \]
                    4. lower-sin.f6452.3

                      \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\color{blue}{\sin B} \cdot F}, \frac{-x}{\tan B}\right) \]
                  7. Applied rewrites52.3%

                    \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{-1}{\sin B \cdot F}}, \frac{-x}{\tan B}\right) \]
                  8. Taylor expanded in B around 0

                    \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\left(B \cdot \left(1 + \frac{-1}{6} \cdot {B}^{2}\right)\right) \cdot F}, \frac{-x}{\tan B}\right) \]
                  9. Step-by-step derivation
                    1. Applied rewrites64.8%

                      \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\left(\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B\right) \cdot F}, \frac{-x}{\tan B}\right) \]

                    if -1.0000000000000001e-114 < x < 3.6e-102

                    1. Initial program 76.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 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.f6460.9

                        \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\color{blue}{\sin B}} \]
                    5. Applied rewrites60.9%

                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\sin B}} \]

                    if 3.6e-102 < x

                    1. Initial program 74.7%

                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    2. Add Preprocessing
                    3. Taylor expanded in B around 0

                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                      2. associate-*l*N/A

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                      3. associate-*r*N/A

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                      4. *-commutativeN/A

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                      5. +-commutativeN/A

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                      6. lower-/.f64N/A

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
                    5. Applied rewrites60.1%

                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.16666666666666666, F\right)}{B}} \]
                    6. Taylor expanded in F around -inf

                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                    7. Step-by-step derivation
                      1. Applied rewrites61.5%

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                      2. Taylor expanded in B around 0

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B} \]
                      3. Step-by-step derivation
                        1. Applied rewrites82.0%

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B} \]
                      4. Recombined 3 regimes into one program.
                      5. Final simplification69.8%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1 \cdot 10^{-114}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{\left(\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B\right) \cdot F}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-102}:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \end{array} \]
                      6. Add Preprocessing

                      Alternative 13: 67.7% accurate, 1.5× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;x \leq -2.9 \cdot 10^{-72}:\\ \;\;\;\;t\_0 + \frac{F}{B} \cdot {F}^{-1}\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-102}:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t\_0 + \frac{-1}{B}\\ \end{array} \end{array} \]
                      (FPCore (F B x)
                       :precision binary64
                       (let* ((t_0 (* x (/ -1.0 (tan B)))))
                         (if (<= x -2.9e-72)
                           (+ t_0 (* (/ F B) (pow F -1.0)))
                           (if (<= x 3.6e-102)
                             (* (sqrt (pow (fma F F 2.0) -1.0)) (/ F (sin B)))
                             (+ t_0 (/ -1.0 B))))))
                      double code(double F, double B, double x) {
                      	double t_0 = x * (-1.0 / tan(B));
                      	double tmp;
                      	if (x <= -2.9e-72) {
                      		tmp = t_0 + ((F / B) * pow(F, -1.0));
                      	} else if (x <= 3.6e-102) {
                      		tmp = sqrt(pow(fma(F, F, 2.0), -1.0)) * (F / sin(B));
                      	} else {
                      		tmp = t_0 + (-1.0 / B);
                      	}
                      	return tmp;
                      }
                      
                      function code(F, B, x)
                      	t_0 = Float64(x * Float64(-1.0 / tan(B)))
                      	tmp = 0.0
                      	if (x <= -2.9e-72)
                      		tmp = Float64(t_0 + Float64(Float64(F / B) * (F ^ -1.0)));
                      	elseif (x <= 3.6e-102)
                      		tmp = Float64(sqrt((fma(F, F, 2.0) ^ -1.0)) * Float64(F / sin(B)));
                      	else
                      		tmp = Float64(t_0 + Float64(-1.0 / B));
                      	end
                      	return tmp
                      end
                      
                      code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.9e-72], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[Power[F, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e-102], N[(N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_0 := x \cdot \frac{-1}{\tan B}\\
                      \mathbf{if}\;x \leq -2.9 \cdot 10^{-72}:\\
                      \;\;\;\;t\_0 + \frac{F}{B} \cdot {F}^{-1}\\
                      
                      \mathbf{elif}\;x \leq 3.6 \cdot 10^{-102}:\\
                      \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_0 + \frac{-1}{B}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if x < -2.89999999999999998e-72

                        1. Initial program 75.7%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. Add Preprocessing
                        3. Taylor expanded in F around inf

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                        4. Step-by-step derivation
                          1. lower-/.f6466.1

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                        5. Applied rewrites66.1%

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                        6. Taylor expanded in B around 0

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot \frac{1}{F} \]
                        7. Step-by-step derivation
                          1. lower-/.f6471.1

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot \frac{1}{F} \]
                        8. Applied rewrites71.1%

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot \frac{1}{F} \]

                        if -2.89999999999999998e-72 < x < 3.6e-102

                        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 x around 0

                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
                        4. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\sin B}} \]
                          2. lower-*.f64N/A

                            \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\sin B}} \]
                          3. lower-sqrt.f64N/A

                            \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{\sin B} \]
                          4. lower-/.f64N/A

                            \[\leadsto \sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}} \cdot \frac{F}{\sin B} \]
                          5. +-commutativeN/A

                            \[\leadsto \sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}} \cdot \frac{F}{\sin B} \]
                          6. unpow2N/A

                            \[\leadsto \sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}} \cdot \frac{F}{\sin B} \]
                          7. lower-fma.f64N/A

                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2\right)}}} \cdot \frac{F}{\sin B} \]
                          8. lower-/.f64N/A

                            \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \color{blue}{\frac{F}{\sin B}} \]
                          9. lower-sin.f6457.9

                            \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\color{blue}{\sin B}} \]
                        5. Applied rewrites57.9%

                          \[\leadsto \color{blue}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\sin B}} \]

                        if 3.6e-102 < x

                        1. Initial program 74.7%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. Add Preprocessing
                        3. Taylor expanded in B around 0

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
                        4. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                          2. associate-*l*N/A

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                          3. associate-*r*N/A

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                          4. *-commutativeN/A

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                          5. +-commutativeN/A

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                          6. lower-/.f64N/A

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
                        5. Applied rewrites60.1%

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.16666666666666666, F\right)}{B}} \]
                        6. Taylor expanded in F around -inf

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                        7. Step-by-step derivation
                          1. Applied rewrites61.5%

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                          2. Taylor expanded in B around 0

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B} \]
                          3. Step-by-step derivation
                            1. Applied rewrites82.0%

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B} \]
                          4. Recombined 3 regimes into one program.
                          5. Final simplification69.6%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{-72}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot {F}^{-1}\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-102}:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \end{array} \]
                          6. Add Preprocessing

                          Alternative 14: 51.0% accurate, 2.4× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4.85 \cdot 10^{+86}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 2800:\\ \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                          (FPCore (F B x)
                           :precision binary64
                           (if (<= F -4.85e+86)
                             (+ (- (/ x B)) (/ (- (* -0.16666666666666666 (* B B)) 1.0) B))
                             (if (<= F 2800.0)
                               (/ (- (* (sqrt (pow (fma F F (fma 2.0 x 2.0)) -1.0)) F) x) B)
                               (/ (- 1.0 x) B))))
                          double code(double F, double B, double x) {
                          	double tmp;
                          	if (F <= -4.85e+86) {
                          		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                          	} else if (F <= 2800.0) {
                          		tmp = ((sqrt(pow(fma(F, F, fma(2.0, x, 2.0)), -1.0)) * F) - x) / B;
                          	} else {
                          		tmp = (1.0 - x) / B;
                          	}
                          	return tmp;
                          }
                          
                          function code(F, B, x)
                          	tmp = 0.0
                          	if (F <= -4.85e+86)
                          		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(-0.16666666666666666 * Float64(B * B)) - 1.0) / B));
                          	elseif (F <= 2800.0)
                          		tmp = Float64(Float64(Float64(sqrt((fma(F, F, fma(2.0, x, 2.0)) ^ -1.0)) * F) - x) / B);
                          	else
                          		tmp = Float64(Float64(1.0 - x) / B);
                          	end
                          	return tmp
                          end
                          
                          code[F_, B_, x_] := If[LessEqual[F, -4.85e+86], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2800.0], N[(N[(N[(N[Sqrt[N[Power[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;F \leq -4.85 \cdot 10^{+86}:\\
                          \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\
                          
                          \mathbf{elif}\;F \leq 2800:\\
                          \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}} \cdot F - x}{B}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{1 - x}{B}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if F < -4.85e86

                            1. Initial program 48.5%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Add Preprocessing
                            3. Taylor expanded in B around 0

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
                            4. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                              2. associate-*l*N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                              3. associate-*r*N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                              4. *-commutativeN/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                              5. +-commutativeN/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                              6. lower-/.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
                            5. Applied rewrites32.4%

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.16666666666666666, F\right)}{B}} \]
                            6. Taylor expanded in F around -inf

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                            7. Step-by-step derivation
                              1. Applied rewrites63.0%

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                              2. Taylor expanded in B around 0

                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{-1}{6} \cdot \left(B \cdot B\right) - 1}{B} \]
                              3. Step-by-step derivation
                                1. lower-/.f6451.8

                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                              4. Applied rewrites51.8%

                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]

                              if -4.85e86 < F < 2800

                              1. Initial program 98.0%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                2. lower--.f64N/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                3. *-commutativeN/A

                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                4. lower-*.f64N/A

                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                5. lower-sqrt.f64N/A

                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                6. lower-/.f64N/A

                                  \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                7. associate-+r+N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                8. +-commutativeN/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                9. unpow2N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                10. lower-fma.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                12. lower-fma.f6447.4

                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                              5. Applied rewrites47.4%

                                \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]

                              if 2800 < F

                              1. Initial program 53.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. lower--.f64N/A

                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                3. *-commutativeN/A

                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                4. lower-*.f64N/A

                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                5. lower-sqrt.f64N/A

                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                6. lower-/.f64N/A

                                  \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                7. associate-+r+N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                8. +-commutativeN/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                9. unpow2N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                10. lower-fma.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                12. lower-fma.f6435.1

                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                              5. Applied rewrites35.1%

                                \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around inf

                                \[\leadsto \frac{1 - x}{B} \]
                              7. Step-by-step derivation
                                1. Applied rewrites48.3%

                                  \[\leadsto \frac{1 - x}{B} \]
                              8. Recombined 3 regimes into one program.
                              9. Final simplification48.4%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4.85 \cdot 10^{+86}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 2800:\\ \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)\right)}^{-1}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                              10. Add Preprocessing

                              Alternative 15: 43.7% accurate, 2.4× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.9 \cdot 10^{-63}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 5.4 \cdot 10^{-114}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 0.000145:\\ \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                              (FPCore (F B x)
                               :precision binary64
                               (if (<= F -1.9e-63)
                                 (+ (- (/ x B)) (/ (- (* -0.16666666666666666 (* B B)) 1.0) B))
                                 (if (<= F 5.4e-114)
                                   (/ (- x) B)
                                   (if (<= F 0.000145)
                                     (/ (* (sqrt (pow (fma F F 2.0) -1.0)) F) B)
                                     (/ (- 1.0 x) B)))))
                              double code(double F, double B, double x) {
                              	double tmp;
                              	if (F <= -1.9e-63) {
                              		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                              	} else if (F <= 5.4e-114) {
                              		tmp = -x / B;
                              	} else if (F <= 0.000145) {
                              		tmp = (sqrt(pow(fma(F, F, 2.0), -1.0)) * F) / B;
                              	} else {
                              		tmp = (1.0 - x) / B;
                              	}
                              	return tmp;
                              }
                              
                              function code(F, B, x)
                              	tmp = 0.0
                              	if (F <= -1.9e-63)
                              		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(-0.16666666666666666 * Float64(B * B)) - 1.0) / B));
                              	elseif (F <= 5.4e-114)
                              		tmp = Float64(Float64(-x) / B);
                              	elseif (F <= 0.000145)
                              		tmp = Float64(Float64(sqrt((fma(F, F, 2.0) ^ -1.0)) * F) / B);
                              	else
                              		tmp = Float64(Float64(1.0 - x) / B);
                              	end
                              	return tmp
                              end
                              
                              code[F_, B_, x_] := If[LessEqual[F, -1.9e-63], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.4e-114], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 0.000145], N[(N[(N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * F), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;F \leq -1.9 \cdot 10^{-63}:\\
                              \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\
                              
                              \mathbf{elif}\;F \leq 5.4 \cdot 10^{-114}:\\
                              \;\;\;\;\frac{-x}{B}\\
                              
                              \mathbf{elif}\;F \leq 0.000145:\\
                              \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot F}{B}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{1 - x}{B}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 4 regimes
                              2. if F < -1.90000000000000009e-63

                                1. Initial program 63.3%

                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                2. Add Preprocessing
                                3. Taylor expanded in B around 0

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
                                4. Step-by-step derivation
                                  1. *-commutativeN/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                  2. associate-*l*N/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                  3. associate-*r*N/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                  4. *-commutativeN/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                  5. +-commutativeN/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                  6. lower-/.f64N/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
                                5. Applied rewrites43.5%

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.16666666666666666, F\right)}{B}} \]
                                6. Taylor expanded in F around -inf

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites60.7%

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                  2. Taylor expanded in B around 0

                                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{-1}{6} \cdot \left(B \cdot B\right) - 1}{B} \]
                                  3. Step-by-step derivation
                                    1. lower-/.f6448.9

                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                  4. Applied rewrites48.9%

                                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]

                                  if -1.90000000000000009e-63 < F < 5.3999999999999999e-114

                                  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. lower--.f64N/A

                                      \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                    3. *-commutativeN/A

                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                    4. lower-*.f64N/A

                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                    5. lower-sqrt.f64N/A

                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                    6. lower-/.f64N/A

                                      \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                    7. associate-+r+N/A

                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                    8. +-commutativeN/A

                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                    9. unpow2N/A

                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                    10. lower-fma.f64N/A

                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                    11. +-commutativeN/A

                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                    12. lower-fma.f6442.4

                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                  5. Applied rewrites42.4%

                                    \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                  6. Taylor expanded in F around 0

                                    \[\leadsto \frac{-1 \cdot x}{B} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites38.2%

                                      \[\leadsto \frac{-x}{B} \]

                                    if 5.3999999999999999e-114 < F < 1.45e-4

                                    1. Initial program 99.1%

                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in B around 0

                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                      2. lower--.f64N/A

                                        \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                      3. *-commutativeN/A

                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                      4. lower-*.f64N/A

                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                      5. lower-sqrt.f64N/A

                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                      6. lower-/.f64N/A

                                        \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                      7. associate-+r+N/A

                                        \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                      8. +-commutativeN/A

                                        \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                      9. unpow2N/A

                                        \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                      10. lower-fma.f64N/A

                                        \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                      11. +-commutativeN/A

                                        \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                      12. lower-fma.f6455.2

                                        \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                    5. Applied rewrites55.2%

                                      \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                    6. Taylor expanded in x around 0

                                      \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{B} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites38.6%

                                        \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot F}{B} \]

                                      if 1.45e-4 < F

                                      1. Initial program 53.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. lower--.f64N/A

                                          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                        3. *-commutativeN/A

                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                        4. lower-*.f64N/A

                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                        5. lower-sqrt.f64N/A

                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                        6. lower-/.f64N/A

                                          \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                        7. associate-+r+N/A

                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                        8. +-commutativeN/A

                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                        9. unpow2N/A

                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                        10. lower-fma.f64N/A

                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                        11. +-commutativeN/A

                                          \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                        12. lower-fma.f6435.9

                                          \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                      5. Applied rewrites35.9%

                                        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                      6. Taylor expanded in F around inf

                                        \[\leadsto \frac{1 - x}{B} \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites48.3%

                                          \[\leadsto \frac{1 - x}{B} \]
                                      8. Recombined 4 regimes into one program.
                                      9. Final simplification44.2%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.9 \cdot 10^{-63}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 5.4 \cdot 10^{-114}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 0.000145:\\ \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                      10. Add Preprocessing

                                      Alternative 16: 43.7% accurate, 2.4× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.9 \cdot 10^{-63}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 5.4 \cdot 10^{-114}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 0.000145:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                      (FPCore (F B x)
                                       :precision binary64
                                       (if (<= F -1.9e-63)
                                         (+ (- (/ x B)) (/ (- (* -0.16666666666666666 (* B B)) 1.0) B))
                                         (if (<= F 5.4e-114)
                                           (/ (- x) B)
                                           (if (<= F 0.000145)
                                             (* (sqrt (pow (fma F F 2.0) -1.0)) (/ F B))
                                             (/ (- 1.0 x) B)))))
                                      double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (F <= -1.9e-63) {
                                      		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                                      	} else if (F <= 5.4e-114) {
                                      		tmp = -x / B;
                                      	} else if (F <= 0.000145) {
                                      		tmp = sqrt(pow(fma(F, F, 2.0), -1.0)) * (F / B);
                                      	} else {
                                      		tmp = (1.0 - x) / B;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(F, B, x)
                                      	tmp = 0.0
                                      	if (F <= -1.9e-63)
                                      		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(-0.16666666666666666 * Float64(B * B)) - 1.0) / B));
                                      	elseif (F <= 5.4e-114)
                                      		tmp = Float64(Float64(-x) / B);
                                      	elseif (F <= 0.000145)
                                      		tmp = Float64(sqrt((fma(F, F, 2.0) ^ -1.0)) * Float64(F / B));
                                      	else
                                      		tmp = Float64(Float64(1.0 - x) / B);
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[F_, B_, x_] := If[LessEqual[F, -1.9e-63], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.4e-114], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 0.000145], N[(N[Sqrt[N[Power[N[(F * F + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;F \leq -1.9 \cdot 10^{-63}:\\
                                      \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\
                                      
                                      \mathbf{elif}\;F \leq 5.4 \cdot 10^{-114}:\\
                                      \;\;\;\;\frac{-x}{B}\\
                                      
                                      \mathbf{elif}\;F \leq 0.000145:\\
                                      \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\frac{1 - x}{B}\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 4 regimes
                                      2. if F < -1.90000000000000009e-63

                                        1. Initial program 63.3%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in B around 0

                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
                                        4. Step-by-step derivation
                                          1. *-commutativeN/A

                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                          2. associate-*l*N/A

                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                          3. associate-*r*N/A

                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                          4. *-commutativeN/A

                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                          5. +-commutativeN/A

                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                          6. lower-/.f64N/A

                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
                                        5. Applied rewrites43.5%

                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.16666666666666666, F\right)}{B}} \]
                                        6. Taylor expanded in F around -inf

                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites60.7%

                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                          2. Taylor expanded in B around 0

                                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{-1}{6} \cdot \left(B \cdot B\right) - 1}{B} \]
                                          3. Step-by-step derivation
                                            1. lower-/.f6448.9

                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                          4. Applied rewrites48.9%

                                            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]

                                          if -1.90000000000000009e-63 < F < 5.3999999999999999e-114

                                          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. lower--.f64N/A

                                              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                            3. *-commutativeN/A

                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                            4. lower-*.f64N/A

                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                            5. lower-sqrt.f64N/A

                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                            6. lower-/.f64N/A

                                              \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                            7. associate-+r+N/A

                                              \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                            8. +-commutativeN/A

                                              \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                            9. unpow2N/A

                                              \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                            10. lower-fma.f64N/A

                                              \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                            11. +-commutativeN/A

                                              \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                            12. lower-fma.f6442.4

                                              \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                          5. Applied rewrites42.4%

                                            \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                          6. Taylor expanded in F around 0

                                            \[\leadsto \frac{-1 \cdot x}{B} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites38.2%

                                              \[\leadsto \frac{-x}{B} \]

                                            if 5.3999999999999999e-114 < F < 1.45e-4

                                            1. Initial program 99.1%

                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in B around 0

                                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                            4. Step-by-step derivation
                                              1. lower-/.f64N/A

                                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                              2. lower--.f64N/A

                                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                              3. *-commutativeN/A

                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                              4. lower-*.f64N/A

                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                              5. lower-sqrt.f64N/A

                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                              6. lower-/.f64N/A

                                                \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                              7. associate-+r+N/A

                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                              8. +-commutativeN/A

                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                              9. unpow2N/A

                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                              10. lower-fma.f64N/A

                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                              11. +-commutativeN/A

                                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                              12. lower-fma.f6455.2

                                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                            5. Applied rewrites55.2%

                                              \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                            6. Taylor expanded in x around 0

                                              \[\leadsto \frac{F}{B} \cdot \color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}} \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites38.5%

                                                \[\leadsto \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \color{blue}{\frac{F}{B}} \]

                                              if 1.45e-4 < F

                                              1. Initial program 53.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. lower--.f64N/A

                                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                3. *-commutativeN/A

                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                4. lower-*.f64N/A

                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                5. lower-sqrt.f64N/A

                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                6. lower-/.f64N/A

                                                  \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                7. associate-+r+N/A

                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                8. +-commutativeN/A

                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                9. unpow2N/A

                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                10. lower-fma.f64N/A

                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                11. +-commutativeN/A

                                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                12. lower-fma.f6435.9

                                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                              5. Applied rewrites35.9%

                                                \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                              6. Taylor expanded in F around inf

                                                \[\leadsto \frac{1 - x}{B} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites48.3%

                                                  \[\leadsto \frac{1 - x}{B} \]
                                              8. Recombined 4 regimes into one program.
                                              9. Final simplification44.2%

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.9 \cdot 10^{-63}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 5.4 \cdot 10^{-114}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 0.000145:\\ \;\;\;\;\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                              10. Add Preprocessing

                                              Alternative 17: 50.7% accurate, 2.5× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -0.00043:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 2900:\\ \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                              (FPCore (F B x)
                                               :precision binary64
                                               (if (<= F -0.00043)
                                                 (+ (- (/ x B)) (/ (- (* -0.16666666666666666 (* B B)) 1.0) B))
                                                 (if (<= F 2900.0)
                                                   (/ (- (* (sqrt (pow (fma 2.0 x 2.0) -1.0)) F) x) B)
                                                   (/ (- 1.0 x) B))))
                                              double code(double F, double B, double x) {
                                              	double tmp;
                                              	if (F <= -0.00043) {
                                              		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                                              	} else if (F <= 2900.0) {
                                              		tmp = ((sqrt(pow(fma(2.0, x, 2.0), -1.0)) * F) - x) / B;
                                              	} else {
                                              		tmp = (1.0 - x) / B;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              function code(F, B, x)
                                              	tmp = 0.0
                                              	if (F <= -0.00043)
                                              		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(-0.16666666666666666 * Float64(B * B)) - 1.0) / B));
                                              	elseif (F <= 2900.0)
                                              		tmp = Float64(Float64(Float64(sqrt((fma(2.0, x, 2.0) ^ -1.0)) * F) - x) / B);
                                              	else
                                              		tmp = Float64(Float64(1.0 - x) / B);
                                              	end
                                              	return tmp
                                              end
                                              
                                              code[F_, B_, x_] := If[LessEqual[F, -0.00043], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2900.0], N[(N[(N[(N[Sqrt[N[Power[N[(2.0 * x + 2.0), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              \mathbf{if}\;F \leq -0.00043:\\
                                              \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\
                                              
                                              \mathbf{elif}\;F \leq 2900:\\
                                              \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}} \cdot F - x}{B}\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;\frac{1 - x}{B}\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if F < -4.29999999999999989e-4

                                                1. Initial program 58.0%

                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in B around 0

                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
                                                4. Step-by-step derivation
                                                  1. *-commutativeN/A

                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                  2. associate-*l*N/A

                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                  3. associate-*r*N/A

                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                  4. *-commutativeN/A

                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                  5. +-commutativeN/A

                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                  6. lower-/.f64N/A

                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
                                                5. Applied rewrites40.6%

                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.16666666666666666, F\right)}{B}} \]
                                                6. Taylor expanded in F around -inf

                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites63.6%

                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                                  2. Taylor expanded in B around 0

                                                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{-1}{6} \cdot \left(B \cdot B\right) - 1}{B} \]
                                                  3. Step-by-step derivation
                                                    1. lower-/.f6451.8

                                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                                  4. Applied rewrites51.8%

                                                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]

                                                  if -4.29999999999999989e-4 < F < 2900

                                                  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. lower--.f64N/A

                                                      \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                    3. *-commutativeN/A

                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                    4. lower-*.f64N/A

                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                    5. lower-sqrt.f64N/A

                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                    6. lower-/.f64N/A

                                                      \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                    7. associate-+r+N/A

                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                    8. +-commutativeN/A

                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                    9. unpow2N/A

                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                    10. lower-fma.f64N/A

                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                    11. +-commutativeN/A

                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                    12. lower-fma.f6446.4

                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                  5. Applied rewrites46.4%

                                                    \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                  6. Taylor expanded in F around 0

                                                    \[\leadsto \frac{\sqrt{\frac{1}{2 + 2 \cdot x}} \cdot F - x}{B} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites46.4%

                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}} \cdot F - x}{B} \]

                                                    if 2900 < F

                                                    1. Initial program 52.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. lower--.f64N/A

                                                        \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                      3. *-commutativeN/A

                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                      4. lower-*.f64N/A

                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                      5. lower-sqrt.f64N/A

                                                        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                      6. lower-/.f64N/A

                                                        \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                      7. associate-+r+N/A

                                                        \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                      8. +-commutativeN/A

                                                        \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                      9. unpow2N/A

                                                        \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                      10. lower-fma.f64N/A

                                                        \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                      11. +-commutativeN/A

                                                        \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                      12. lower-fma.f6435.5

                                                        \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                    5. Applied rewrites35.5%

                                                      \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                    6. Taylor expanded in F around inf

                                                      \[\leadsto \frac{1 - x}{B} \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites48.8%

                                                        \[\leadsto \frac{1 - x}{B} \]
                                                    8. Recombined 3 regimes into one program.
                                                    9. Final simplification48.4%

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -0.00043:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 2900:\\ \;\;\;\;\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                                    10. Add Preprocessing

                                                    Alternative 18: 55.6% accurate, 2.7× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 8 \cdot 10^{-8}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \end{array} \end{array} \]
                                                    (FPCore (F B x)
                                                     :precision binary64
                                                     (if (<= B 8e-8)
                                                       (/ (- (/ F (sqrt (fma x 2.0 (fma F F 2.0)))) x) B)
                                                       (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
                                                    double code(double F, double B, double x) {
                                                    	double tmp;
                                                    	if (B <= 8e-8) {
                                                    		tmp = ((F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B;
                                                    	} else {
                                                    		tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    function code(F, B, x)
                                                    	tmp = 0.0
                                                    	if (B <= 8e-8)
                                                    		tmp = Float64(Float64(Float64(F / sqrt(fma(x, 2.0, fma(F, F, 2.0)))) - x) / B);
                                                    	else
                                                    		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B));
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    code[F_, B_, x_] := If[LessEqual[B, 8e-8], N[(N[(N[(F / N[Sqrt[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    \mathbf{if}\;B \leq 8 \cdot 10^{-8}:\\
                                                    \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 2 regimes
                                                    2. if B < 8.0000000000000002e-8

                                                      1. Initial program 72.7%

                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in B around 0

                                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                      4. Step-by-step derivation
                                                        1. lower-/.f64N/A

                                                          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                                        2. lower--.f64N/A

                                                          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                        3. *-commutativeN/A

                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                        4. lower-*.f64N/A

                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                        5. lower-sqrt.f64N/A

                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                        6. lower-/.f64N/A

                                                          \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                        7. associate-+r+N/A

                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                        8. +-commutativeN/A

                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                        9. unpow2N/A

                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                        10. lower-fma.f64N/A

                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                        11. +-commutativeN/A

                                                          \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                        12. lower-fma.f6454.8

                                                          \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                      5. Applied rewrites54.8%

                                                        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                      6. Step-by-step derivation
                                                        1. Applied rewrites54.9%

                                                          \[\leadsto \frac{\frac{F \cdot 1}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B} \]

                                                        if 8.0000000000000002e-8 < B

                                                        1. Initial program 82.7%

                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                        2. Add Preprocessing
                                                        3. Taylor expanded in B around 0

                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
                                                        4. Step-by-step derivation
                                                          1. *-commutativeN/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                          2. associate-*l*N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                          3. associate-*r*N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                          4. *-commutativeN/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                          5. +-commutativeN/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                          6. lower-/.f64N/A

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
                                                        5. Applied rewrites9.2%

                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.16666666666666666, F\right)}{B}} \]
                                                        6. Taylor expanded in F around -inf

                                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites15.9%

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                                          2. Taylor expanded in B around 0

                                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B} \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites47.6%

                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B} \]
                                                          4. Recombined 2 regimes into one program.
                                                          5. Final simplification52.9%

                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 8 \cdot 10^{-8}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \end{array} \]
                                                          6. Add Preprocessing

                                                          Alternative 19: 43.5% accurate, 7.8× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.9 \cdot 10^{-63}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\ \mathbf{elif}\;F \leq 0.0014:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                          (FPCore (F B x)
                                                           :precision binary64
                                                           (if (<= F -1.9e-63)
                                                             (+ (- (/ x B)) (/ (- (* -0.16666666666666666 (* B B)) 1.0) B))
                                                             (if (<= F 0.0014) (/ (- x) B) (/ (- 1.0 x) B))))
                                                          double code(double F, double B, double x) {
                                                          	double tmp;
                                                          	if (F <= -1.9e-63) {
                                                          		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                                                          	} else if (F <= 0.0014) {
                                                          		tmp = -x / B;
                                                          	} else {
                                                          		tmp = (1.0 - x) / B;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          module fmin_fmax_functions
                                                              implicit none
                                                              private
                                                              public fmax
                                                              public fmin
                                                          
                                                              interface fmax
                                                                  module procedure fmax88
                                                                  module procedure fmax44
                                                                  module procedure fmax84
                                                                  module procedure fmax48
                                                              end interface
                                                              interface fmin
                                                                  module procedure fmin88
                                                                  module procedure fmin44
                                                                  module procedure fmin84
                                                                  module procedure fmin48
                                                              end interface
                                                          contains
                                                              real(8) function fmax88(x, y) result (res)
                                                                  real(8), intent (in) :: x
                                                                  real(8), intent (in) :: y
                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                              end function
                                                              real(4) function fmax44(x, y) result (res)
                                                                  real(4), intent (in) :: x
                                                                  real(4), intent (in) :: y
                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmax84(x, y) result(res)
                                                                  real(8), intent (in) :: x
                                                                  real(4), intent (in) :: y
                                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmax48(x, y) result(res)
                                                                  real(4), intent (in) :: x
                                                                  real(8), intent (in) :: y
                                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmin88(x, y) result (res)
                                                                  real(8), intent (in) :: x
                                                                  real(8), intent (in) :: y
                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                              end function
                                                              real(4) function fmin44(x, y) result (res)
                                                                  real(4), intent (in) :: x
                                                                  real(4), intent (in) :: y
                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmin84(x, y) result(res)
                                                                  real(8), intent (in) :: x
                                                                  real(4), intent (in) :: y
                                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmin48(x, y) result(res)
                                                                  real(4), intent (in) :: x
                                                                  real(8), intent (in) :: y
                                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                              end function
                                                          end module
                                                          
                                                          real(8) function code(f, b, x)
                                                          use fmin_fmax_functions
                                                              real(8), intent (in) :: f
                                                              real(8), intent (in) :: b
                                                              real(8), intent (in) :: x
                                                              real(8) :: tmp
                                                              if (f <= (-1.9d-63)) then
                                                                  tmp = -(x / b) + ((((-0.16666666666666666d0) * (b * b)) - 1.0d0) / b)
                                                              else if (f <= 0.0014d0) 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.9e-63) {
                                                          		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                                                          	} else if (F <= 0.0014) {
                                                          		tmp = -x / B;
                                                          	} else {
                                                          		tmp = (1.0 - x) / B;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(F, B, x):
                                                          	tmp = 0
                                                          	if F <= -1.9e-63:
                                                          		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B)
                                                          	elif F <= 0.0014:
                                                          		tmp = -x / B
                                                          	else:
                                                          		tmp = (1.0 - x) / B
                                                          	return tmp
                                                          
                                                          function code(F, B, x)
                                                          	tmp = 0.0
                                                          	if (F <= -1.9e-63)
                                                          		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(-0.16666666666666666 * Float64(B * B)) - 1.0) / B));
                                                          	elseif (F <= 0.0014)
                                                          		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.9e-63)
                                                          		tmp = -(x / B) + (((-0.16666666666666666 * (B * B)) - 1.0) / B);
                                                          	elseif (F <= 0.0014)
                                                          		tmp = -x / B;
                                                          	else
                                                          		tmp = (1.0 - x) / B;
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[F_, B_, x_] := If[LessEqual[F, -1.9e-63], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0014], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          \mathbf{if}\;F \leq -1.9 \cdot 10^{-63}:\\
                                                          \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B}\\
                                                          
                                                          \mathbf{elif}\;F \leq 0.0014:\\
                                                          \;\;\;\;\frac{-x}{B}\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\frac{1 - x}{B}\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 3 regimes
                                                          2. if F < -1.90000000000000009e-63

                                                            1. Initial program 63.3%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Add Preprocessing
                                                            3. Taylor expanded in B around 0

                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\frac{1}{6} \cdot \left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B}} \]
                                                            4. Step-by-step derivation
                                                              1. *-commutativeN/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left(\left({B}^{2} \cdot F\right) \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                              2. associate-*l*N/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\left({B}^{2} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} \cdot \frac{1}{6} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                              3. associate-*r*N/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{{B}^{2} \cdot \left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right) \cdot \frac{1}{6}\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                              4. *-commutativeN/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{{B}^{2} \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)} + F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}}{B} \]
                                                              5. +-commutativeN/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}}{B} \]
                                                              6. lower-/.f64N/A

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{6} \cdot \left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right)}{B}} \]
                                                            5. Applied rewrites43.5%

                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.16666666666666666, F\right)}{B}} \]
                                                            6. Taylor expanded in F around -inf

                                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites60.7%

                                                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                                              2. Taylor expanded in B around 0

                                                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{\frac{-1}{6} \cdot \left(B \cdot B\right) - 1}{B} \]
                                                              3. Step-by-step derivation
                                                                1. lower-/.f6448.9

                                                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]
                                                              4. Applied rewrites48.9%

                                                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-0.16666666666666666 \cdot \left(B \cdot B\right) - 1}{B} \]

                                                              if -1.90000000000000009e-63 < F < 0.00139999999999999999

                                                              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. lower--.f64N/A

                                                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                3. *-commutativeN/A

                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                4. lower-*.f64N/A

                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                5. lower-sqrt.f64N/A

                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                6. lower-/.f64N/A

                                                                  \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                7. associate-+r+N/A

                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                8. +-commutativeN/A

                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                9. unpow2N/A

                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                10. lower-fma.f64N/A

                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                11. +-commutativeN/A

                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                12. lower-fma.f6446.4

                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                              5. Applied rewrites46.4%

                                                                \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                              6. Taylor expanded in F around 0

                                                                \[\leadsto \frac{-1 \cdot x}{B} \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites33.4%

                                                                  \[\leadsto \frac{-x}{B} \]

                                                                if 0.00139999999999999999 < F

                                                                1. Initial program 53.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. lower--.f64N/A

                                                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                  3. *-commutativeN/A

                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                  4. lower-*.f64N/A

                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                  5. lower-sqrt.f64N/A

                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                  6. lower-/.f64N/A

                                                                    \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                  7. associate-+r+N/A

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                  8. +-commutativeN/A

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                  9. unpow2N/A

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                  10. lower-fma.f64N/A

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                  11. +-commutativeN/A

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                  12. lower-fma.f6435.1

                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                5. Applied rewrites35.1%

                                                                  \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                6. Taylor expanded in F around inf

                                                                  \[\leadsto \frac{1 - x}{B} \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites48.3%

                                                                    \[\leadsto \frac{1 - x}{B} \]
                                                                8. Recombined 3 regimes into one program.
                                                                9. Add Preprocessing

                                                                Alternative 20: 42.7% accurate, 8.6× speedup?

                                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -7 \cdot 10^{-96}:\\ \;\;\;\;\frac{\frac{\left(-1 + x\right) \cdot \left(-1 - x\right)}{-1 + x}}{B}\\ \mathbf{elif}\;F \leq 0.0014:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                                (FPCore (F B x)
                                                                 :precision binary64
                                                                 (if (<= F -7e-96)
                                                                   (/ (/ (* (+ -1.0 x) (- -1.0 x)) (+ -1.0 x)) B)
                                                                   (if (<= F 0.0014) (/ (- x) B) (/ (- 1.0 x) B))))
                                                                double code(double F, double B, double x) {
                                                                	double tmp;
                                                                	if (F <= -7e-96) {
                                                                		tmp = (((-1.0 + x) * (-1.0 - x)) / (-1.0 + x)) / B;
                                                                	} else if (F <= 0.0014) {
                                                                		tmp = -x / B;
                                                                	} else {
                                                                		tmp = (1.0 - x) / B;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                module fmin_fmax_functions
                                                                    implicit none
                                                                    private
                                                                    public fmax
                                                                    public fmin
                                                                
                                                                    interface fmax
                                                                        module procedure fmax88
                                                                        module procedure fmax44
                                                                        module procedure fmax84
                                                                        module procedure fmax48
                                                                    end interface
                                                                    interface fmin
                                                                        module procedure fmin88
                                                                        module procedure fmin44
                                                                        module procedure fmin84
                                                                        module procedure fmin48
                                                                    end interface
                                                                contains
                                                                    real(8) function fmax88(x, y) result (res)
                                                                        real(8), intent (in) :: x
                                                                        real(8), intent (in) :: y
                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                    end function
                                                                    real(4) function fmax44(x, y) result (res)
                                                                        real(4), intent (in) :: x
                                                                        real(4), intent (in) :: y
                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                    end function
                                                                    real(8) function fmax84(x, y) result(res)
                                                                        real(8), intent (in) :: x
                                                                        real(4), intent (in) :: y
                                                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                    end function
                                                                    real(8) function fmax48(x, y) result(res)
                                                                        real(4), intent (in) :: x
                                                                        real(8), intent (in) :: y
                                                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                    end function
                                                                    real(8) function fmin88(x, y) result (res)
                                                                        real(8), intent (in) :: x
                                                                        real(8), intent (in) :: y
                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                    end function
                                                                    real(4) function fmin44(x, y) result (res)
                                                                        real(4), intent (in) :: x
                                                                        real(4), intent (in) :: y
                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                    end function
                                                                    real(8) function fmin84(x, y) result(res)
                                                                        real(8), intent (in) :: x
                                                                        real(4), intent (in) :: y
                                                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                    end function
                                                                    real(8) function fmin48(x, y) result(res)
                                                                        real(4), intent (in) :: x
                                                                        real(8), intent (in) :: y
                                                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                    end function
                                                                end module
                                                                
                                                                real(8) function code(f, b, x)
                                                                use fmin_fmax_functions
                                                                    real(8), intent (in) :: f
                                                                    real(8), intent (in) :: b
                                                                    real(8), intent (in) :: x
                                                                    real(8) :: tmp
                                                                    if (f <= (-7d-96)) then
                                                                        tmp = ((((-1.0d0) + x) * ((-1.0d0) - x)) / ((-1.0d0) + x)) / b
                                                                    else if (f <= 0.0014d0) 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 <= -7e-96) {
                                                                		tmp = (((-1.0 + x) * (-1.0 - x)) / (-1.0 + x)) / B;
                                                                	} else if (F <= 0.0014) {
                                                                		tmp = -x / B;
                                                                	} else {
                                                                		tmp = (1.0 - x) / B;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                def code(F, B, x):
                                                                	tmp = 0
                                                                	if F <= -7e-96:
                                                                		tmp = (((-1.0 + x) * (-1.0 - x)) / (-1.0 + x)) / B
                                                                	elif F <= 0.0014:
                                                                		tmp = -x / B
                                                                	else:
                                                                		tmp = (1.0 - x) / B
                                                                	return tmp
                                                                
                                                                function code(F, B, x)
                                                                	tmp = 0.0
                                                                	if (F <= -7e-96)
                                                                		tmp = Float64(Float64(Float64(Float64(-1.0 + x) * Float64(-1.0 - x)) / Float64(-1.0 + x)) / B);
                                                                	elseif (F <= 0.0014)
                                                                		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 <= -7e-96)
                                                                		tmp = (((-1.0 + x) * (-1.0 - x)) / (-1.0 + x)) / B;
                                                                	elseif (F <= 0.0014)
                                                                		tmp = -x / B;
                                                                	else
                                                                		tmp = (1.0 - x) / B;
                                                                	end
                                                                	tmp_2 = tmp;
                                                                end
                                                                
                                                                code[F_, B_, x_] := If[LessEqual[F, -7e-96], N[(N[(N[(N[(-1.0 + x), $MachinePrecision] * N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.0014], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                \begin{array}{l}
                                                                \mathbf{if}\;F \leq -7 \cdot 10^{-96}:\\
                                                                \;\;\;\;\frac{\frac{\left(-1 + x\right) \cdot \left(-1 - x\right)}{-1 + x}}{B}\\
                                                                
                                                                \mathbf{elif}\;F \leq 0.0014:\\
                                                                \;\;\;\;\frac{-x}{B}\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;\frac{1 - x}{B}\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 3 regimes
                                                                2. if F < -6.9999999999999998e-96

                                                                  1. Initial program 64.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. lower--.f64N/A

                                                                      \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                    3. *-commutativeN/A

                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                    4. lower-*.f64N/A

                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                    5. lower-sqrt.f64N/A

                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                    6. lower-/.f64N/A

                                                                      \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                    7. associate-+r+N/A

                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                    8. +-commutativeN/A

                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                    9. unpow2N/A

                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                    10. lower-fma.f64N/A

                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                    11. +-commutativeN/A

                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                    12. lower-fma.f6438.2

                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                  5. Applied rewrites38.2%

                                                                    \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                  6. Taylor expanded in F around -inf

                                                                    \[\leadsto \frac{-1 - x}{B} \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites46.9%

                                                                      \[\leadsto \frac{-1 - x}{B} \]
                                                                    2. Step-by-step derivation
                                                                      1. Applied rewrites46.9%

                                                                        \[\leadsto \frac{\frac{\left(-1 + x\right) \cdot \left(-1 - x\right)}{-1 + x}}{B} \]

                                                                      if -6.9999999999999998e-96 < F < 0.00139999999999999999

                                                                      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. lower--.f64N/A

                                                                          \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                        3. *-commutativeN/A

                                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                        4. lower-*.f64N/A

                                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                        5. lower-sqrt.f64N/A

                                                                          \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                        6. lower-/.f64N/A

                                                                          \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                        7. associate-+r+N/A

                                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                        8. +-commutativeN/A

                                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                        9. unpow2N/A

                                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                        10. lower-fma.f64N/A

                                                                          \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                        11. +-commutativeN/A

                                                                          \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                        12. lower-fma.f6447.6

                                                                          \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                      5. Applied rewrites47.6%

                                                                        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                      6. Taylor expanded in F around 0

                                                                        \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                      7. Step-by-step derivation
                                                                        1. Applied rewrites34.2%

                                                                          \[\leadsto \frac{-x}{B} \]

                                                                        if 0.00139999999999999999 < F

                                                                        1. Initial program 53.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. lower--.f64N/A

                                                                            \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                          3. *-commutativeN/A

                                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                          4. lower-*.f64N/A

                                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                          5. lower-sqrt.f64N/A

                                                                            \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                          6. lower-/.f64N/A

                                                                            \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                          7. associate-+r+N/A

                                                                            \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                          8. +-commutativeN/A

                                                                            \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                          9. unpow2N/A

                                                                            \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                          10. lower-fma.f64N/A

                                                                            \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                          11. +-commutativeN/A

                                                                            \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                          12. lower-fma.f6435.1

                                                                            \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                        5. Applied rewrites35.1%

                                                                          \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                        6. Taylor expanded in F around inf

                                                                          \[\leadsto \frac{1 - x}{B} \]
                                                                        7. Step-by-step derivation
                                                                          1. Applied rewrites48.3%

                                                                            \[\leadsto \frac{1 - x}{B} \]
                                                                        8. Recombined 3 regimes into one program.
                                                                        9. Add Preprocessing

                                                                        Alternative 21: 43.1% accurate, 13.6× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.15 \cdot 10^{-138}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 0.0014:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                                        (FPCore (F B x)
                                                                         :precision binary64
                                                                         (if (<= F -1.15e-138)
                                                                           (/ (- -1.0 x) B)
                                                                           (if (<= F 0.0014) (/ (- x) B) (/ (- 1.0 x) B))))
                                                                        double code(double F, double B, double x) {
                                                                        	double tmp;
                                                                        	if (F <= -1.15e-138) {
                                                                        		tmp = (-1.0 - x) / B;
                                                                        	} else if (F <= 0.0014) {
                                                                        		tmp = -x / B;
                                                                        	} else {
                                                                        		tmp = (1.0 - x) / B;
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        module fmin_fmax_functions
                                                                            implicit none
                                                                            private
                                                                            public fmax
                                                                            public fmin
                                                                        
                                                                            interface fmax
                                                                                module procedure fmax88
                                                                                module procedure fmax44
                                                                                module procedure fmax84
                                                                                module procedure fmax48
                                                                            end interface
                                                                            interface fmin
                                                                                module procedure fmin88
                                                                                module procedure fmin44
                                                                                module procedure fmin84
                                                                                module procedure fmin48
                                                                            end interface
                                                                        contains
                                                                            real(8) function fmax88(x, y) result (res)
                                                                                real(8), intent (in) :: x
                                                                                real(8), intent (in) :: y
                                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                            end function
                                                                            real(4) function fmax44(x, y) result (res)
                                                                                real(4), intent (in) :: x
                                                                                real(4), intent (in) :: y
                                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmax84(x, y) result(res)
                                                                                real(8), intent (in) :: x
                                                                                real(4), intent (in) :: y
                                                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmax48(x, y) result(res)
                                                                                real(4), intent (in) :: x
                                                                                real(8), intent (in) :: y
                                                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmin88(x, y) result (res)
                                                                                real(8), intent (in) :: x
                                                                                real(8), intent (in) :: y
                                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                            end function
                                                                            real(4) function fmin44(x, y) result (res)
                                                                                real(4), intent (in) :: x
                                                                                real(4), intent (in) :: y
                                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmin84(x, y) result(res)
                                                                                real(8), intent (in) :: x
                                                                                real(4), intent (in) :: y
                                                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmin48(x, y) result(res)
                                                                                real(4), intent (in) :: x
                                                                                real(8), intent (in) :: y
                                                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                            end function
                                                                        end module
                                                                        
                                                                        real(8) function code(f, b, x)
                                                                        use fmin_fmax_functions
                                                                            real(8), intent (in) :: f
                                                                            real(8), intent (in) :: b
                                                                            real(8), intent (in) :: x
                                                                            real(8) :: tmp
                                                                            if (f <= (-1.15d-138)) then
                                                                                tmp = ((-1.0d0) - x) / b
                                                                            else if (f <= 0.0014d0) 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.15e-138) {
                                                                        		tmp = (-1.0 - x) / B;
                                                                        	} else if (F <= 0.0014) {
                                                                        		tmp = -x / B;
                                                                        	} else {
                                                                        		tmp = (1.0 - x) / B;
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        def code(F, B, x):
                                                                        	tmp = 0
                                                                        	if F <= -1.15e-138:
                                                                        		tmp = (-1.0 - x) / B
                                                                        	elif F <= 0.0014:
                                                                        		tmp = -x / B
                                                                        	else:
                                                                        		tmp = (1.0 - x) / B
                                                                        	return tmp
                                                                        
                                                                        function code(F, B, x)
                                                                        	tmp = 0.0
                                                                        	if (F <= -1.15e-138)
                                                                        		tmp = Float64(Float64(-1.0 - x) / B);
                                                                        	elseif (F <= 0.0014)
                                                                        		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.15e-138)
                                                                        		tmp = (-1.0 - x) / B;
                                                                        	elseif (F <= 0.0014)
                                                                        		tmp = -x / B;
                                                                        	else
                                                                        		tmp = (1.0 - x) / B;
                                                                        	end
                                                                        	tmp_2 = tmp;
                                                                        end
                                                                        
                                                                        code[F_, B_, x_] := If[LessEqual[F, -1.15e-138], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.0014], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                                                        
                                                                        \begin{array}{l}
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        \mathbf{if}\;F \leq -1.15 \cdot 10^{-138}:\\
                                                                        \;\;\;\;\frac{-1 - x}{B}\\
                                                                        
                                                                        \mathbf{elif}\;F \leq 0.0014:\\
                                                                        \;\;\;\;\frac{-x}{B}\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;\frac{1 - x}{B}\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 3 regimes
                                                                        2. if F < -1.14999999999999995e-138

                                                                          1. Initial program 68.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. lower--.f64N/A

                                                                              \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                            3. *-commutativeN/A

                                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                            4. lower-*.f64N/A

                                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                            5. lower-sqrt.f64N/A

                                                                              \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                            6. lower-/.f64N/A

                                                                              \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                            7. associate-+r+N/A

                                                                              \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                            8. +-commutativeN/A

                                                                              \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                            9. unpow2N/A

                                                                              \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                            10. lower-fma.f64N/A

                                                                              \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                            11. +-commutativeN/A

                                                                              \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                            12. lower-fma.f6437.6

                                                                              \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                          5. Applied rewrites37.6%

                                                                            \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                          6. Taylor expanded in F around -inf

                                                                            \[\leadsto \frac{-1 - x}{B} \]
                                                                          7. Step-by-step derivation
                                                                            1. Applied rewrites44.2%

                                                                              \[\leadsto \frac{-1 - x}{B} \]

                                                                            if -1.14999999999999995e-138 < F < 0.00139999999999999999

                                                                            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. lower--.f64N/A

                                                                                \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                              3. *-commutativeN/A

                                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                              4. lower-*.f64N/A

                                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                              5. lower-sqrt.f64N/A

                                                                                \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                              6. lower-/.f64N/A

                                                                                \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                              7. associate-+r+N/A

                                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                              8. +-commutativeN/A

                                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                              9. unpow2N/A

                                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                              10. lower-fma.f64N/A

                                                                                \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                              11. +-commutativeN/A

                                                                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                              12. lower-fma.f6448.7

                                                                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                            5. Applied rewrites48.7%

                                                                              \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                            6. Taylor expanded in F around 0

                                                                              \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                            7. Step-by-step derivation
                                                                              1. Applied rewrites35.3%

                                                                                \[\leadsto \frac{-x}{B} \]

                                                                              if 0.00139999999999999999 < F

                                                                              1. Initial program 53.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. lower--.f64N/A

                                                                                  \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                                3. *-commutativeN/A

                                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                4. lower-*.f64N/A

                                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                5. lower-sqrt.f64N/A

                                                                                  \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                6. lower-/.f64N/A

                                                                                  \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                7. associate-+r+N/A

                                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                                8. +-commutativeN/A

                                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                9. unpow2N/A

                                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                                10. lower-fma.f64N/A

                                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                11. +-commutativeN/A

                                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                                12. lower-fma.f6435.1

                                                                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                              5. Applied rewrites35.1%

                                                                                \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                              6. Taylor expanded in F around inf

                                                                                \[\leadsto \frac{1 - x}{B} \]
                                                                              7. Step-by-step derivation
                                                                                1. Applied rewrites48.3%

                                                                                  \[\leadsto \frac{1 - x}{B} \]
                                                                              8. Recombined 3 regimes into one program.
                                                                              9. Add Preprocessing

                                                                              Alternative 22: 35.9% accurate, 17.5× speedup?

                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.15 \cdot 10^{-138}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \end{array} \]
                                                                              (FPCore (F B x)
                                                                               :precision binary64
                                                                               (if (<= F -1.15e-138) (/ (- -1.0 x) B) (/ (- x) B)))
                                                                              double code(double F, double B, double x) {
                                                                              	double tmp;
                                                                              	if (F <= -1.15e-138) {
                                                                              		tmp = (-1.0 - x) / B;
                                                                              	} else {
                                                                              		tmp = -x / B;
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              module fmin_fmax_functions
                                                                                  implicit none
                                                                                  private
                                                                                  public fmax
                                                                                  public fmin
                                                                              
                                                                                  interface fmax
                                                                                      module procedure fmax88
                                                                                      module procedure fmax44
                                                                                      module procedure fmax84
                                                                                      module procedure fmax48
                                                                                  end interface
                                                                                  interface fmin
                                                                                      module procedure fmin88
                                                                                      module procedure fmin44
                                                                                      module procedure fmin84
                                                                                      module procedure fmin48
                                                                                  end interface
                                                                              contains
                                                                                  real(8) function fmax88(x, y) result (res)
                                                                                      real(8), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(4) function fmax44(x, y) result (res)
                                                                                      real(4), intent (in) :: x
                                                                                      real(4), intent (in) :: y
                                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmax84(x, y) result(res)
                                                                                      real(8), intent (in) :: x
                                                                                      real(4), intent (in) :: y
                                                                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmax48(x, y) result(res)
                                                                                      real(4), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmin88(x, y) result (res)
                                                                                      real(8), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(4) function fmin44(x, y) result (res)
                                                                                      real(4), intent (in) :: x
                                                                                      real(4), intent (in) :: y
                                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmin84(x, y) result(res)
                                                                                      real(8), intent (in) :: x
                                                                                      real(4), intent (in) :: y
                                                                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmin48(x, y) result(res)
                                                                                      real(4), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                  end function
                                                                              end module
                                                                              
                                                                              real(8) function code(f, b, x)
                                                                              use fmin_fmax_functions
                                                                                  real(8), intent (in) :: f
                                                                                  real(8), intent (in) :: b
                                                                                  real(8), intent (in) :: x
                                                                                  real(8) :: tmp
                                                                                  if (f <= (-1.15d-138)) 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.15e-138) {
                                                                              		tmp = (-1.0 - x) / B;
                                                                              	} else {
                                                                              		tmp = -x / B;
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              def code(F, B, x):
                                                                              	tmp = 0
                                                                              	if F <= -1.15e-138:
                                                                              		tmp = (-1.0 - x) / B
                                                                              	else:
                                                                              		tmp = -x / B
                                                                              	return tmp
                                                                              
                                                                              function code(F, B, x)
                                                                              	tmp = 0.0
                                                                              	if (F <= -1.15e-138)
                                                                              		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.15e-138)
                                                                              		tmp = (-1.0 - x) / B;
                                                                              	else
                                                                              		tmp = -x / B;
                                                                              	end
                                                                              	tmp_2 = tmp;
                                                                              end
                                                                              
                                                                              code[F_, B_, x_] := If[LessEqual[F, -1.15e-138], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
                                                                              
                                                                              \begin{array}{l}
                                                                              
                                                                              \\
                                                                              \begin{array}{l}
                                                                              \mathbf{if}\;F \leq -1.15 \cdot 10^{-138}:\\
                                                                              \;\;\;\;\frac{-1 - x}{B}\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;\frac{-x}{B}\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Split input into 2 regimes
                                                                              2. if F < -1.14999999999999995e-138

                                                                                1. Initial program 68.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. lower--.f64N/A

                                                                                    \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                                  3. *-commutativeN/A

                                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                  4. lower-*.f64N/A

                                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                  5. lower-sqrt.f64N/A

                                                                                    \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                  6. lower-/.f64N/A

                                                                                    \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                  7. associate-+r+N/A

                                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                                  8. +-commutativeN/A

                                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                  9. unpow2N/A

                                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                                  10. lower-fma.f64N/A

                                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                  11. +-commutativeN/A

                                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                                  12. lower-fma.f6437.6

                                                                                    \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                                5. Applied rewrites37.6%

                                                                                  \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                                6. Taylor expanded in F around -inf

                                                                                  \[\leadsto \frac{-1 - x}{B} \]
                                                                                7. Step-by-step derivation
                                                                                  1. Applied rewrites44.2%

                                                                                    \[\leadsto \frac{-1 - x}{B} \]

                                                                                  if -1.14999999999999995e-138 < F

                                                                                  1. Initial program 78.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. lower--.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                                    3. *-commutativeN/A

                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                    4. lower-*.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                    5. lower-sqrt.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                    6. lower-/.f64N/A

                                                                                      \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                    7. associate-+r+N/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                                    8. +-commutativeN/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                    9. unpow2N/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                                    10. lower-fma.f64N/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                    11. +-commutativeN/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                                    12. lower-fma.f6442.5

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                                  5. Applied rewrites42.5%

                                                                                    \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                                  6. Taylor expanded in F around 0

                                                                                    \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                                  7. Step-by-step derivation
                                                                                    1. Applied rewrites31.0%

                                                                                      \[\leadsto \frac{-x}{B} \]
                                                                                  8. Recombined 2 regimes into one program.
                                                                                  9. Add Preprocessing

                                                                                  Alternative 23: 29.3% 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;
                                                                                  }
                                                                                  
                                                                                  module fmin_fmax_functions
                                                                                      implicit none
                                                                                      private
                                                                                      public fmax
                                                                                      public fmin
                                                                                  
                                                                                      interface fmax
                                                                                          module procedure fmax88
                                                                                          module procedure fmax44
                                                                                          module procedure fmax84
                                                                                          module procedure fmax48
                                                                                      end interface
                                                                                      interface fmin
                                                                                          module procedure fmin88
                                                                                          module procedure fmin44
                                                                                          module procedure fmin84
                                                                                          module procedure fmin48
                                                                                      end interface
                                                                                  contains
                                                                                      real(8) function fmax88(x, y) result (res)
                                                                                          real(8), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(4) function fmax44(x, y) result (res)
                                                                                          real(4), intent (in) :: x
                                                                                          real(4), intent (in) :: y
                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmax84(x, y) result(res)
                                                                                          real(8), intent (in) :: x
                                                                                          real(4), intent (in) :: y
                                                                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmax48(x, y) result(res)
                                                                                          real(4), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmin88(x, y) result (res)
                                                                                          real(8), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(4) function fmin44(x, y) result (res)
                                                                                          real(4), intent (in) :: x
                                                                                          real(4), intent (in) :: y
                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmin84(x, y) result(res)
                                                                                          real(8), intent (in) :: x
                                                                                          real(4), intent (in) :: y
                                                                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmin48(x, y) result(res)
                                                                                          real(4), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                      end function
                                                                                  end module
                                                                                  
                                                                                  real(8) function code(f, b, x)
                                                                                  use fmin_fmax_functions
                                                                                      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.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. lower--.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}}{B} \]
                                                                                    3. *-commutativeN/A

                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                    4. lower-*.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot F} - x}{B} \]
                                                                                    5. lower-sqrt.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                    6. lower-/.f64N/A

                                                                                      \[\leadsto \frac{\sqrt{\color{blue}{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \cdot F - x}{B} \]
                                                                                    7. associate-+r+N/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\left(2 + 2 \cdot x\right) + {F}^{2}}}} \cdot F - x}{B} \]
                                                                                    8. +-commutativeN/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + \left(2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                    9. unpow2N/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + \left(2 + 2 \cdot x\right)}} \cdot F - x}{B} \]
                                                                                    10. lower-fma.f64N/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\color{blue}{\mathsf{fma}\left(F, F, 2 + 2 \cdot x\right)}}} \cdot F - x}{B} \]
                                                                                    11. +-commutativeN/A

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{2 \cdot x + 2}\right)}} \cdot F - x}{B} \]
                                                                                    12. lower-fma.f6441.1

                                                                                      \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \color{blue}{\mathsf{fma}\left(2, x, 2\right)}\right)}} \cdot F - x}{B} \]
                                                                                  5. Applied rewrites41.1%

                                                                                    \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot F - x}{B}} \]
                                                                                  6. Taylor expanded in F around 0

                                                                                    \[\leadsto \frac{-1 \cdot x}{B} \]
                                                                                  7. Step-by-step derivation
                                                                                    1. Applied rewrites28.7%

                                                                                      \[\leadsto \frac{-x}{B} \]
                                                                                    2. Add Preprocessing

                                                                                    Reproduce

                                                                                    ?
                                                                                    herbie shell --seed 2024351 
                                                                                    (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))))))