VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.7% → 99.4%
Time: 8.7s
Alternatives: 26
Speedup: 2.1×

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 26 alternatives:

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

Initial Program: 76.7% 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.4% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 32.9%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. 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 \mathsf{neg}\left(\left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)\right) \]
      2. lower-neg.f64N/A

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

        \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
      4. lower-/.f64N/A

        \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
      5. lower-+.f64N/A

        \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
      6. *-commutativeN/A

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

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

        \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
      9. lift-sin.f6499.9

        \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
    5. Applied rewrites99.9%

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

    if -8.49999999999999982e160 < F < 1.31999999999999998e154

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.31999999999999998e154 < F

    1. Initial program 25.4%

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

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

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

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

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

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

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

        \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
      7. lift-sin.f6499.7

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

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

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

Alternative 2: 99.6% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 55.2%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in 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 \mathsf{neg}\left(\left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)\right) \]
      2. lower-neg.f64N/A

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

        \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
      4. lower-/.f64N/A

        \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
      5. lower-+.f64N/A

        \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
      6. *-commutativeN/A

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

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

        \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
      9. lift-sin.f6499.8

        \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
    5. Applied rewrites99.8%

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

    if -9.9999999999999992e22 < F < 230

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 230 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 99.1% accurate, 1.4× speedup?

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

      1. Initial program 55.2%

        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in 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 \mathsf{neg}\left(\left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)\right) \]
        2. lower-neg.f64N/A

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

          \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
        4. lower-/.f64N/A

          \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
        5. lower-+.f64N/A

          \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
        6. *-commutativeN/A

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

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

          \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
        9. lift-sin.f6499.8

          \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
      5. Applied rewrites99.8%

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

      if -1.75 < F < 1.6000000000000001

      1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.6000000000000001 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 92.4% accurate, 1.4× speedup?

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

          1. Initial program 55.2%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in 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 \mathsf{neg}\left(\left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)\right) \]
            2. lower-neg.f64N/A

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

              \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
            4. lower-/.f64N/A

              \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
            5. lower-+.f64N/A

              \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
            6. *-commutativeN/A

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

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

              \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
            9. lift-sin.f6499.8

              \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
          5. Applied rewrites99.8%

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

          if -8.4e10 < F < 34

          1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 34 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 5: 92.3% accurate, 1.5× speedup?

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

              1. Initial program 55.2%

                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in 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 \mathsf{neg}\left(\left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)\right) \]
                2. lower-neg.f64N/A

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

                  \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
                4. lower-/.f64N/A

                  \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
                5. lower-+.f64N/A

                  \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
                6. *-commutativeN/A

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

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

                  \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
                9. lift-sin.f6499.8

                  \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
              5. Applied rewrites99.8%

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

              if -8.4e10 < F < 34

              1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 34 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 6: 92.3% accurate, 1.6× speedup?

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

                  1. Initial program 55.2%

                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                  2. Add Preprocessing
                  3. Taylor expanded in 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 \mathsf{neg}\left(\left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)\right) \]
                    2. lower-neg.f64N/A

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

                      \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
                    4. lower-/.f64N/A

                      \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
                    5. lower-+.f64N/A

                      \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
                    6. *-commutativeN/A

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

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

                      \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
                    9. lift-sin.f6499.8

                      \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
                  5. Applied rewrites99.8%

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

                  if -8.4e10 < F < 34

                  1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 34 < F

                    1. Initial program 57.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}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                    4. Step-by-step derivation
                      1. sub-divN/A

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

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

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

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

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

                        \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
                      7. lift-sin.f6499.0

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

                      \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                  11. Recombined 3 regimes into one program.
                  12. Final simplification93.5%

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

                  Alternative 7: 84.9% accurate, 1.6× speedup?

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

                    1. Initial program 57.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 \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) + \frac{-1}{\color{blue}{\sin B}} \]
                      2. lift-sin.f6498.2

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

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

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

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

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

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

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

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                      6. lower-*.f6481.9

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                    8. Applied rewrites81.9%

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

                    if -3.49999999999999995e-6 < F < 34

                    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 34 < F

                      1. Initial program 57.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}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                      4. Step-by-step derivation
                        1. sub-divN/A

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

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

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

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

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

                          \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
                        7. lift-sin.f6499.0

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

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

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

                    Alternative 8: 78.2% accurate, 2.1× speedup?

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

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -4.4999999999999998e-14 < x < 2.25e-63

                        1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\frac{-x}{B}} + \frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
                      11. Recombined 2 regimes into one program.
                      12. Final simplification82.3%

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

                      Alternative 9: 77.2% accurate, 2.1× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;x \leq -5.6 \cdot 10^{-14}:\\ \;\;\;\;t\_0 + \frac{-1}{B}\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-6}:\\ \;\;\;\;\frac{-x}{B} + \frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t\_0 + \frac{-1}{\mathsf{fma}\left(0.008333333333333333 \cdot \left(B \cdot B\right) - 0.16666666666666666, B \cdot B, 1\right) \cdot B}\\ \end{array} \end{array} \]
                      (FPCore (F B x)
                       :precision binary64
                       (let* ((t_0 (* x (/ -1.0 (tan B)))))
                         (if (<= x -5.6e-14)
                           (+ t_0 (/ -1.0 B))
                           (if (<= x 6.5e-6)
                             (+
                              (/ (- x) B)
                              (/ (* F (/ 1.0 (sqrt (fma 2.0 x (fma F F 2.0))))) (sin B)))
                             (+
                              t_0
                              (/
                               -1.0
                               (*
                                (fma
                                 (- (* 0.008333333333333333 (* B B)) 0.16666666666666666)
                                 (* B B)
                                 1.0)
                                B)))))))
                      double code(double F, double B, double x) {
                      	double t_0 = x * (-1.0 / tan(B));
                      	double tmp;
                      	if (x <= -5.6e-14) {
                      		tmp = t_0 + (-1.0 / B);
                      	} else if (x <= 6.5e-6) {
                      		tmp = (-x / B) + ((F * (1.0 / sqrt(fma(2.0, x, fma(F, F, 2.0))))) / sin(B));
                      	} else {
                      		tmp = t_0 + (-1.0 / (fma(((0.008333333333333333 * (B * B)) - 0.16666666666666666), (B * B), 1.0) * B));
                      	}
                      	return tmp;
                      }
                      
                      function code(F, B, x)
                      	t_0 = Float64(x * Float64(-1.0 / tan(B)))
                      	tmp = 0.0
                      	if (x <= -5.6e-14)
                      		tmp = Float64(t_0 + Float64(-1.0 / B));
                      	elseif (x <= 6.5e-6)
                      		tmp = Float64(Float64(Float64(-x) / B) + Float64(Float64(F * Float64(1.0 / sqrt(fma(2.0, x, fma(F, F, 2.0))))) / sin(B)));
                      	else
                      		tmp = Float64(t_0 + Float64(-1.0 / Float64(fma(Float64(Float64(0.008333333333333333 * Float64(B * B)) - 0.16666666666666666), Float64(B * B), 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, -5.6e-14], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e-6], N[(N[((-x) / B), $MachinePrecision] + N[(N[(F * N[(1.0 / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(-1.0 / N[(N[(N[(N[(0.008333333333333333 * N[(B * B), $MachinePrecision]), $MachinePrecision] - 0.16666666666666666), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_0 := x \cdot \frac{-1}{\tan B}\\
                      \mathbf{if}\;x \leq -5.6 \cdot 10^{-14}:\\
                      \;\;\;\;t\_0 + \frac{-1}{B}\\
                      
                      \mathbf{elif}\;x \leq 6.5 \cdot 10^{-6}:\\
                      \;\;\;\;\frac{-x}{B} + \frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_0 + \frac{-1}{\mathsf{fma}\left(0.008333333333333333 \cdot \left(B \cdot B\right) - 0.16666666666666666, B \cdot B, 1\right) \cdot B}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if x < -5.6000000000000001e-14

                        1. Initial program 61.4%

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

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

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

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
                        5. Applied rewrites90.0%

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

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

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

                          if -5.6000000000000001e-14 < x < 6.4999999999999996e-6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 6.4999999999999996e-6 < x

                          1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\left(\left(\frac{1}{120} \cdot {B}^{2} - \frac{1}{6}\right) \cdot {B}^{2} + 1\right) \cdot B} \]
                            5. lower-fma.f64N/A

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

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

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

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

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

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(\frac{1}{120} \cdot \left(B \cdot B\right) - \frac{1}{6}, B \cdot B, 1\right) \cdot B} \]
                            11. lower-*.f6496.7

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(0.008333333333333333 \cdot \left(B \cdot B\right) - 0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                          8. Applied rewrites96.7%

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(0.008333333333333333 \cdot \left(B \cdot B\right) - 0.16666666666666666, B \cdot B, 1\right) \cdot \color{blue}{B}} \]
                        8. Recombined 3 regimes into one program.
                        9. Final simplification81.3%

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

                        Alternative 10: 56.8% accurate, 2.2× speedup?

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

                          1. Initial program 72.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}} \cdot F - x}{B} \]
                            11. lift-fma.f6464.5

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

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

                          if 0.00115 < B

                          1. Initial program 87.9%

                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          2. Add Preprocessing
                          3. Taylor expanded in 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) + \frac{-1}{\color{blue}{\sin B}} \]
                            2. lift-sin.f6459.2

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

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

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

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

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

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

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\left(\left(\frac{1}{120} \cdot {B}^{2} - \frac{1}{6}\right) \cdot {B}^{2} + 1\right) \cdot B} \]
                            5. lower-fma.f64N/A

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

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

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

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

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

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(\frac{1}{120} \cdot \left(B \cdot B\right) - \frac{1}{6}, B \cdot B, 1\right) \cdot B} \]
                            11. lower-*.f6460.2

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(0.008333333333333333 \cdot \left(B \cdot B\right) - 0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                          8. Applied rewrites60.2%

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(0.008333333333333333 \cdot \left(B \cdot B\right) - 0.16666666666666666, B \cdot B, 1\right) \cdot \color{blue}{B}} \]
                        3. Recombined 2 regimes into one program.
                        4. Final simplification63.3%

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

                        Alternative 11: 56.6% accurate, 2.4× speedup?

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

                          1. Initial program 72.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}} \cdot F - x}{B} \]
                            11. lift-fma.f6464.5

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

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

                          if 0.00115 < B

                          1. Initial program 87.9%

                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          2. Add Preprocessing
                          3. Taylor expanded in 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) + \frac{-1}{\color{blue}{\sin B}} \]
                            2. lift-sin.f6459.2

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

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

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

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

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

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

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

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                            6. lower-*.f6459.2

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                          8. Applied rewrites59.2%

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot \color{blue}{B}} \]
                        3. Recombined 2 regimes into one program.
                        4. Final simplification63.0%

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

                        Alternative 12: 56.0% accurate, 2.7× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 0.0012:\\ \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - 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 0.0012)
                           (/ (- (* (sqrt (/ 1.0 (fma 2.0 x (fma F F 2.0)))) F) x) B)
                           (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
                        double code(double F, double B, double x) {
                        	double tmp;
                        	if (B <= 0.0012) {
                        		tmp = ((sqrt((1.0 / fma(2.0, x, fma(F, F, 2.0)))) * F) - x) / B;
                        	} else {
                        		tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
                        	}
                        	return tmp;
                        }
                        
                        function code(F, B, x)
                        	tmp = 0.0
                        	if (B <= 0.0012)
                        		tmp = Float64(Float64(Float64(sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))) * F) - 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, 0.0012], N[(N[(N[(N[Sqrt[N[(1.0 / N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F), $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 0.0012:\\
                        \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - 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 < 0.00119999999999999989

                          1. Initial program 72.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}} \cdot F - x}{B} \]
                            11. lift-fma.f6464.5

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

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

                          if 0.00119999999999999989 < B

                          1. Initial program 87.9%

                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          2. Add Preprocessing
                          3. Taylor expanded in 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) + \frac{-1}{\color{blue}{\sin B}} \]
                            2. lift-sin.f6459.2

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

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

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

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

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

                          Alternative 13: 58.2% accurate, 2.7× speedup?

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

                            1. Initial program 58.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 \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) + \frac{-1}{\color{blue}{\sin B}} \]
                              2. lift-sin.f6498.1

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

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

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

                                \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{-1}{\sin B} \]
                            8. Applied rewrites69.6%

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

                            if -2.74999999999999987e-11 < F < 105

                            1. Initial program 99.5%

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

                              \[\leadsto \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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                            5. Applied rewrites55.8%

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}} \cdot F - x}{B} \]
                              11. lift-fma.f6455.8

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

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

                            if 105 < F

                            1. Initial program 57.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                            5. Applied rewrites35.3%

                              \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \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. *-commutativeN/A

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

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

                                \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                              4. inv-powN/A

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

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

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

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

                                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                              9. lower-/.f649.9

                                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                            8. Applied rewrites9.9%

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

                              \[\leadsto \frac{-1}{B} \]
                            10. Step-by-step derivation
                              1. lower-/.f642.5

                                \[\leadsto \frac{-1}{B} \]
                            11. Applied rewrites2.5%

                              \[\leadsto \frac{-1}{B} \]
                            12. Taylor expanded in F around inf

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

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

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

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

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

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

                                \[\leadsto \frac{\frac{2 \cdot x + 2}{B}}{{F}^{2}} \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\frac{1}{B} - \frac{x}{B}\right) \]
                              7. pow2N/A

                                \[\leadsto \frac{\frac{2 \cdot x + 2}{B}}{F \cdot F} \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\frac{1}{B} - \frac{x}{B}\right) \]
                              8. div-subN/A

                                \[\leadsto \frac{\frac{2 \cdot x + 2}{B}}{F \cdot F} \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \frac{1 - x}{B} \]
                            14. Applied rewrites48.7%

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

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

                          Alternative 14: 47.1% accurate, 2.8× speedup?

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

                            1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}} \cdot F - x}{B} \]
                              11. lift-fma.f6463.9

                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B} \]
                            7. Applied rewrites63.9%

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

                            if 13.5 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \sqrt{{\left({F}^{2} + 2\right)}^{-1}} \cdot \frac{F}{\sin B} \]
                              7. pow2N/A

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

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

                                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
                              10. lift-/.f6428.3

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

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

                              \[\leadsto \sqrt{\frac{1}{2}} \cdot \frac{F}{\sin B} \]
                            9. Step-by-step derivation
                              1. Applied rewrites13.4%

                                \[\leadsto \sqrt{0.5} \cdot \frac{F}{\sin B} \]
                            10. Recombined 2 regimes into one program.
                            11. Final simplification49.9%

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

                            Alternative 15: 47.1% accurate, 2.8× speedup?

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

                              1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}} \cdot F - x}{B} \]
                                11. lift-fma.f6463.9

                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B} \]
                              7. Applied rewrites63.9%

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

                              if 13.5 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \sqrt{{\left({F}^{2} + 2\right)}^{-1}} \cdot \frac{F}{\sin B} \]
                                7. pow2N/A

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

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

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
                                10. lift-/.f6428.3

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\color{blue}{\sin B}} \]
                              7. Applied rewrites28.3%

                                \[\leadsto \color{blue}{\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}} \]
                              8. Taylor expanded in F around 0

                                \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\color{blue}{\sin B}} \]
                              9. Step-by-step derivation
                                1. metadata-evalN/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
                                2. metadata-evalN/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
                                3. metadata-evalN/A

                                  \[\leadsto \frac{F \cdot \sqrt{-1 \cdot \frac{-1}{2}}}{\sin B} \]
                                4. sqrt-unprodN/A

                                  \[\leadsto \frac{F \cdot \left(\sqrt{-1} \cdot \sqrt{\frac{-1}{2}}\right)}{\sin B} \]
                                5. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot \left(\sqrt{-1} \cdot \sqrt{\frac{-1}{2}}\right)}{\sin B} \]
                                6. sqrt-unprodN/A

                                  \[\leadsto \frac{F \cdot \sqrt{-1 \cdot \frac{-1}{2}}}{\sin B} \]
                                7. metadata-evalN/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
                                8. metadata-evalN/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
                                9. *-commutativeN/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F}{\sin B} \]
                                10. lower-*.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F}{\sin B} \]
                                11. lower-sqrt.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F}{\sin B} \]
                                12. metadata-evalN/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F}{\sin B} \]
                                13. lift-sin.f6413.4

                                  \[\leadsto \frac{\sqrt{0.5} \cdot F}{\sin B} \]
                              10. Applied rewrites13.4%

                                \[\leadsto \frac{\sqrt{0.5} \cdot F}{\color{blue}{\sin B}} \]
                            3. Recombined 2 regimes into one program.
                            4. Final simplification49.9%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 13.5:\\ \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{0.5} \cdot F}{\sin B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 16: 51.9% accurate, 3.0× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.05 \cdot 10^{+121}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -210000000000:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 105:\\ \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F}}{F}, -0.5, \frac{1 - x}{B}\right)\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -2.05e+121)
                               (/ (- -1.0 x) B)
                               (if (<= F -210000000000.0)
                                 (/ -1.0 (sin B))
                                 (if (<= F 105.0)
                                   (/ (- (* (sqrt (/ 1.0 (fma 2.0 x (fma F F 2.0)))) F) x) B)
                                   (fma (/ (/ (/ (fma 2.0 x 2.0) B) F) F) -0.5 (/ (- 1.0 x) B))))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -2.05e+121) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= -210000000000.0) {
                            		tmp = -1.0 / sin(B);
                            	} else if (F <= 105.0) {
                            		tmp = ((sqrt((1.0 / fma(2.0, x, fma(F, F, 2.0)))) * F) - x) / B;
                            	} else {
                            		tmp = fma((((fma(2.0, x, 2.0) / B) / F) / F), -0.5, ((1.0 - x) / B));
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -2.05e+121)
                            		tmp = Float64(Float64(-1.0 - x) / B);
                            	elseif (F <= -210000000000.0)
                            		tmp = Float64(-1.0 / sin(B));
                            	elseif (F <= 105.0)
                            		tmp = Float64(Float64(Float64(sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))) * F) - x) / B);
                            	else
                            		tmp = fma(Float64(Float64(Float64(fma(2.0, x, 2.0) / B) / F) / F), -0.5, Float64(Float64(1.0 - x) / B));
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -2.05e+121], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -210000000000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 105.0], N[(N[(N[(N[Sqrt[N[(1.0 / N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(N[(N[(2.0 * x + 2.0), $MachinePrecision] / B), $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision] * -0.5 + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -2.05 \cdot 10^{+121}:\\
                            \;\;\;\;\frac{-1 - x}{B}\\
                            
                            \mathbf{elif}\;F \leq -210000000000:\\
                            \;\;\;\;\frac{-1}{\sin B}\\
                            
                            \mathbf{elif}\;F \leq 105:\\
                            \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\mathsf{fma}\left(\frac{\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F}}{F}, -0.5, \frac{1 - x}{B}\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 4 regimes
                            2. if F < -2.05e121

                              1. Initial program 35.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites45.0%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around -inf

                                \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                              7. Step-by-step derivation
                                1. distribute-lft-inN/A

                                  \[\leadsto \frac{-1 \cdot 1 + -1 \cdot x}{B} \]
                                2. metadata-evalN/A

                                  \[\leadsto \frac{-1 + -1 \cdot x}{B} \]
                                3. mul-1-negN/A

                                  \[\leadsto \frac{-1 + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                4. lower-+.f64N/A

                                  \[\leadsto \frac{-1 + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                5. lift-neg.f6458.8

                                  \[\leadsto \frac{-1 + \left(-x\right)}{B} \]
                              8. Applied rewrites58.8%

                                \[\leadsto \frac{-1 + \left(-x\right)}{B} \]

                              if -2.05e121 < F < -2.1e11

                              1. Initial program 89.9%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                2. lift-/.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                3. lift-sin.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                4. lift-pow.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                5. lift-+.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(-\frac{1}{2}\right)} \]
                                6. lift-+.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                7. lift-*.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                8. lift-*.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(-\frac{1}{2}\right)} \]
                                9. lift-neg.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
                                10. lift-/.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
                                11. associate-*l/N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
                                12. lower-/.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
                              4. Applied rewrites99.5%

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} \]
                              5. Taylor expanded in x around 0

                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
                              6. Step-by-step derivation
                                1. *-commutativeN/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \color{blue}{\frac{F}{\sin B}} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \color{blue}{\frac{F}{\sin B}} \]
                                3. lower-sqrt.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
                                4. inv-powN/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{\sin B} \]
                                5. lower-pow.f64N/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{\sin B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \sqrt{{\left({F}^{2} + 2\right)}^{-1}} \cdot \frac{F}{\sin B} \]
                                7. pow2N/A

                                  \[\leadsto \sqrt{{\left(F \cdot F + 2\right)}^{-1}} \cdot \frac{F}{\sin B} \]
                                8. lift-fma.f64N/A

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
                                9. lift-sin.f64N/A

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
                                10. lift-/.f6464.4

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\color{blue}{\sin B}} \]
                              7. Applied rewrites64.4%

                                \[\leadsto \color{blue}{\sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B}} \]
                              8. Taylor expanded in F around -inf

                                \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                              9. Step-by-step derivation
                                1. lift-sin.f64N/A

                                  \[\leadsto \frac{-1}{\sin B} \]
                                2. lift-/.f6474.0

                                  \[\leadsto \frac{-1}{\sin B} \]
                              10. Applied rewrites74.0%

                                \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]

                              if -2.1e11 < F < 105

                              1. Initial program 99.5%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites55.3%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Step-by-step derivation
                                1. lift-pow.f64N/A

                                  \[\leadsto \frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B} \]
                                2. lift-+.f64N/A

                                  \[\leadsto \frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B} \]
                                3. lift-*.f64N/A

                                  \[\leadsto \frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B} \]
                                4. lift-fma.f64N/A

                                  \[\leadsto \frac{\sqrt{{\left(\left(2 \cdot x + F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B} \]
                                5. unpow-1N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\left(2 \cdot x + F \cdot F\right) + 2}} \cdot F - x}{B} \]
                                6. lower-/.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\left(2 \cdot x + F \cdot F\right) + 2}} \cdot F - x}{B} \]
                                7. pow2N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\left(2 \cdot x + {F}^{2}\right) + 2}} \cdot F - x}{B} \]
                                8. associate-+r+N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \left({F}^{2} + 2\right)}} \cdot F - x}{B} \]
                                9. pow2N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \left(F \cdot F + 2\right)}} \cdot F - x}{B} \]
                                10. lift-fma.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}} \cdot F - x}{B} \]
                                11. lift-fma.f6455.3

                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B} \]
                              7. Applied rewrites55.3%

                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B} \]

                              if 105 < F

                              1. Initial program 57.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites35.3%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \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. *-commutativeN/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                3. lower-sqrt.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                                4. inv-powN/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                5. lower-pow.f64N/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \sqrt{{\left({F}^{2} + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                7. pow2N/A

                                  \[\leadsto \sqrt{{\left(F \cdot F + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                8. lift-fma.f64N/A

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                                9. lower-/.f649.9

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                              8. Applied rewrites9.9%

                                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \color{blue}{\frac{F}{B}} \]
                              9. Taylor expanded in F around -inf

                                \[\leadsto \frac{-1}{B} \]
                              10. Step-by-step derivation
                                1. lower-/.f642.5

                                  \[\leadsto \frac{-1}{B} \]
                              11. Applied rewrites2.5%

                                \[\leadsto \frac{-1}{B} \]
                              12. Taylor expanded in F around inf

                                \[\leadsto \left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} + \frac{1}{B}\right) - \color{blue}{\frac{x}{B}} \]
                              13. Step-by-step derivation
                                1. metadata-evalN/A

                                  \[\leadsto \left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} + \frac{1}{B}\right) - \frac{x}{B} \]
                                2. metadata-evalN/A

                                  \[\leadsto \left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} + \frac{1}{B}\right) - \frac{x}{B} \]
                                3. associate--l+N/A

                                  \[\leadsto \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} + \left(\frac{1}{B} - \color{blue}{\frac{x}{B}}\right) \]
                                4. *-commutativeN/A

                                  \[\leadsto \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\frac{1}{B} - \frac{\color{blue}{x}}{B}\right) \]
                                5. +-commutativeN/A

                                  \[\leadsto \frac{2 \cdot x + 2}{B \cdot {F}^{2}} \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\frac{1}{B} - \frac{x}{B}\right) \]
                                6. associate-/l/N/A

                                  \[\leadsto \frac{\frac{2 \cdot x + 2}{B}}{{F}^{2}} \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\frac{1}{B} - \frac{x}{B}\right) \]
                                7. pow2N/A

                                  \[\leadsto \frac{\frac{2 \cdot x + 2}{B}}{F \cdot F} \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\frac{1}{B} - \frac{x}{B}\right) \]
                                8. div-subN/A

                                  \[\leadsto \frac{\frac{2 \cdot x + 2}{B}}{F \cdot F} \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \frac{1 - x}{B} \]
                              14. Applied rewrites48.7%

                                \[\leadsto \mathsf{fma}\left(\frac{\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F}}{F}, \color{blue}{-0.5}, \frac{1 - x}{B}\right) \]
                            3. Recombined 4 regimes into one program.
                            4. Final simplification55.1%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.05 \cdot 10^{+121}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -210000000000:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 105:\\ \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F}}{F}, -0.5, \frac{1 - x}{B}\right)\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 17: 51.1% accurate, 5.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.5 \cdot 10^{-6}:\\ \;\;\;\;\mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, 0.5, \frac{-1 - x}{B}\right)\\ \mathbf{elif}\;F \leq 105:\\ \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F}}{F}, -0.5, \frac{1 - x}{B}\right)\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -3.5e-6)
                               (fma (/ 2.0 (* (* F F) B)) 0.5 (/ (- -1.0 x) B))
                               (if (<= F 105.0)
                                 (/ (- (* (sqrt (/ 1.0 (fma 2.0 x (fma F F 2.0)))) F) x) B)
                                 (fma (/ (/ (/ (fma 2.0 x 2.0) B) F) F) -0.5 (/ (- 1.0 x) B)))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -3.5e-6) {
                            		tmp = fma((2.0 / ((F * F) * B)), 0.5, ((-1.0 - x) / B));
                            	} else if (F <= 105.0) {
                            		tmp = ((sqrt((1.0 / fma(2.0, x, fma(F, F, 2.0)))) * F) - x) / B;
                            	} else {
                            		tmp = fma((((fma(2.0, x, 2.0) / B) / F) / F), -0.5, ((1.0 - x) / B));
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -3.5e-6)
                            		tmp = fma(Float64(2.0 / Float64(Float64(F * F) * B)), 0.5, Float64(Float64(-1.0 - x) / B));
                            	elseif (F <= 105.0)
                            		tmp = Float64(Float64(Float64(sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))) * F) - x) / B);
                            	else
                            		tmp = fma(Float64(Float64(Float64(fma(2.0, x, 2.0) / B) / F) / F), -0.5, Float64(Float64(1.0 - x) / B));
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -3.5e-6], N[(N[(2.0 / N[(N[(F * F), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] * 0.5 + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 105.0], N[(N[(N[(N[Sqrt[N[(1.0 / N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(N[(N[(2.0 * x + 2.0), $MachinePrecision] / B), $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision] * -0.5 + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -3.5 \cdot 10^{-6}:\\
                            \;\;\;\;\mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, 0.5, \frac{-1 - x}{B}\right)\\
                            
                            \mathbf{elif}\;F \leq 105:\\
                            \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\mathsf{fma}\left(\frac{\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F}}{F}, -0.5, \frac{1 - x}{B}\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -3.49999999999999995e-6

                              1. Initial program 57.5%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites46.7%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around -inf

                                \[\leadsto -1 \cdot \frac{1 + x}{B} + \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}}} \]
                              7. Step-by-step derivation
                                1. metadata-evalN/A

                                  \[\leadsto -1 \cdot \frac{1 + x}{B} + \frac{1}{2} \cdot \frac{2 + 2 \cdot x}{\color{blue}{B} \cdot {F}^{2}} \]
                                2. +-commutativeN/A

                                  \[\leadsto \frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} + -1 \cdot \color{blue}{\frac{1 + x}{B}} \]
                                3. *-commutativeN/A

                                  \[\leadsto \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} \cdot \frac{1}{2} + -1 \cdot \frac{\color{blue}{1 + x}}{B} \]
                                4. lower-fma.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{2 + 2 \cdot x}{B \cdot {F}^{2}}, \frac{1}{\color{blue}{2}}, -1 \cdot \frac{1 + x}{B}\right) \]
                                5. associate-/r*N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{2 + 2 \cdot x}{B}}{{F}^{2}}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                6. lower-/.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{2 + 2 \cdot x}{B}}{{F}^{2}}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                7. lower-/.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{2 + 2 \cdot x}{B}}{{F}^{2}}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                8. +-commutativeN/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{2 \cdot x + 2}{B}}{{F}^{2}}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                9. lift-fma.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{{F}^{2}}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                10. pow2N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                11. lift-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                12. metadata-evalN/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                13. associate-*r/N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, \frac{1}{2}, \frac{-1 \cdot \left(1 + x\right)}{B}\right) \]
                              8. Applied rewrites44.8%

                                \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, \color{blue}{0.5}, \frac{-1 + \left(-x\right)}{B}\right) \]
                              9. Taylor expanded in x around 0

                                \[\leadsto \mathsf{fma}\left(\frac{2}{B \cdot {F}^{2}}, \frac{1}{2}, \frac{-1 + \left(-x\right)}{B}\right) \]
                              10. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{2}{B \cdot {F}^{2}}, \frac{1}{2}, \frac{-1 + \left(-x\right)}{B}\right) \]
                                2. *-commutativeN/A

                                  \[\leadsto \mathsf{fma}\left(\frac{2}{{F}^{2} \cdot B}, \frac{1}{2}, \frac{-1 + \left(-x\right)}{B}\right) \]
                                3. lower-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{2}{{F}^{2} \cdot B}, \frac{1}{2}, \frac{-1 + \left(-x\right)}{B}\right) \]
                                4. pow2N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, \frac{1}{2}, \frac{-1 + \left(-x\right)}{B}\right) \]
                                5. lift-*.f6455.3

                                  \[\leadsto \mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, 0.5, \frac{-1 + \left(-x\right)}{B}\right) \]
                              11. Applied rewrites55.3%

                                \[\leadsto \mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, 0.5, \frac{-1 + \left(-x\right)}{B}\right) \]

                              if -3.49999999999999995e-6 < F < 105

                              1. Initial program 99.5%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites55.7%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Step-by-step derivation
                                1. lift-pow.f64N/A

                                  \[\leadsto \frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B} \]
                                2. lift-+.f64N/A

                                  \[\leadsto \frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B} \]
                                3. lift-*.f64N/A

                                  \[\leadsto \frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B} \]
                                4. lift-fma.f64N/A

                                  \[\leadsto \frac{\sqrt{{\left(\left(2 \cdot x + F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B} \]
                                5. unpow-1N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\left(2 \cdot x + F \cdot F\right) + 2}} \cdot F - x}{B} \]
                                6. lower-/.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\left(2 \cdot x + F \cdot F\right) + 2}} \cdot F - x}{B} \]
                                7. pow2N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\left(2 \cdot x + {F}^{2}\right) + 2}} \cdot F - x}{B} \]
                                8. associate-+r+N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \left({F}^{2} + 2\right)}} \cdot F - x}{B} \]
                                9. pow2N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \left(F \cdot F + 2\right)}} \cdot F - x}{B} \]
                                10. lift-fma.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}} \cdot F - x}{B} \]
                                11. lift-fma.f6455.7

                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B} \]
                              7. Applied rewrites55.7%

                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B} \]

                              if 105 < F

                              1. Initial program 57.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites35.3%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \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. *-commutativeN/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                3. lower-sqrt.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                                4. inv-powN/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                5. lower-pow.f64N/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \sqrt{{\left({F}^{2} + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                7. pow2N/A

                                  \[\leadsto \sqrt{{\left(F \cdot F + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                8. lift-fma.f64N/A

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                                9. lower-/.f649.9

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                              8. Applied rewrites9.9%

                                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \color{blue}{\frac{F}{B}} \]
                              9. Taylor expanded in F around -inf

                                \[\leadsto \frac{-1}{B} \]
                              10. Step-by-step derivation
                                1. lower-/.f642.5

                                  \[\leadsto \frac{-1}{B} \]
                              11. Applied rewrites2.5%

                                \[\leadsto \frac{-1}{B} \]
                              12. Taylor expanded in F around inf

                                \[\leadsto \left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} + \frac{1}{B}\right) - \color{blue}{\frac{x}{B}} \]
                              13. Step-by-step derivation
                                1. metadata-evalN/A

                                  \[\leadsto \left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} + \frac{1}{B}\right) - \frac{x}{B} \]
                                2. metadata-evalN/A

                                  \[\leadsto \left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} + \frac{1}{B}\right) - \frac{x}{B} \]
                                3. associate--l+N/A

                                  \[\leadsto \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} + \left(\frac{1}{B} - \color{blue}{\frac{x}{B}}\right) \]
                                4. *-commutativeN/A

                                  \[\leadsto \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\frac{1}{B} - \frac{\color{blue}{x}}{B}\right) \]
                                5. +-commutativeN/A

                                  \[\leadsto \frac{2 \cdot x + 2}{B \cdot {F}^{2}} \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\frac{1}{B} - \frac{x}{B}\right) \]
                                6. associate-/l/N/A

                                  \[\leadsto \frac{\frac{2 \cdot x + 2}{B}}{{F}^{2}} \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\frac{1}{B} - \frac{x}{B}\right) \]
                                7. pow2N/A

                                  \[\leadsto \frac{\frac{2 \cdot x + 2}{B}}{F \cdot F} \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\frac{1}{B} - \frac{x}{B}\right) \]
                                8. div-subN/A

                                  \[\leadsto \frac{\frac{2 \cdot x + 2}{B}}{F \cdot F} \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \frac{1 - x}{B} \]
                              14. Applied rewrites48.7%

                                \[\leadsto \mathsf{fma}\left(\frac{\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F}}{F}, \color{blue}{-0.5}, \frac{1 - x}{B}\right) \]
                            3. Recombined 3 regimes into one program.
                            4. Final simplification53.4%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.5 \cdot 10^{-6}:\\ \;\;\;\;\mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, 0.5, \frac{-1 - x}{B}\right)\\ \mathbf{elif}\;F \leq 105:\\ \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F}}{F}, -0.5, \frac{1 - x}{B}\right)\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 18: 51.1% accurate, 5.7× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.5 \cdot 10^{-6}:\\ \;\;\;\;\mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, 0.5, \frac{-1 - x}{B}\right)\\ \mathbf{elif}\;F \leq 105:\\ \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -3.5e-6)
                               (fma (/ 2.0 (* (* F F) B)) 0.5 (/ (- -1.0 x) B))
                               (if (<= F 105.0)
                                 (/ (- (* (sqrt (/ 1.0 (fma 2.0 x (fma F F 2.0)))) F) x) B)
                                 (/ (- (fma (/ (fma 2.0 x 2.0) (* F F)) -0.5 1.0) x) B))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -3.5e-6) {
                            		tmp = fma((2.0 / ((F * F) * B)), 0.5, ((-1.0 - x) / B));
                            	} else if (F <= 105.0) {
                            		tmp = ((sqrt((1.0 / fma(2.0, x, fma(F, F, 2.0)))) * F) - x) / B;
                            	} else {
                            		tmp = (fma((fma(2.0, x, 2.0) / (F * F)), -0.5, 1.0) - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -3.5e-6)
                            		tmp = fma(Float64(2.0 / Float64(Float64(F * F) * B)), 0.5, Float64(Float64(-1.0 - x) / B));
                            	elseif (F <= 105.0)
                            		tmp = Float64(Float64(Float64(sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))) * F) - x) / B);
                            	else
                            		tmp = Float64(Float64(fma(Float64(fma(2.0, x, 2.0) / Float64(F * F)), -0.5, 1.0) - x) / B);
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -3.5e-6], N[(N[(2.0 / N[(N[(F * F), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] * 0.5 + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 105.0], N[(N[(N[(N[Sqrt[N[(1.0 / N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] * -0.5 + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -3.5 \cdot 10^{-6}:\\
                            \;\;\;\;\mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, 0.5, \frac{-1 - x}{B}\right)\\
                            
                            \mathbf{elif}\;F \leq 105:\\
                            \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -3.49999999999999995e-6

                              1. Initial program 57.5%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites46.7%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around -inf

                                \[\leadsto -1 \cdot \frac{1 + x}{B} + \color{blue}{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}}} \]
                              7. Step-by-step derivation
                                1. metadata-evalN/A

                                  \[\leadsto -1 \cdot \frac{1 + x}{B} + \frac{1}{2} \cdot \frac{2 + 2 \cdot x}{\color{blue}{B} \cdot {F}^{2}} \]
                                2. +-commutativeN/A

                                  \[\leadsto \frac{1}{2} \cdot \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} + -1 \cdot \color{blue}{\frac{1 + x}{B}} \]
                                3. *-commutativeN/A

                                  \[\leadsto \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} \cdot \frac{1}{2} + -1 \cdot \frac{\color{blue}{1 + x}}{B} \]
                                4. lower-fma.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{2 + 2 \cdot x}{B \cdot {F}^{2}}, \frac{1}{\color{blue}{2}}, -1 \cdot \frac{1 + x}{B}\right) \]
                                5. associate-/r*N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{2 + 2 \cdot x}{B}}{{F}^{2}}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                6. lower-/.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{2 + 2 \cdot x}{B}}{{F}^{2}}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                7. lower-/.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{2 + 2 \cdot x}{B}}{{F}^{2}}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                8. +-commutativeN/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{2 \cdot x + 2}{B}}{{F}^{2}}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                9. lift-fma.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{{F}^{2}}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                10. pow2N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                11. lift-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                12. metadata-evalN/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, \frac{1}{2}, -1 \cdot \frac{1 + x}{B}\right) \]
                                13. associate-*r/N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, \frac{1}{2}, \frac{-1 \cdot \left(1 + x\right)}{B}\right) \]
                              8. Applied rewrites44.8%

                                \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, \color{blue}{0.5}, \frac{-1 + \left(-x\right)}{B}\right) \]
                              9. Taylor expanded in x around 0

                                \[\leadsto \mathsf{fma}\left(\frac{2}{B \cdot {F}^{2}}, \frac{1}{2}, \frac{-1 + \left(-x\right)}{B}\right) \]
                              10. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{2}{B \cdot {F}^{2}}, \frac{1}{2}, \frac{-1 + \left(-x\right)}{B}\right) \]
                                2. *-commutativeN/A

                                  \[\leadsto \mathsf{fma}\left(\frac{2}{{F}^{2} \cdot B}, \frac{1}{2}, \frac{-1 + \left(-x\right)}{B}\right) \]
                                3. lower-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{2}{{F}^{2} \cdot B}, \frac{1}{2}, \frac{-1 + \left(-x\right)}{B}\right) \]
                                4. pow2N/A

                                  \[\leadsto \mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, \frac{1}{2}, \frac{-1 + \left(-x\right)}{B}\right) \]
                                5. lift-*.f6455.3

                                  \[\leadsto \mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, 0.5, \frac{-1 + \left(-x\right)}{B}\right) \]
                              11. Applied rewrites55.3%

                                \[\leadsto \mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, 0.5, \frac{-1 + \left(-x\right)}{B}\right) \]

                              if -3.49999999999999995e-6 < F < 105

                              1. Initial program 99.5%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites55.7%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Step-by-step derivation
                                1. lift-pow.f64N/A

                                  \[\leadsto \frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B} \]
                                2. lift-+.f64N/A

                                  \[\leadsto \frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B} \]
                                3. lift-*.f64N/A

                                  \[\leadsto \frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B} \]
                                4. lift-fma.f64N/A

                                  \[\leadsto \frac{\sqrt{{\left(\left(2 \cdot x + F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B} \]
                                5. unpow-1N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\left(2 \cdot x + F \cdot F\right) + 2}} \cdot F - x}{B} \]
                                6. lower-/.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\left(2 \cdot x + F \cdot F\right) + 2}} \cdot F - x}{B} \]
                                7. pow2N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{\left(2 \cdot x + {F}^{2}\right) + 2}} \cdot F - x}{B} \]
                                8. associate-+r+N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \left({F}^{2} + 2\right)}} \cdot F - x}{B} \]
                                9. pow2N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \left(F \cdot F + 2\right)}} \cdot F - x}{B} \]
                                10. lift-fma.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}} \cdot F - x}{B} \]
                                11. lift-fma.f6455.7

                                  \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B} \]
                              7. Applied rewrites55.7%

                                \[\leadsto \frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B} \]

                              if 105 < F

                              1. Initial program 57.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites35.3%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around 0

                                \[\leadsto \frac{-1 \cdot x}{B} \]
                              7. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                2. lift-neg.f6426.0

                                  \[\leadsto \frac{-x}{B} \]
                              8. Applied rewrites26.0%

                                \[\leadsto \frac{-x}{B} \]
                              9. Taylor expanded in F around inf

                                \[\leadsto \frac{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B} \]
                              10. Step-by-step derivation
                                1. lower--.f64N/A

                                  \[\leadsto \frac{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B} \]
                              11. Applied rewrites48.7%

                                \[\leadsto \frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B} \]
                            3. Recombined 3 regimes into one program.
                            4. Final simplification53.4%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.5 \cdot 10^{-6}:\\ \;\;\;\;\mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, 0.5, \frac{-1 - x}{B}\right)\\ \mathbf{elif}\;F \leq 105:\\ \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 19: 44.0% accurate, 5.9× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-61}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-113}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -4e-61)
                               (+ (- (/ x B)) (/ (- (* (* B B) -0.16666666666666666) 1.0) B))
                               (if (<= F 9e-113)
                                 (/ (- x) B)
                                 (if (<= F 1.2e-26)
                                   (* (/ 1.0 (sqrt (fma F F 2.0))) (/ F B))
                                   (/ (- 1.0 x) B)))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -4e-61) {
                            		tmp = -(x / B) + ((((B * B) * -0.16666666666666666) - 1.0) / B);
                            	} else if (F <= 9e-113) {
                            		tmp = -x / B;
                            	} else if (F <= 1.2e-26) {
                            		tmp = (1.0 / sqrt(fma(F, F, 2.0))) * (F / B);
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -4e-61)
                            		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(Float64(B * B) * -0.16666666666666666) - 1.0) / B));
                            	elseif (F <= 9e-113)
                            		tmp = Float64(Float64(-x) / B);
                            	elseif (F <= 1.2e-26)
                            		tmp = Float64(Float64(1.0 / sqrt(fma(F, F, 2.0))) * Float64(F / B));
                            	else
                            		tmp = Float64(Float64(1.0 - x) / B);
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -4e-61], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9e-113], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 1.2e-26], N[(N[(1.0 / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $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 -4 \cdot 10^{-61}:\\
                            \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B}\\
                            
                            \mathbf{elif}\;F \leq 9 \cdot 10^{-113}:\\
                            \;\;\;\;\frac{-x}{B}\\
                            
                            \mathbf{elif}\;F \leq 1.2 \cdot 10^{-26}:\\
                            \;\;\;\;\frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 4 regimes
                            2. if F < -4.0000000000000002e-61

                              1. Initial program 63.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) + \color{blue}{\frac{-1}{\sin B}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\color{blue}{\sin B}} \]
                                2. lift-sin.f6490.2

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
                              5. Applied rewrites90.2%

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                              6. Taylor expanded in B around 0

                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]
                              7. Step-by-step derivation
                                1. lower-/.f6462.3

                                  \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{-1}{\sin B} \]
                              8. Applied rewrites62.3%

                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]
                              9. Taylor expanded in B around 0

                                \[\leadsto \left(-\frac{x}{B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                              10. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                2. lower--.f64N/A

                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                3. *-commutativeN/A

                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{{B}^{2} \cdot \frac{-1}{6} - 1}{B} \]
                                4. lower-*.f64N/A

                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{{B}^{2} \cdot \frac{-1}{6} - 1}{B} \]
                                5. pow2N/A

                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot \frac{-1}{6} - 1}{B} \]
                                6. lift-*.f6449.3

                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B} \]
                              11. Applied rewrites49.3%

                                \[\leadsto \left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{\color{blue}{B}} \]

                              if -4.0000000000000002e-61 < F < 9.0000000000000002e-113

                              1. Initial program 99.6%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites52.3%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around 0

                                \[\leadsto \frac{-1 \cdot x}{B} \]
                              7. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                2. lift-neg.f6445.7

                                  \[\leadsto \frac{-x}{B} \]
                              8. Applied rewrites45.7%

                                \[\leadsto \frac{-x}{B} \]

                              if 9.0000000000000002e-113 < F < 1.2e-26

                              1. Initial program 99.2%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in 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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites77.9%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \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. *-commutativeN/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                3. lower-sqrt.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                                4. inv-powN/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                5. lower-pow.f64N/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \sqrt{{\left({F}^{2} + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                7. pow2N/A

                                  \[\leadsto \sqrt{{\left(F \cdot F + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                8. lift-fma.f64N/A

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                                9. lower-/.f6462.9

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                              8. Applied rewrites62.9%

                                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \color{blue}{\frac{F}{B}} \]
                              9. Step-by-step derivation
                                1. lift-pow.f64N/A

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                                2. lift-fma.f64N/A

                                  \[\leadsto \sqrt{{\left(F \cdot F + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                3. lower-sqrt.f64N/A

                                  \[\leadsto \sqrt{{\left(F \cdot F + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                4. unpow-1N/A

                                  \[\leadsto \sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{B} \]
                                5. pow2N/A

                                  \[\leadsto \sqrt{\frac{1}{{F}^{2} + 2}} \cdot \frac{F}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                                7. sqrt-divN/A

                                  \[\leadsto \frac{\sqrt{1}}{\sqrt{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                                8. metadata-evalN/A

                                  \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                                9. lower-/.f64N/A

                                  \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                                10. lower-sqrt.f64N/A

                                  \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                                11. +-commutativeN/A

                                  \[\leadsto \frac{1}{\sqrt{{F}^{2} + 2}} \cdot \frac{F}{B} \]
                                12. pow2N/A

                                  \[\leadsto \frac{1}{\sqrt{F \cdot F + 2}} \cdot \frac{F}{B} \]
                                13. lift-fma.f6463.2

                                  \[\leadsto \frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B} \]
                              10. Applied rewrites63.2%

                                \[\leadsto \frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B} \]

                              if 1.2e-26 < F

                              1. Initial program 60.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites36.1%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around inf

                                \[\leadsto \frac{1 - x}{B} \]
                              7. Step-by-step derivation
                                1. lower--.f6447.5

                                  \[\leadsto \frac{1 - x}{B} \]
                              8. Applied rewrites47.5%

                                \[\leadsto \frac{1 - x}{B} \]
                            3. Recombined 4 regimes into one program.
                            4. Final simplification48.5%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-61}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-113}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 20: 44.0% accurate, 7.8× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-61}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-113}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{\sqrt{0.5} \cdot F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -4e-61)
                               (+ (- (/ x B)) (/ (- (* (* B B) -0.16666666666666666) 1.0) B))
                               (if (<= F 9e-113)
                                 (/ (- x) B)
                                 (if (<= F 1.2e-26) (/ (* (sqrt 0.5) F) B) (/ (- 1.0 x) B)))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -4e-61) {
                            		tmp = -(x / B) + ((((B * B) * -0.16666666666666666) - 1.0) / B);
                            	} else if (F <= 9e-113) {
                            		tmp = -x / B;
                            	} else if (F <= 1.2e-26) {
                            		tmp = (sqrt(0.5) * F) / 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 <= (-4d-61)) then
                                    tmp = -(x / b) + ((((b * b) * (-0.16666666666666666d0)) - 1.0d0) / b)
                                else if (f <= 9d-113) then
                                    tmp = -x / b
                                else if (f <= 1.2d-26) then
                                    tmp = (sqrt(0.5d0) * f) / 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 <= -4e-61) {
                            		tmp = -(x / B) + ((((B * B) * -0.16666666666666666) - 1.0) / B);
                            	} else if (F <= 9e-113) {
                            		tmp = -x / B;
                            	} else if (F <= 1.2e-26) {
                            		tmp = (Math.sqrt(0.5) * F) / B;
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            def code(F, B, x):
                            	tmp = 0
                            	if F <= -4e-61:
                            		tmp = -(x / B) + ((((B * B) * -0.16666666666666666) - 1.0) / B)
                            	elif F <= 9e-113:
                            		tmp = -x / B
                            	elif F <= 1.2e-26:
                            		tmp = (math.sqrt(0.5) * F) / B
                            	else:
                            		tmp = (1.0 - x) / B
                            	return tmp
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -4e-61)
                            		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(Float64(B * B) * -0.16666666666666666) - 1.0) / B));
                            	elseif (F <= 9e-113)
                            		tmp = Float64(Float64(-x) / B);
                            	elseif (F <= 1.2e-26)
                            		tmp = Float64(Float64(sqrt(0.5) * F) / 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 <= -4e-61)
                            		tmp = -(x / B) + ((((B * B) * -0.16666666666666666) - 1.0) / B);
                            	elseif (F <= 9e-113)
                            		tmp = -x / B;
                            	elseif (F <= 1.2e-26)
                            		tmp = (sqrt(0.5) * F) / B;
                            	else
                            		tmp = (1.0 - x) / B;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -4e-61], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9e-113], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 1.2e-26], N[(N[(N[Sqrt[0.5], $MachinePrecision] * F), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -4 \cdot 10^{-61}:\\
                            \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B}\\
                            
                            \mathbf{elif}\;F \leq 9 \cdot 10^{-113}:\\
                            \;\;\;\;\frac{-x}{B}\\
                            
                            \mathbf{elif}\;F \leq 1.2 \cdot 10^{-26}:\\
                            \;\;\;\;\frac{\sqrt{0.5} \cdot F}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 4 regimes
                            2. if F < -4.0000000000000002e-61

                              1. Initial program 63.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) + \color{blue}{\frac{-1}{\sin B}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\color{blue}{\sin B}} \]
                                2. lift-sin.f6490.2

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
                              5. Applied rewrites90.2%

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                              6. Taylor expanded in B around 0

                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]
                              7. Step-by-step derivation
                                1. lower-/.f6462.3

                                  \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{-1}{\sin B} \]
                              8. Applied rewrites62.3%

                                \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]
                              9. Taylor expanded in B around 0

                                \[\leadsto \left(-\frac{x}{B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                              10. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                2. lower--.f64N/A

                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                3. *-commutativeN/A

                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{{B}^{2} \cdot \frac{-1}{6} - 1}{B} \]
                                4. lower-*.f64N/A

                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{{B}^{2} \cdot \frac{-1}{6} - 1}{B} \]
                                5. pow2N/A

                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot \frac{-1}{6} - 1}{B} \]
                                6. lift-*.f6449.3

                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B} \]
                              11. Applied rewrites49.3%

                                \[\leadsto \left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{\color{blue}{B}} \]

                              if -4.0000000000000002e-61 < F < 9.0000000000000002e-113

                              1. Initial program 99.6%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites52.3%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around 0

                                \[\leadsto \frac{-1 \cdot x}{B} \]
                              7. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                2. lift-neg.f6445.7

                                  \[\leadsto \frac{-x}{B} \]
                              8. Applied rewrites45.7%

                                \[\leadsto \frac{-x}{B} \]

                              if 9.0000000000000002e-113 < F < 1.2e-26

                              1. Initial program 99.2%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in 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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites77.9%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \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. *-commutativeN/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                3. lower-sqrt.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                                4. inv-powN/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                5. lower-pow.f64N/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \sqrt{{\left({F}^{2} + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                7. pow2N/A

                                  \[\leadsto \sqrt{{\left(F \cdot F + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                8. lift-fma.f64N/A

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                                9. lower-/.f6462.9

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                              8. Applied rewrites62.9%

                                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \color{blue}{\frac{F}{B}} \]
                              9. Taylor expanded in F around -inf

                                \[\leadsto \frac{-1}{B} \]
                              10. Step-by-step derivation
                                1. lower-/.f641.8

                                  \[\leadsto \frac{-1}{B} \]
                              11. Applied rewrites1.8%

                                \[\leadsto \frac{-1}{B} \]
                              12. Taylor expanded in F around 0

                                \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{B} \]
                              13. Step-by-step derivation
                                1. metadata-evalN/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{B} \]
                                2. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{B} \]
                                3. *-commutativeN/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F}{B} \]
                                4. lower-*.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F}{B} \]
                                5. lower-sqrt.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F}{B} \]
                                6. metadata-eval63.0

                                  \[\leadsto \frac{\sqrt{0.5} \cdot F}{B} \]
                              14. Applied rewrites63.0%

                                \[\leadsto \frac{\sqrt{0.5} \cdot F}{B} \]

                              if 1.2e-26 < F

                              1. Initial program 60.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites36.1%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around inf

                                \[\leadsto \frac{1 - x}{B} \]
                              7. Step-by-step derivation
                                1. lower--.f6447.5

                                  \[\leadsto \frac{1 - x}{B} \]
                              8. Applied rewrites47.5%

                                \[\leadsto \frac{1 - x}{B} \]
                            3. Recombined 4 regimes into one program.
                            4. Final simplification48.5%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-61}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-113}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{\sqrt{0.5} \cdot F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 21: 43.8% accurate, 8.2× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.05 \cdot 10^{-96}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-113}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{\sqrt{0.5} \cdot F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -1.05e-96)
                               (/ (- -1.0 x) B)
                               (if (<= F 9e-113)
                                 (/ (- x) B)
                                 (if (<= F 1.2e-26) (/ (* (sqrt 0.5) F) B) (/ (- 1.0 x) B)))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -1.05e-96) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= 9e-113) {
                            		tmp = -x / B;
                            	} else if (F <= 1.2e-26) {
                            		tmp = (sqrt(0.5) * F) / 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.05d-96)) then
                                    tmp = ((-1.0d0) - x) / b
                                else if (f <= 9d-113) then
                                    tmp = -x / b
                                else if (f <= 1.2d-26) then
                                    tmp = (sqrt(0.5d0) * f) / 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.05e-96) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= 9e-113) {
                            		tmp = -x / B;
                            	} else if (F <= 1.2e-26) {
                            		tmp = (Math.sqrt(0.5) * F) / B;
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            def code(F, B, x):
                            	tmp = 0
                            	if F <= -1.05e-96:
                            		tmp = (-1.0 - x) / B
                            	elif F <= 9e-113:
                            		tmp = -x / B
                            	elif F <= 1.2e-26:
                            		tmp = (math.sqrt(0.5) * F) / B
                            	else:
                            		tmp = (1.0 - x) / B
                            	return tmp
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -1.05e-96)
                            		tmp = Float64(Float64(-1.0 - x) / B);
                            	elseif (F <= 9e-113)
                            		tmp = Float64(Float64(-x) / B);
                            	elseif (F <= 1.2e-26)
                            		tmp = Float64(Float64(sqrt(0.5) * F) / 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.05e-96)
                            		tmp = (-1.0 - x) / B;
                            	elseif (F <= 9e-113)
                            		tmp = -x / B;
                            	elseif (F <= 1.2e-26)
                            		tmp = (sqrt(0.5) * F) / B;
                            	else
                            		tmp = (1.0 - x) / B;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -1.05e-96], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 9e-113], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 1.2e-26], N[(N[(N[Sqrt[0.5], $MachinePrecision] * F), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -1.05 \cdot 10^{-96}:\\
                            \;\;\;\;\frac{-1 - x}{B}\\
                            
                            \mathbf{elif}\;F \leq 9 \cdot 10^{-113}:\\
                            \;\;\;\;\frac{-x}{B}\\
                            
                            \mathbf{elif}\;F \leq 1.2 \cdot 10^{-26}:\\
                            \;\;\;\;\frac{\sqrt{0.5} \cdot F}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 4 regimes
                            2. if F < -1.05000000000000001e-96

                              1. Initial program 66.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites46.1%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around -inf

                                \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                              7. Step-by-step derivation
                                1. distribute-lft-inN/A

                                  \[\leadsto \frac{-1 \cdot 1 + -1 \cdot x}{B} \]
                                2. metadata-evalN/A

                                  \[\leadsto \frac{-1 + -1 \cdot x}{B} \]
                                3. mul-1-negN/A

                                  \[\leadsto \frac{-1 + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                4. lower-+.f64N/A

                                  \[\leadsto \frac{-1 + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                5. lift-neg.f6447.8

                                  \[\leadsto \frac{-1 + \left(-x\right)}{B} \]
                              8. Applied rewrites47.8%

                                \[\leadsto \frac{-1 + \left(-x\right)}{B} \]

                              if -1.05000000000000001e-96 < F < 9.0000000000000002e-113

                              1. Initial program 99.6%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites53.8%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around 0

                                \[\leadsto \frac{-1 \cdot x}{B} \]
                              7. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                2. lift-neg.f6446.8

                                  \[\leadsto \frac{-x}{B} \]
                              8. Applied rewrites46.8%

                                \[\leadsto \frac{-x}{B} \]

                              if 9.0000000000000002e-113 < F < 1.2e-26

                              1. Initial program 99.2%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in 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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites77.9%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \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. *-commutativeN/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                3. lower-sqrt.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                                4. inv-powN/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                5. lower-pow.f64N/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \sqrt{{\left({F}^{2} + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                7. pow2N/A

                                  \[\leadsto \sqrt{{\left(F \cdot F + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                8. lift-fma.f64N/A

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                                9. lower-/.f6462.9

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                              8. Applied rewrites62.9%

                                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \color{blue}{\frac{F}{B}} \]
                              9. Taylor expanded in F around -inf

                                \[\leadsto \frac{-1}{B} \]
                              10. Step-by-step derivation
                                1. lower-/.f641.8

                                  \[\leadsto \frac{-1}{B} \]
                              11. Applied rewrites1.8%

                                \[\leadsto \frac{-1}{B} \]
                              12. Taylor expanded in F around 0

                                \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{B} \]
                              13. Step-by-step derivation
                                1. metadata-evalN/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{B} \]
                                2. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{B} \]
                                3. *-commutativeN/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F}{B} \]
                                4. lower-*.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F}{B} \]
                                5. lower-sqrt.f64N/A

                                  \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F}{B} \]
                                6. metadata-eval63.0

                                  \[\leadsto \frac{\sqrt{0.5} \cdot F}{B} \]
                              14. Applied rewrites63.0%

                                \[\leadsto \frac{\sqrt{0.5} \cdot F}{B} \]

                              if 1.2e-26 < F

                              1. Initial program 60.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites36.1%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around inf

                                \[\leadsto \frac{1 - x}{B} \]
                              7. Step-by-step derivation
                                1. lower--.f6447.5

                                  \[\leadsto \frac{1 - x}{B} \]
                              8. Applied rewrites47.5%

                                \[\leadsto \frac{1 - x}{B} \]
                            3. Recombined 4 regimes into one program.
                            4. Final simplification48.5%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.05 \cdot 10^{-96}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-113}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{\sqrt{0.5} \cdot F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 22: 43.8% accurate, 8.2× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.05 \cdot 10^{-96}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-113}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-26}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -1.05e-96)
                               (/ (- -1.0 x) B)
                               (if (<= F 9e-113)
                                 (/ (- x) B)
                                 (if (<= F 1.2e-26) (* F (/ (sqrt 0.5) B)) (/ (- 1.0 x) B)))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -1.05e-96) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= 9e-113) {
                            		tmp = -x / B;
                            	} else if (F <= 1.2e-26) {
                            		tmp = F * (sqrt(0.5) / 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.05d-96)) then
                                    tmp = ((-1.0d0) - x) / b
                                else if (f <= 9d-113) then
                                    tmp = -x / b
                                else if (f <= 1.2d-26) then
                                    tmp = f * (sqrt(0.5d0) / 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.05e-96) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= 9e-113) {
                            		tmp = -x / B;
                            	} else if (F <= 1.2e-26) {
                            		tmp = F * (Math.sqrt(0.5) / B);
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            def code(F, B, x):
                            	tmp = 0
                            	if F <= -1.05e-96:
                            		tmp = (-1.0 - x) / B
                            	elif F <= 9e-113:
                            		tmp = -x / B
                            	elif F <= 1.2e-26:
                            		tmp = F * (math.sqrt(0.5) / B)
                            	else:
                            		tmp = (1.0 - x) / B
                            	return tmp
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -1.05e-96)
                            		tmp = Float64(Float64(-1.0 - x) / B);
                            	elseif (F <= 9e-113)
                            		tmp = Float64(Float64(-x) / B);
                            	elseif (F <= 1.2e-26)
                            		tmp = Float64(F * Float64(sqrt(0.5) / 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.05e-96)
                            		tmp = (-1.0 - x) / B;
                            	elseif (F <= 9e-113)
                            		tmp = -x / B;
                            	elseif (F <= 1.2e-26)
                            		tmp = F * (sqrt(0.5) / B);
                            	else
                            		tmp = (1.0 - x) / B;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -1.05e-96], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 9e-113], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 1.2e-26], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -1.05 \cdot 10^{-96}:\\
                            \;\;\;\;\frac{-1 - x}{B}\\
                            
                            \mathbf{elif}\;F \leq 9 \cdot 10^{-113}:\\
                            \;\;\;\;\frac{-x}{B}\\
                            
                            \mathbf{elif}\;F \leq 1.2 \cdot 10^{-26}:\\
                            \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 4 regimes
                            2. if F < -1.05000000000000001e-96

                              1. Initial program 66.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites46.1%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around -inf

                                \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                              7. Step-by-step derivation
                                1. distribute-lft-inN/A

                                  \[\leadsto \frac{-1 \cdot 1 + -1 \cdot x}{B} \]
                                2. metadata-evalN/A

                                  \[\leadsto \frac{-1 + -1 \cdot x}{B} \]
                                3. mul-1-negN/A

                                  \[\leadsto \frac{-1 + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                4. lower-+.f64N/A

                                  \[\leadsto \frac{-1 + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                5. lift-neg.f6447.8

                                  \[\leadsto \frac{-1 + \left(-x\right)}{B} \]
                              8. Applied rewrites47.8%

                                \[\leadsto \frac{-1 + \left(-x\right)}{B} \]

                              if -1.05000000000000001e-96 < F < 9.0000000000000002e-113

                              1. Initial program 99.6%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites53.8%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around 0

                                \[\leadsto \frac{-1 \cdot x}{B} \]
                              7. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                2. lift-neg.f6446.8

                                  \[\leadsto \frac{-x}{B} \]
                              8. Applied rewrites46.8%

                                \[\leadsto \frac{-x}{B} \]

                              if 9.0000000000000002e-113 < F < 1.2e-26

                              1. Initial program 99.2%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in 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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites77.9%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \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. *-commutativeN/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                3. lower-sqrt.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                                4. inv-powN/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                5. lower-pow.f64N/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \sqrt{{\left({F}^{2} + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                7. pow2N/A

                                  \[\leadsto \sqrt{{\left(F \cdot F + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                8. lift-fma.f64N/A

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                                9. lower-/.f6462.9

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                              8. Applied rewrites62.9%

                                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \color{blue}{\frac{F}{B}} \]
                              9. Taylor expanded in F around 0

                                \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{B} \]
                              10. Step-by-step derivation
                                1. metadata-evalN/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{B} \]
                                2. associate-/l*N/A

                                  \[\leadsto F \cdot \frac{\sqrt{\frac{1}{2}}}{B} \]
                                3. lower-*.f64N/A

                                  \[\leadsto F \cdot \frac{\sqrt{\frac{1}{2}}}{B} \]
                                4. lower-/.f64N/A

                                  \[\leadsto F \cdot \frac{\sqrt{\frac{1}{2}}}{B} \]
                                5. lower-sqrt.f64N/A

                                  \[\leadsto F \cdot \frac{\sqrt{\frac{1}{2}}}{B} \]
                                6. metadata-eval63.0

                                  \[\leadsto F \cdot \frac{\sqrt{0.5}}{B} \]
                              11. Applied rewrites63.0%

                                \[\leadsto F \cdot \frac{\sqrt{0.5}}{\color{blue}{B}} \]

                              if 1.2e-26 < F

                              1. Initial program 60.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites36.1%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around inf

                                \[\leadsto \frac{1 - x}{B} \]
                              7. Step-by-step derivation
                                1. lower--.f6447.5

                                  \[\leadsto \frac{1 - x}{B} \]
                              8. Applied rewrites47.5%

                                \[\leadsto \frac{1 - x}{B} \]
                            3. Recombined 4 regimes into one program.
                            4. Final simplification48.4%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.05 \cdot 10^{-96}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-113}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-26}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 23: 36.8% accurate, 11.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;F \leq -4 \cdot 10^{+155}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq -62:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 3.6 \cdot 10^{-66}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (let* ((t_0 (/ (- x) B)))
                               (if (<= F -4e+155)
                                 t_0
                                 (if (<= F -62.0) (/ -1.0 B) (if (<= F 3.6e-66) t_0 (/ (- 1.0 x) B))))))
                            double code(double F, double B, double x) {
                            	double t_0 = -x / B;
                            	double tmp;
                            	if (F <= -4e+155) {
                            		tmp = t_0;
                            	} else if (F <= -62.0) {
                            		tmp = -1.0 / B;
                            	} else if (F <= 3.6e-66) {
                            		tmp = t_0;
                            	} 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) :: t_0
                                real(8) :: tmp
                                t_0 = -x / b
                                if (f <= (-4d+155)) then
                                    tmp = t_0
                                else if (f <= (-62.0d0)) then
                                    tmp = (-1.0d0) / b
                                else if (f <= 3.6d-66) then
                                    tmp = t_0
                                else
                                    tmp = (1.0d0 - x) / b
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double F, double B, double x) {
                            	double t_0 = -x / B;
                            	double tmp;
                            	if (F <= -4e+155) {
                            		tmp = t_0;
                            	} else if (F <= -62.0) {
                            		tmp = -1.0 / B;
                            	} else if (F <= 3.6e-66) {
                            		tmp = t_0;
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            def code(F, B, x):
                            	t_0 = -x / B
                            	tmp = 0
                            	if F <= -4e+155:
                            		tmp = t_0
                            	elif F <= -62.0:
                            		tmp = -1.0 / B
                            	elif F <= 3.6e-66:
                            		tmp = t_0
                            	else:
                            		tmp = (1.0 - x) / B
                            	return tmp
                            
                            function code(F, B, x)
                            	t_0 = Float64(Float64(-x) / B)
                            	tmp = 0.0
                            	if (F <= -4e+155)
                            		tmp = t_0;
                            	elseif (F <= -62.0)
                            		tmp = Float64(-1.0 / B);
                            	elseif (F <= 3.6e-66)
                            		tmp = t_0;
                            	else
                            		tmp = Float64(Float64(1.0 - x) / B);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(F, B, x)
                            	t_0 = -x / B;
                            	tmp = 0.0;
                            	if (F <= -4e+155)
                            		tmp = t_0;
                            	elseif (F <= -62.0)
                            		tmp = -1.0 / B;
                            	elseif (F <= 3.6e-66)
                            		tmp = t_0;
                            	else
                            		tmp = (1.0 - x) / B;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[F, -4e+155], t$95$0, If[LessEqual[F, -62.0], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 3.6e-66], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_0 := \frac{-x}{B}\\
                            \mathbf{if}\;F \leq -4 \cdot 10^{+155}:\\
                            \;\;\;\;t\_0\\
                            
                            \mathbf{elif}\;F \leq -62:\\
                            \;\;\;\;\frac{-1}{B}\\
                            
                            \mathbf{elif}\;F \leq 3.6 \cdot 10^{-66}:\\
                            \;\;\;\;t\_0\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -4.00000000000000003e155 or -62 < F < 3.60000000000000012e-66

                              1. Initial program 85.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites51.3%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around 0

                                \[\leadsto \frac{-1 \cdot x}{B} \]
                              7. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                2. lift-neg.f6440.9

                                  \[\leadsto \frac{-x}{B} \]
                              8. Applied rewrites40.9%

                                \[\leadsto \frac{-x}{B} \]

                              if -4.00000000000000003e155 < F < -62

                              1. Initial program 81.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites51.4%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \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. *-commutativeN/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                3. lower-sqrt.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                                4. inv-powN/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                5. lower-pow.f64N/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \sqrt{{\left({F}^{2} + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                7. pow2N/A

                                  \[\leadsto \sqrt{{\left(F \cdot F + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                8. lift-fma.f64N/A

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                                9. lower-/.f6432.3

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                              8. Applied rewrites32.3%

                                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \color{blue}{\frac{F}{B}} \]
                              9. Taylor expanded in F around -inf

                                \[\leadsto \frac{-1}{B} \]
                              10. Step-by-step derivation
                                1. lower-/.f6450.4

                                  \[\leadsto \frac{-1}{B} \]
                              11. Applied rewrites50.4%

                                \[\leadsto \frac{-1}{B} \]

                              if 3.60000000000000012e-66 < F

                              1. Initial program 63.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites40.4%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around inf

                                \[\leadsto \frac{1 - x}{B} \]
                              7. Step-by-step derivation
                                1. lower--.f6444.0

                                  \[\leadsto \frac{1 - x}{B} \]
                              8. Applied rewrites44.0%

                                \[\leadsto \frac{1 - x}{B} \]
                            3. Recombined 3 regimes into one program.
                            4. Final simplification43.1%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{+155}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq -62:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 3.6 \cdot 10^{-66}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 24: 43.5% accurate, 13.6× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.05 \cdot 10^{-96}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3.6 \cdot 10^{-66}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -1.05e-96)
                               (/ (- -1.0 x) B)
                               (if (<= F 3.6e-66) (/ (- x) B) (/ (- 1.0 x) B))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -1.05e-96) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= 3.6e-66) {
                            		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.05d-96)) then
                                    tmp = ((-1.0d0) - x) / b
                                else if (f <= 3.6d-66) 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.05e-96) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= 3.6e-66) {
                            		tmp = -x / B;
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            def code(F, B, x):
                            	tmp = 0
                            	if F <= -1.05e-96:
                            		tmp = (-1.0 - x) / B
                            	elif F <= 3.6e-66:
                            		tmp = -x / B
                            	else:
                            		tmp = (1.0 - x) / B
                            	return tmp
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -1.05e-96)
                            		tmp = Float64(Float64(-1.0 - x) / B);
                            	elseif (F <= 3.6e-66)
                            		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.05e-96)
                            		tmp = (-1.0 - x) / B;
                            	elseif (F <= 3.6e-66)
                            		tmp = -x / B;
                            	else
                            		tmp = (1.0 - x) / B;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -1.05e-96], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.6e-66], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -1.05 \cdot 10^{-96}:\\
                            \;\;\;\;\frac{-1 - x}{B}\\
                            
                            \mathbf{elif}\;F \leq 3.6 \cdot 10^{-66}:\\
                            \;\;\;\;\frac{-x}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -1.05000000000000001e-96

                              1. Initial program 66.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites46.1%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around -inf

                                \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{B} \]
                              7. Step-by-step derivation
                                1. distribute-lft-inN/A

                                  \[\leadsto \frac{-1 \cdot 1 + -1 \cdot x}{B} \]
                                2. metadata-evalN/A

                                  \[\leadsto \frac{-1 + -1 \cdot x}{B} \]
                                3. mul-1-negN/A

                                  \[\leadsto \frac{-1 + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                4. lower-+.f64N/A

                                  \[\leadsto \frac{-1 + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                5. lift-neg.f6447.8

                                  \[\leadsto \frac{-1 + \left(-x\right)}{B} \]
                              8. Applied rewrites47.8%

                                \[\leadsto \frac{-1 + \left(-x\right)}{B} \]

                              if -1.05000000000000001e-96 < F < 3.60000000000000012e-66

                              1. Initial program 99.5%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites55.7%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around 0

                                \[\leadsto \frac{-1 \cdot x}{B} \]
                              7. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                2. lift-neg.f6444.2

                                  \[\leadsto \frac{-x}{B} \]
                              8. Applied rewrites44.2%

                                \[\leadsto \frac{-x}{B} \]

                              if 3.60000000000000012e-66 < F

                              1. Initial program 63.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites40.4%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around inf

                                \[\leadsto \frac{1 - x}{B} \]
                              7. Step-by-step derivation
                                1. lower--.f6444.0

                                  \[\leadsto \frac{1 - x}{B} \]
                              8. Applied rewrites44.0%

                                \[\leadsto \frac{1 - x}{B} \]
                            3. Recombined 3 regimes into one program.
                            4. Final simplification45.2%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.05 \cdot 10^{-96}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3.6 \cdot 10^{-66}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 25: 29.8% accurate, 14.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{+155} \lor \neg \left(F \leq -62\right):\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (or (<= F -4e+155) (not (<= F -62.0))) (/ (- x) B) (/ -1.0 B)))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if ((F <= -4e+155) || !(F <= -62.0)) {
                            		tmp = -x / B;
                            	} else {
                            		tmp = -1.0 / 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 <= (-4d+155)) .or. (.not. (f <= (-62.0d0)))) then
                                    tmp = -x / b
                                else
                                    tmp = (-1.0d0) / b
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double F, double B, double x) {
                            	double tmp;
                            	if ((F <= -4e+155) || !(F <= -62.0)) {
                            		tmp = -x / B;
                            	} else {
                            		tmp = -1.0 / B;
                            	}
                            	return tmp;
                            }
                            
                            def code(F, B, x):
                            	tmp = 0
                            	if (F <= -4e+155) or not (F <= -62.0):
                            		tmp = -x / B
                            	else:
                            		tmp = -1.0 / B
                            	return tmp
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if ((F <= -4e+155) || !(F <= -62.0))
                            		tmp = Float64(Float64(-x) / B);
                            	else
                            		tmp = Float64(-1.0 / B);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(F, B, x)
                            	tmp = 0.0;
                            	if ((F <= -4e+155) || ~((F <= -62.0)))
                            		tmp = -x / B;
                            	else
                            		tmp = -1.0 / B;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[F_, B_, x_] := If[Or[LessEqual[F, -4e+155], N[Not[LessEqual[F, -62.0]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -4 \cdot 10^{+155} \lor \neg \left(F \leq -62\right):\\
                            \;\;\;\;\frac{-x}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{-1}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if F < -4.00000000000000003e155 or -62 < F

                              1. Initial program 76.2%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites46.8%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around 0

                                \[\leadsto \frac{-1 \cdot x}{B} \]
                              7. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                2. lift-neg.f6434.1

                                  \[\leadsto \frac{-x}{B} \]
                              8. Applied rewrites34.1%

                                \[\leadsto \frac{-x}{B} \]

                              if -4.00000000000000003e155 < F < -62

                              1. Initial program 81.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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites51.4%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \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. *-commutativeN/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                                3. lower-sqrt.f64N/A

                                  \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                                4. inv-powN/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                5. lower-pow.f64N/A

                                  \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                                6. +-commutativeN/A

                                  \[\leadsto \sqrt{{\left({F}^{2} + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                7. pow2N/A

                                  \[\leadsto \sqrt{{\left(F \cdot F + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                                8. lift-fma.f64N/A

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                                9. lower-/.f6432.3

                                  \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                              8. Applied rewrites32.3%

                                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \color{blue}{\frac{F}{B}} \]
                              9. Taylor expanded in F around -inf

                                \[\leadsto \frac{-1}{B} \]
                              10. Step-by-step derivation
                                1. lower-/.f6450.4

                                  \[\leadsto \frac{-1}{B} \]
                              11. Applied rewrites50.4%

                                \[\leadsto \frac{-1}{B} \]
                            3. Recombined 2 regimes into one program.
                            4. Final simplification35.8%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{+155} \lor \neg \left(F \leq -62\right):\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 26: 10.8% accurate, 30.7× speedup?

                            \[\begin{array}{l} \\ \frac{-1}{B} \end{array} \]
                            (FPCore (F B x) :precision binary64 (/ -1.0 B))
                            double code(double F, double B, double x) {
                            	return -1.0 / B;
                            }
                            
                            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 = (-1.0d0) / b
                            end function
                            
                            public static double code(double F, double B, double x) {
                            	return -1.0 / B;
                            }
                            
                            def code(F, B, x):
                            	return -1.0 / B
                            
                            function code(F, B, x)
                            	return Float64(-1.0 / B)
                            end
                            
                            function tmp = code(F, B, x)
                            	tmp = -1.0 / B;
                            end
                            
                            code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
                            
                            \begin{array}{l}
                            
                            \\
                            \frac{-1}{B}
                            \end{array}
                            
                            Derivation
                            1. Initial program 76.7%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Add Preprocessing
                            3. Taylor expanded in B around 0

                              \[\leadsto \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 \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                            5. Applied rewrites47.3%

                              \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \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. *-commutativeN/A

                                \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                              2. lower-*.f64N/A

                                \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\color{blue}{B}} \]
                              3. lower-sqrt.f64N/A

                                \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{B} \]
                              4. inv-powN/A

                                \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                              5. lower-pow.f64N/A

                                \[\leadsto \sqrt{{\left(2 + {F}^{2}\right)}^{-1}} \cdot \frac{F}{B} \]
                              6. +-commutativeN/A

                                \[\leadsto \sqrt{{\left({F}^{2} + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                              7. pow2N/A

                                \[\leadsto \sqrt{{\left(F \cdot F + 2\right)}^{-1}} \cdot \frac{F}{B} \]
                              8. lift-fma.f64N/A

                                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                              9. lower-/.f6415.9

                                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{B} \]
                            8. Applied rewrites15.9%

                              \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \color{blue}{\frac{F}{B}} \]
                            9. Taylor expanded in F around -inf

                              \[\leadsto \frac{-1}{B} \]
                            10. Step-by-step derivation
                              1. lower-/.f6410.0

                                \[\leadsto \frac{-1}{B} \]
                            11. Applied rewrites10.0%

                              \[\leadsto \frac{-1}{B} \]
                            12. Final simplification10.0%

                              \[\leadsto \frac{-1}{B} \]
                            13. Add Preprocessing

                            Reproduce

                            ?
                            herbie shell --seed 2025072 
                            (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))))))