VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.8% → 99.7%
Time: 7.9s
Alternatives: 30
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}

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 30 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.8% 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.7% accurate, 1.0× speedup?

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

\mathbf{elif}\;F \leq 2000000:\\
\;\;\;\;t\_0 + \frac{F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin 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 < -4.9999999999999999e146

    1. Initial program 33.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. Taylor expanded in F around -inf

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    3. 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.f6499.7

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999999e146 < F < 2e6

    1. Initial program 97.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. 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}} \]
    3. 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}} \]
    4. 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} \]
    5. 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} \]

    if 2e6 < F

    1. Initial program 57.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. Taylor expanded in F around inf

      \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
    3. 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} \]
    4. Applied rewrites99.7%

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

Alternative 2: 79.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := -x \cdot \frac{1}{\tan B}\\ t_1 := \frac{F \cdot 1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\ t_2 := \frac{-x}{B} + \frac{t\_1}{\sin B}\\ t_3 := t\_0 + \frac{t\_1}{B}\\ t_4 := \frac{F}{\sin B}\\ t_5 := t\_0 + t\_4 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{if}\;t\_5 \leq -2 \cdot 10^{+21}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_5 \leq -1 \cdot 10^{-155}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_5 \leq 5 \cdot 10^{-181}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + t\_4 \cdot \frac{1}{F}\\ \mathbf{elif}\;t\_5 \leq 20:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_5 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{2}{B \cdot \left(F \cdot F\right)}, 0.5, \frac{-1 + \left(-x\right)}{B}\right)\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (- (* x (/ 1.0 (tan B)))))
        (t_1 (/ (* F 1.0) (sqrt (fma 2.0 x (fma F F 2.0)))))
        (t_2 (+ (/ (- x) B) (/ t_1 (sin B))))
        (t_3 (+ t_0 (/ t_1 B)))
        (t_4 (/ F (sin B)))
        (t_5
         (+ t_0 (* t_4 (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0)))))))
   (if (<= t_5 -2e+21)
     t_3
     (if (<= t_5 -1e-155)
       t_2
       (if (<= t_5 5e-181)
         (+ (- (/ x B)) (* t_4 (/ 1.0 F)))
         (if (<= t_5 20.0)
           t_2
           (if (<= t_5 INFINITY)
             t_3
             (fma (/ 2.0 (* B (* F F))) 0.5 (/ (+ -1.0 (- x)) B)))))))))
double code(double F, double B, double x) {
	double t_0 = -(x * (1.0 / tan(B)));
	double t_1 = (F * 1.0) / sqrt(fma(2.0, x, fma(F, F, 2.0)));
	double t_2 = (-x / B) + (t_1 / sin(B));
	double t_3 = t_0 + (t_1 / B);
	double t_4 = F / sin(B);
	double t_5 = t_0 + (t_4 * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
	double tmp;
	if (t_5 <= -2e+21) {
		tmp = t_3;
	} else if (t_5 <= -1e-155) {
		tmp = t_2;
	} else if (t_5 <= 5e-181) {
		tmp = -(x / B) + (t_4 * (1.0 / F));
	} else if (t_5 <= 20.0) {
		tmp = t_2;
	} else if (t_5 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = fma((2.0 / (B * (F * F))), 0.5, ((-1.0 + -x) / B));
	}
	return tmp;
}
function code(F, B, x)
	t_0 = Float64(-Float64(x * Float64(1.0 / tan(B))))
	t_1 = Float64(Float64(F * 1.0) / sqrt(fma(2.0, x, fma(F, F, 2.0))))
	t_2 = Float64(Float64(Float64(-x) / B) + Float64(t_1 / sin(B)))
	t_3 = Float64(t_0 + Float64(t_1 / B))
	t_4 = Float64(F / sin(B))
	t_5 = Float64(t_0 + Float64(t_4 * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0)))))
	tmp = 0.0
	if (t_5 <= -2e+21)
		tmp = t_3;
	elseif (t_5 <= -1e-155)
		tmp = t_2;
	elseif (t_5 <= 5e-181)
		tmp = Float64(Float64(-Float64(x / B)) + Float64(t_4 * Float64(1.0 / F)));
	elseif (t_5 <= 20.0)
		tmp = t_2;
	elseif (t_5 <= Inf)
		tmp = t_3;
	else
		tmp = fma(Float64(2.0 / Float64(B * Float64(F * F))), 0.5, Float64(Float64(-1.0 + Float64(-x)) / B));
	end
	return tmp
end
code[F_, B_, x_] := Block[{t$95$0 = (-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision])}, Block[{t$95$1 = N[(N[(F * 1.0), $MachinePrecision] / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-x) / B), $MachinePrecision] + N[(t$95$1 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 + N[(t$95$1 / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$0 + N[(t$95$4 * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -2e+21], t$95$3, If[LessEqual[t$95$5, -1e-155], t$95$2, If[LessEqual[t$95$5, 5e-181], N[((-N[(x / B), $MachinePrecision]) + N[(t$95$4 * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 20.0], t$95$2, If[LessEqual[t$95$5, Infinity], t$95$3, N[(N[(2.0 / N[(B * N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.5 + N[(N[(-1.0 + (-x)), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_5 \leq -1 \cdot 10^{-155}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{-181}:\\
\;\;\;\;\left(-\frac{x}{B}\right) + t\_4 \cdot \frac{1}{F}\\

\mathbf{elif}\;t\_5 \leq 20:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{2}{B \cdot \left(F \cdot F\right)}, 0.5, \frac{-1 + \left(-x\right)}{B}\right)\\


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

    1. Initial program 94.8%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. 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}} \]
    3. Applied rewrites99.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}} \]
    4. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

        \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

        \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
      18. +-commutativeN/A

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

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

      \[\leadsto \left(-x \cdot \frac{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} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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.2

        \[\leadsto \left(-x \cdot \frac{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} \]
    7. Applied rewrites99.2%

      \[\leadsto \left(-x \cdot \frac{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} \]
    8. Taylor expanded in B around 0

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

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

      if -2e21 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -1.00000000000000001e-155 or 5.0000000000000001e-181 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 20

      1. Initial program 83.8%

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

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

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

          \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

          \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
        18. +-commutativeN/A

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

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

        \[\leadsto \left(-x \cdot \frac{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} \]
      6. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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.f6483.9

          \[\leadsto \left(-x \cdot \frac{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} \]
      7. Applied rewrites83.9%

        \[\leadsto \left(-x \cdot \frac{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} \]
      8. Taylor expanded in B around 0

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

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

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

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

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

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

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

      1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 0.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. 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}} \]
        3. 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}} \]
        4. 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}} \]
        5. Taylor expanded in F around 0

          \[\leadsto \frac{-1 \cdot x}{B} \]
        6. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
          2. lower-neg.f6452.3

            \[\leadsto \frac{-x}{B} \]
        7. Applied rewrites52.3%

          \[\leadsto \frac{-x}{B} \]
        8. 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}}} \]
        9. 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. lower-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. lower-*.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) \]
        10. Applied rewrites41.6%

          \[\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) \]
        11. 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) \]
        12. 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. lower-*.f64N/A

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

            \[\leadsto \mathsf{fma}\left(\frac{2}{B \cdot \left(F \cdot F\right)}, \frac{1}{2}, \frac{-1 + \left(-x\right)}{B}\right) \]
          4. lift-*.f6475.2

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

          \[\leadsto \mathsf{fma}\left(\frac{2}{B \cdot \left(F \cdot F\right)}, 0.5, \frac{-1 + \left(-x\right)}{B}\right) \]
      10. Recombined 4 regimes into one program.
      11. Add Preprocessing

      Alternative 3: 79.3% accurate, 0.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := -x \cdot \frac{1}{\tan B}\\ t_1 := \frac{F}{\sin B}\\ t_2 := t\_0 + t\_1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ t_3 := \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}\\ t_4 := \frac{-x}{B} + \frac{\frac{F \cdot 1}{t\_3}}{\sin B}\\ t_5 := t\_0 + \frac{F \cdot \frac{1}{t\_3}}{B}\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+21}:\\ \;\;\;\;t\_5\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-155}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-181}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + t\_1 \cdot \frac{1}{F}\\ \mathbf{elif}\;t\_2 \leq 20:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;t\_5\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{2}{B \cdot \left(F \cdot F\right)}, 0.5, \frac{-1 + \left(-x\right)}{B}\right)\\ \end{array} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (let* ((t_0 (- (* x (/ 1.0 (tan B)))))
              (t_1 (/ F (sin B)))
              (t_2
               (+ t_0 (* t_1 (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
              (t_3 (sqrt (fma 2.0 x (fma F F 2.0))))
              (t_4 (+ (/ (- x) B) (/ (/ (* F 1.0) t_3) (sin B))))
              (t_5 (+ t_0 (/ (* F (/ 1.0 t_3)) B))))
         (if (<= t_2 -2e+21)
           t_5
           (if (<= t_2 -1e-155)
             t_4
             (if (<= t_2 5e-181)
               (+ (- (/ x B)) (* t_1 (/ 1.0 F)))
               (if (<= t_2 20.0)
                 t_4
                 (if (<= t_2 INFINITY)
                   t_5
                   (fma (/ 2.0 (* B (* F F))) 0.5 (/ (+ -1.0 (- x)) B)))))))))
      double code(double F, double B, double x) {
      	double t_0 = -(x * (1.0 / tan(B)));
      	double t_1 = F / sin(B);
      	double t_2 = t_0 + (t_1 * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
      	double t_3 = sqrt(fma(2.0, x, fma(F, F, 2.0)));
      	double t_4 = (-x / B) + (((F * 1.0) / t_3) / sin(B));
      	double t_5 = t_0 + ((F * (1.0 / t_3)) / B);
      	double tmp;
      	if (t_2 <= -2e+21) {
      		tmp = t_5;
      	} else if (t_2 <= -1e-155) {
      		tmp = t_4;
      	} else if (t_2 <= 5e-181) {
      		tmp = -(x / B) + (t_1 * (1.0 / F));
      	} else if (t_2 <= 20.0) {
      		tmp = t_4;
      	} else if (t_2 <= ((double) INFINITY)) {
      		tmp = t_5;
      	} else {
      		tmp = fma((2.0 / (B * (F * F))), 0.5, ((-1.0 + -x) / B));
      	}
      	return tmp;
      }
      
      function code(F, B, x)
      	t_0 = Float64(-Float64(x * Float64(1.0 / tan(B))))
      	t_1 = Float64(F / sin(B))
      	t_2 = Float64(t_0 + Float64(t_1 * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0)))))
      	t_3 = sqrt(fma(2.0, x, fma(F, F, 2.0)))
      	t_4 = Float64(Float64(Float64(-x) / B) + Float64(Float64(Float64(F * 1.0) / t_3) / sin(B)))
      	t_5 = Float64(t_0 + Float64(Float64(F * Float64(1.0 / t_3)) / B))
      	tmp = 0.0
      	if (t_2 <= -2e+21)
      		tmp = t_5;
      	elseif (t_2 <= -1e-155)
      		tmp = t_4;
      	elseif (t_2 <= 5e-181)
      		tmp = Float64(Float64(-Float64(x / B)) + Float64(t_1 * Float64(1.0 / F)));
      	elseif (t_2 <= 20.0)
      		tmp = t_4;
      	elseif (t_2 <= Inf)
      		tmp = t_5;
      	else
      		tmp = fma(Float64(2.0 / Float64(B * Float64(F * F))), 0.5, Float64(Float64(-1.0 + Float64(-x)) / B));
      	end
      	return tmp
      end
      
      code[F_, B_, x_] := Block[{t$95$0 = (-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision])}, Block[{t$95$1 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 + N[(t$95$1 * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[((-x) / B), $MachinePrecision] + N[(N[(N[(F * 1.0), $MachinePrecision] / t$95$3), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$0 + N[(N[(F * N[(1.0 / t$95$3), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+21], t$95$5, If[LessEqual[t$95$2, -1e-155], t$95$4, If[LessEqual[t$95$2, 5e-181], N[((-N[(x / B), $MachinePrecision]) + N[(t$95$1 * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 20.0], t$95$4, If[LessEqual[t$95$2, Infinity], t$95$5, N[(N[(2.0 / N[(B * N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.5 + N[(N[(-1.0 + (-x)), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := -x \cdot \frac{1}{\tan B}\\
      t_1 := \frac{F}{\sin B}\\
      t_2 := t\_0 + t\_1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\
      t_3 := \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}\\
      t_4 := \frac{-x}{B} + \frac{\frac{F \cdot 1}{t\_3}}{\sin B}\\
      t_5 := t\_0 + \frac{F \cdot \frac{1}{t\_3}}{B}\\
      \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+21}:\\
      \;\;\;\;t\_5\\
      
      \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-155}:\\
      \;\;\;\;t\_4\\
      
      \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-181}:\\
      \;\;\;\;\left(-\frac{x}{B}\right) + t\_1 \cdot \frac{1}{F}\\
      
      \mathbf{elif}\;t\_2 \leq 20:\\
      \;\;\;\;t\_4\\
      
      \mathbf{elif}\;t\_2 \leq \infty:\\
      \;\;\;\;t\_5\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(\frac{2}{B \cdot \left(F \cdot F\right)}, 0.5, \frac{-1 + \left(-x\right)}{B}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -2e21 or 20 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < +inf.0

        1. Initial program 94.8%

          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        2. 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}} \]
        3. Applied rewrites99.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}} \]
        4. Step-by-step derivation
          1. lift-pow.f64N/A

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

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

            \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

            \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
          18. +-commutativeN/A

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

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

          \[\leadsto \left(-x \cdot \frac{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} \]
        6. Taylor expanded in B around 0

          \[\leadsto \left(-x \cdot \frac{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}} \]
        7. Step-by-step derivation
          1. Applied rewrites98.7%

            \[\leadsto \left(-x \cdot \frac{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 -2e21 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -1.00000000000000001e-155 or 5.0000000000000001e-181 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 20

          1. Initial program 83.8%

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

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

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

              \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

              \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
            18. +-commutativeN/A

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

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

            \[\leadsto \left(-x \cdot \frac{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} \]
          6. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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.f6483.9

              \[\leadsto \left(-x \cdot \frac{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} \]
          7. Applied rewrites83.9%

            \[\leadsto \left(-x \cdot \frac{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} \]
          8. Taylor expanded in B around 0

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

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

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

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

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

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

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

          1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 0.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. 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}} \]
            3. 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}} \]
            4. 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}} \]
            5. Taylor expanded in F around 0

              \[\leadsto \frac{-1 \cdot x}{B} \]
            6. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
              2. lower-neg.f6452.3

                \[\leadsto \frac{-x}{B} \]
            7. Applied rewrites52.3%

              \[\leadsto \frac{-x}{B} \]
            8. 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}}} \]
            9. 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. lower-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. lower-*.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) \]
            10. Applied rewrites41.6%

              \[\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) \]
            11. 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) \]
            12. 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. lower-*.f64N/A

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

                \[\leadsto \mathsf{fma}\left(\frac{2}{B \cdot \left(F \cdot F\right)}, \frac{1}{2}, \frac{-1 + \left(-x\right)}{B}\right) \]
              4. lift-*.f6475.2

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

              \[\leadsto \mathsf{fma}\left(\frac{2}{B \cdot \left(F \cdot F\right)}, 0.5, \frac{-1 + \left(-x\right)}{B}\right) \]
          10. Recombined 4 regimes into one program.
          11. Add Preprocessing

          Alternative 4: 99.6% accurate, 1.0× speedup?

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

            1. Initial program 33.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. Taylor expanded in F around -inf

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
            3. 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.f6499.7

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

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

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

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

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

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

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

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

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

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

            if -4.50000000000000026e146 < F < 1.5e9

            1. Initial program 97.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. 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}} \]
            3. 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}} \]

            if 1.5e9 < 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. Taylor expanded in F around inf

              \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
            3. 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.8

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

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

          Alternative 5: 99.6% accurate, 1.3× speedup?

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

            1. Initial program 33.8%

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

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
            3. 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.f6499.7

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

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

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

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

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

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

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

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

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

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

            if -9.9999999999999998e146 < F < 2.59999999999999989e154

            1. Initial program 95.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. 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}} \]
            3. 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}} \]
            4. Step-by-step derivation
              1. lift-pow.f64N/A

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

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

                \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
              18. +-commutativeN/A

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

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

              \[\leadsto \left(-x \cdot \frac{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} \]
            6. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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.5

                \[\leadsto \left(-x \cdot \frac{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} \]
            7. Applied rewrites99.5%

              \[\leadsto \left(-x \cdot \frac{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 2.59999999999999989e154 < F

            1. Initial program 29.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. Taylor expanded in F around inf

              \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
            3. 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} \]
            4. Applied rewrites99.7%

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

          Alternative 6: 99.6% accurate, 1.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4.5 \cdot 10^{+146}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1500000000:\\ \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\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} \end{array} \]
          (FPCore (F B x)
           :precision binary64
           (if (<= F -4.5e+146)
             (+ (- (/ (* x 1.0) (tan B))) (/ -1.0 (sin B)))
             (if (<= F 1500000000.0)
               (+
                (- (* x (/ 1.0 (tan B))))
                (/ (* F (/ 1.0 (sqrt (fma 2.0 x (fma F F 2.0))))) (sin B)))
               (/ (- 1.0 (* (cos B) x)) (sin B)))))
          double code(double F, double B, double x) {
          	double tmp;
          	if (F <= -4.5e+146) {
          		tmp = -((x * 1.0) / tan(B)) + (-1.0 / sin(B));
          	} else if (F <= 1500000000.0) {
          		tmp = -(x * (1.0 / tan(B))) + ((F * (1.0 / sqrt(fma(2.0, x, fma(F, F, 2.0))))) / sin(B));
          	} else {
          		tmp = (1.0 - (cos(B) * x)) / sin(B);
          	}
          	return tmp;
          }
          
          function code(F, B, x)
          	tmp = 0.0
          	if (F <= -4.5e+146)
          		tmp = Float64(Float64(-Float64(Float64(x * 1.0) / tan(B))) + Float64(-1.0 / sin(B)));
          	elseif (F <= 1500000000.0)
          		tmp = Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F * Float64(1.0 / sqrt(fma(2.0, x, fma(F, F, 2.0))))) / sin(B)));
          	else
          		tmp = Float64(Float64(1.0 - Float64(cos(B) * x)) / sin(B));
          	end
          	return tmp
          end
          
          code[F_, B_, x_] := If[LessEqual[F, -4.5e+146], N[((-N[(N[(x * 1.0), $MachinePrecision] / N[Tan[B], $MachinePrecision]), $MachinePrecision]) + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1500000000.0], N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $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[(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 -4.5 \cdot 10^{+146}:\\
          \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{-1}{\sin B}\\
          
          \mathbf{elif}\;F \leq 1500000000:\\
          \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\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}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if F < -4.50000000000000026e146

            1. Initial program 33.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. Taylor expanded in F around -inf

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
            3. 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.f6499.7

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

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

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

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

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

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

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

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

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

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

            if -4.50000000000000026e146 < F < 1.5e9

            1. Initial program 97.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. 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}} \]
            3. 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}} \]
            4. Step-by-step derivation
              1. lift-pow.f64N/A

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

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

                \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
              18. +-commutativeN/A

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

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

              \[\leadsto \left(-x \cdot \frac{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} \]

            if 1.5e9 < 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. Taylor expanded in F around inf

              \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
            3. 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.8

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

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

          Alternative 7: 98.9% accurate, 1.3× speedup?

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

            1. Initial program 59.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. Taylor expanded in F around -inf

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
            3. 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.f6499.3

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

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

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

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

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

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

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

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

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

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

            if -39 < F < 5.20000000000000018

            1. Initial program 99.4%

              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
            2. 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}} \]
            3. Applied rewrites99.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}} \]
            4. Step-by-step derivation
              1. lift-pow.f64N/A

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

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

                \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
              18. +-commutativeN/A

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

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

              \[\leadsto \left(-x \cdot \frac{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} \]
            6. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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.4

                \[\leadsto \left(-x \cdot \frac{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} \]
            7. Applied rewrites99.4%

              \[\leadsto \left(-x \cdot \frac{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} \]
            8. Taylor expanded in F around 0

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

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

              if 5.20000000000000018 < F

              1. Initial program 57.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. 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}} \]
              3. Applied rewrites73.6%

                \[\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}} \]
              4. Step-by-step derivation
                1. lift-pow.f64N/A

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

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

                  \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                  \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
                18. +-commutativeN/A

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

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

                \[\leadsto \left(-x \cdot \frac{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} \]
              6. Taylor expanded in F around inf

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right)}}{\sin B} \]
            10. Recombined 3 regimes into one program.
            11. Add Preprocessing

            Alternative 8: 98.9% accurate, 1.3× speedup?

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

              1. Initial program 59.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. Taylor expanded in F around -inf

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
              3. 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.f6499.3

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

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

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

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

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

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

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

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

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

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

              if -39 < F < 5.20000000000000018

              1. Initial program 99.4%

                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
              2. 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}} \]
              3. Applied rewrites99.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}} \]
              4. Step-by-step derivation
                1. lift-pow.f64N/A

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

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

                  \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                  \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
                18. +-commutativeN/A

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

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

                \[\leadsto \left(-x \cdot \frac{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} \]
              6. Taylor expanded in F around 0

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

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

                if 5.20000000000000018 < F

                1. Initial program 57.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. 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}} \]
                3. Applied rewrites73.6%

                  \[\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}} \]
                4. Step-by-step derivation
                  1. lift-pow.f64N/A

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

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

                    \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                    \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
                  18. +-commutativeN/A

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

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

                  \[\leadsto \left(-x \cdot \frac{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} \]
                6. Taylor expanded in F around inf

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right)}}{\sin B} \]
              8. Recombined 3 regimes into one program.
              9. Add Preprocessing

              Alternative 9: 92.0% accurate, 1.3× speedup?

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

                1. Initial program 60.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. Taylor expanded in F around -inf

                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                3. 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.3

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

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

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

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

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

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

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

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

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

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

                if -1.06e-5 < F < 32

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot \sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \]
                  10. lift-*.f6483.2

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

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

                if 32 < F

                1. Initial program 57.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. 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}} \]
                3. Applied rewrites73.6%

                  \[\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}} \]
                4. Step-by-step derivation
                  1. lift-pow.f64N/A

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

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

                    \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                    \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
                  18. +-commutativeN/A

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

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

                  \[\leadsto \left(-x \cdot \frac{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} \]
                6. Taylor expanded in F around inf

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right)}}{\sin B} \]
              3. Recombined 3 regimes into one program.
              4. Add Preprocessing

              Alternative 10: 92.0% accurate, 1.3× speedup?

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

                1. Initial program 60.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. Taylor expanded in F around -inf

                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                3. 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.3

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

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

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

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

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

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

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

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

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

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

                if -1.06e-5 < F < 32

                1. Initial program 99.4%

                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                2. 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}} \]
                3. Applied rewrites99.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}} \]
                4. Step-by-step derivation
                  1. lift-pow.f64N/A

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

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

                    \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                    \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
                  18. +-commutativeN/A

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

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

                  \[\leadsto \left(-x \cdot \frac{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} \]
                6. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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.4

                    \[\leadsto \left(-x \cdot \frac{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} \]
                7. Applied rewrites99.4%

                  \[\leadsto \left(-x \cdot \frac{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} \]
                8. Taylor expanded in B around 0

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

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

                  if 32 < F

                  1. Initial program 57.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. 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}} \]
                  3. Applied rewrites73.6%

                    \[\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}} \]
                  4. Step-by-step derivation
                    1. lift-pow.f64N/A

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

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

                      \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                      \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
                    18. +-commutativeN/A

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

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

                    \[\leadsto \left(-x \cdot \frac{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} \]
                  6. Taylor expanded in F around inf

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{\color{blue}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right)}}{\sin B} \]
                10. Recombined 3 regimes into one program.
                11. Add Preprocessing

                Alternative 11: 91.9% accurate, 1.5× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.06 \cdot 10^{-5}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 0.0008:\\ \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{F \cdot 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 -1.06e-5)
                   (+ (- (/ (* x 1.0) (tan B))) (/ -1.0 (sin B)))
                   (if (<= F 0.0008)
                     (+
                      (- (* x (/ 1.0 (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 <= -1.06e-5) {
                		tmp = -((x * 1.0) / tan(B)) + (-1.0 / sin(B));
                	} else if (F <= 0.0008) {
                		tmp = -(x * (1.0 / 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 <= -1.06e-5)
                		tmp = Float64(Float64(-Float64(Float64(x * 1.0) / tan(B))) + Float64(-1.0 / sin(B)));
                	elseif (F <= 0.0008)
                		tmp = Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(Float64(F * 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, -1.06e-5], N[((-N[(N[(x * 1.0), $MachinePrecision] / N[Tan[B], $MachinePrecision]), $MachinePrecision]) + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0008], N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(N[(F * 1.0), $MachinePrecision] / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $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 -1.06 \cdot 10^{-5}:\\
                \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{-1}{\sin B}\\
                
                \mathbf{elif}\;F \leq 0.0008:\\
                \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{F \cdot 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 < -1.06e-5

                  1. Initial program 60.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. Taylor expanded in F around -inf

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                  3. 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.3

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

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

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

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

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

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

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

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

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

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

                  if -1.06e-5 < F < 8.00000000000000038e-4

                  1. Initial program 99.4%

                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                  2. 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}} \]
                  3. Applied rewrites99.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}} \]
                  4. Step-by-step derivation
                    1. lift-pow.f64N/A

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

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

                      \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                      \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
                    18. +-commutativeN/A

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

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

                    \[\leadsto \left(-x \cdot \frac{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} \]
                  6. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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.4

                      \[\leadsto \left(-x \cdot \frac{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} \]
                  7. Applied rewrites99.4%

                    \[\leadsto \left(-x \cdot \frac{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} \]
                  8. Taylor expanded in B around 0

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

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

                    if 8.00000000000000038e-4 < F

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

                      \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                    3. 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.f6498.4

                        \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
                    4. Applied rewrites98.4%

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

                  Alternative 12: 91.8% accurate, 1.5× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := -x \cdot \frac{1}{\tan B}\\ \mathbf{if}\;F \leq -1.06 \cdot 10^{-5}:\\ \;\;\;\;t\_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 0.0008:\\ \;\;\;\;t\_0 + \frac{\frac{F \cdot 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
                   (let* ((t_0 (- (* x (/ 1.0 (tan B))))))
                     (if (<= F -1.06e-5)
                       (+ t_0 (/ -1.0 (sin B)))
                       (if (<= F 0.0008)
                         (+ t_0 (/ (/ (* 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 t_0 = -(x * (1.0 / tan(B)));
                  	double tmp;
                  	if (F <= -1.06e-5) {
                  		tmp = t_0 + (-1.0 / sin(B));
                  	} else if (F <= 0.0008) {
                  		tmp = t_0 + (((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)
                  	t_0 = Float64(-Float64(x * Float64(1.0 / tan(B))))
                  	tmp = 0.0
                  	if (F <= -1.06e-5)
                  		tmp = Float64(t_0 + Float64(-1.0 / sin(B)));
                  	elseif (F <= 0.0008)
                  		tmp = Float64(t_0 + Float64(Float64(Float64(F * 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_] := Block[{t$95$0 = (-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[F, -1.06e-5], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0008], N[(t$95$0 + N[(N[(N[(F * 1.0), $MachinePrecision] / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $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}
                  t_0 := -x \cdot \frac{1}{\tan B}\\
                  \mathbf{if}\;F \leq -1.06 \cdot 10^{-5}:\\
                  \;\;\;\;t\_0 + \frac{-1}{\sin B}\\
                  
                  \mathbf{elif}\;F \leq 0.0008:\\
                  \;\;\;\;t\_0 + \frac{\frac{F \cdot 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 < -1.06e-5

                    1. Initial program 60.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. Taylor expanded in F around -inf

                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                    3. 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.3

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

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

                    if -1.06e-5 < F < 8.00000000000000038e-4

                    1. Initial program 99.4%

                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    2. 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}} \]
                    3. Applied rewrites99.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}} \]
                    4. Step-by-step derivation
                      1. lift-pow.f64N/A

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

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

                        \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                        \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
                      18. +-commutativeN/A

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

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

                      \[\leadsto \left(-x \cdot \frac{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} \]
                    6. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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.4

                        \[\leadsto \left(-x \cdot \frac{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} \]
                    7. Applied rewrites99.4%

                      \[\leadsto \left(-x \cdot \frac{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} \]
                    8. Taylor expanded in B around 0

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

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

                      if 8.00000000000000038e-4 < F

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

                        \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                      3. 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.f6498.4

                          \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
                      4. Applied rewrites98.4%

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

                    Alternative 13: 91.8% accurate, 1.6× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos B \cdot x\\ \mathbf{if}\;F \leq -1.06 \cdot 10^{-5}:\\ \;\;\;\;-\frac{1 + t\_0}{\sin B}\\ \mathbf{elif}\;F \leq 0.0008:\\ \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{F \cdot 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 -1.06e-5)
                         (- (/ (+ 1.0 t_0) (sin B)))
                         (if (<= F 0.0008)
                           (+
                            (- (* x (/ 1.0 (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 <= -1.06e-5) {
                    		tmp = -((1.0 + t_0) / sin(B));
                    	} else if (F <= 0.0008) {
                    		tmp = -(x * (1.0 / 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 <= -1.06e-5)
                    		tmp = Float64(-Float64(Float64(1.0 + t_0) / sin(B)));
                    	elseif (F <= 0.0008)
                    		tmp = Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(Float64(F * 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, -1.06e-5], (-N[(N[(1.0 + t$95$0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 0.0008], N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(N[(F * 1.0), $MachinePrecision] / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $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 -1.06 \cdot 10^{-5}:\\
                    \;\;\;\;-\frac{1 + t\_0}{\sin B}\\
                    
                    \mathbf{elif}\;F \leq 0.0008:\\
                    \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{F \cdot 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 < -1.06e-5

                      1. Initial program 60.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. Taylor expanded in F around -inf

                        \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
                      3. 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.f6498.4

                          \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
                      4. Applied rewrites98.4%

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

                      if -1.06e-5 < F < 8.00000000000000038e-4

                      1. Initial program 99.4%

                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      2. 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}} \]
                      3. Applied rewrites99.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}} \]
                      4. Step-by-step derivation
                        1. lift-pow.f64N/A

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

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

                          \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                          \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
                        18. +-commutativeN/A

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

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

                        \[\leadsto \left(-x \cdot \frac{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} \]
                      6. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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.4

                          \[\leadsto \left(-x \cdot \frac{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} \]
                      7. Applied rewrites99.4%

                        \[\leadsto \left(-x \cdot \frac{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} \]
                      8. Taylor expanded in B around 0

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

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

                        if 8.00000000000000038e-4 < F

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

                          \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                        3. 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.f6498.4

                            \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
                        4. Applied rewrites98.4%

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

                      Alternative 14: 84.4% accurate, 1.6× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -5 \cdot 10^{+82}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B}\\ \mathbf{elif}\;F \leq 0.0008:\\ \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{F \cdot 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 -5e+82)
                         (+
                          (- (/ (* x 1.0) (tan B)))
                          (/ -1.0 (* (fma -0.16666666666666666 (* B B) 1.0) B)))
                         (if (<= F 0.0008)
                           (+
                            (- (* x (/ 1.0 (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 <= -5e+82) {
                      		tmp = -((x * 1.0) / tan(B)) + (-1.0 / (fma(-0.16666666666666666, (B * B), 1.0) * B));
                      	} else if (F <= 0.0008) {
                      		tmp = -(x * (1.0 / 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 <= -5e+82)
                      		tmp = Float64(Float64(-Float64(Float64(x * 1.0) / tan(B))) + Float64(-1.0 / Float64(fma(-0.16666666666666666, Float64(B * B), 1.0) * B)));
                      	elseif (F <= 0.0008)
                      		tmp = Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(Float64(F * 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, -5e+82], N[((-N[(N[(x * 1.0), $MachinePrecision] / N[Tan[B], $MachinePrecision]), $MachinePrecision]) + N[(-1.0 / N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0008], N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(N[(F * 1.0), $MachinePrecision] / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $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 -5 \cdot 10^{+82}:\\
                      \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B}\\
                      
                      \mathbf{elif}\;F \leq 0.0008:\\
                      \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{\frac{F \cdot 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 < -5.00000000000000015e82

                        1. Initial program 48.2%

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                        3. 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.f6499.7

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                        5. 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)}} \]
                        6. 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-*.f6474.2

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                        7. Applied rewrites74.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}} \]
                        8. Step-by-step derivation
                          1. lift-*.f64N/A

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

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

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

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

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

                            \[\leadsto \left(-\frac{\color{blue}{x \cdot 1}}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                          7. lift-tan.f6474.3

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

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

                        if -5.00000000000000015e82 < F < 8.00000000000000038e-4

                        1. Initial program 98.8%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. 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}} \]
                        3. 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}} \]
                        4. Step-by-step derivation
                          1. lift-pow.f64N/A

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

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

                            \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                            \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
                          18. +-commutativeN/A

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

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

                          \[\leadsto \left(-x \cdot \frac{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} \]
                        6. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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.5

                            \[\leadsto \left(-x \cdot \frac{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} \]
                        7. Applied rewrites99.5%

                          \[\leadsto \left(-x \cdot \frac{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} \]
                        8. Taylor expanded in B around 0

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

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

                          if 8.00000000000000038e-4 < F

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

                            \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                          3. 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.f6498.4

                              \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
                          4. Applied rewrites98.4%

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

                        Alternative 15: 78.7% accurate, 2.0× speedup?

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

                          1. Initial program 48.2%

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

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                          3. 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.f6499.7

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

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                          5. 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)}} \]
                          6. 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-*.f6474.2

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                          7. Applied rewrites74.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}} \]
                          8. Step-by-step derivation
                            1. lift-*.f64N/A

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

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

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

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

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

                              \[\leadsto \left(-\frac{\color{blue}{x \cdot 1}}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \]
                            7. lift-tan.f6474.3

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

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

                          if -5.00000000000000015e82 < F < 800

                          1. Initial program 98.8%

                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          2. 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}} \]
                          3. 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}} \]
                          4. Step-by-step derivation
                            1. lift-pow.f64N/A

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

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

                              \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                              \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
                            18. +-commutativeN/A

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

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

                            \[\leadsto \left(-x \cdot \frac{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} \]
                          6. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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.5

                              \[\leadsto \left(-x \cdot \frac{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} \]
                          7. Applied rewrites99.5%

                            \[\leadsto \left(-x \cdot \frac{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} \]
                          8. Taylor expanded in B around 0

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

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

                            if 800 < F

                            1. Initial program 57.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. Taylor expanded in F around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(-\frac{x}{B}\right) + \color{blue}{\frac{F \cdot \frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right)}{F}}{\sin B}} \]
                          10. Recombined 3 regimes into one program.
                          11. Add Preprocessing

                          Alternative 16: 77.2% accurate, 2.1× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{-15}:\\ \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B}\\ \mathbf{elif}\;x \leq 4.1 \cdot 10^{-5}:\\ \;\;\;\;\frac{-x}{B} + \frac{\frac{F \cdot 1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \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 (<= x -2.2e-15)
                             (+ (- (* x (/ 1.0 (tan B)))) (/ -1.0 B))
                             (if (<= x 4.1e-5)
                               (+ (/ (- x) B) (/ (/ (* F 1.0) (sqrt (fma 2.0 x (fma F F 2.0)))) (sin 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 (x <= -2.2e-15) {
                          		tmp = -(x * (1.0 / tan(B))) + (-1.0 / B);
                          	} else if (x <= 4.1e-5) {
                          		tmp = (-x / B) + (((F * 1.0) / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / sin(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 (x <= -2.2e-15)
                          		tmp = Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(-1.0 / B));
                          	elseif (x <= 4.1e-5)
                          		tmp = Float64(Float64(Float64(-x) / B) + Float64(Float64(Float64(F * 1.0) / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / sin(B)));
                          	else
                          		tmp = Float64(Float64(-Float64(Float64(x * 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[x, -2.2e-15], N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.1e-5], N[(N[((-x) / B), $MachinePrecision] + N[(N[(N[(F * 1.0), $MachinePrecision] / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-N[(N[(x * 1.0), $MachinePrecision] / N[Tan[B], $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}\;x \leq -2.2 \cdot 10^{-15}:\\
                          \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B}\\
                          
                          \mathbf{elif}\;x \leq 4.1 \cdot 10^{-5}:\\
                          \;\;\;\;\frac{-x}{B} + \frac{\frac{F \cdot 1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if x < -2.19999999999999986e-15

                            1. Initial program 69.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. Taylor expanded in F around -inf

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                            3. 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.f6489.5

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

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

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

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

                              if -2.19999999999999986e-15 < x < 4.10000000000000005e-5

                              1. Initial program 72.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. 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}} \]
                              3. Applied rewrites75.9%

                                \[\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}} \]
                              4. Step-by-step derivation
                                1. lift-pow.f64N/A

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

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

                                  \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                                  \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
                                18. +-commutativeN/A

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

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

                                \[\leadsto \left(-x \cdot \frac{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} \]
                              6. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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.f6475.9

                                  \[\leadsto \left(-x \cdot \frac{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} \]
                              7. Applied rewrites75.9%

                                \[\leadsto \left(-x \cdot \frac{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} \]
                              8. Taylor expanded in B around 0

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

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

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

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

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

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

                              if 4.10000000000000005e-5 < x

                              1. Initial program 88.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. Taylor expanded in F around -inf

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                              3. 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.f6496.6

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

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                              5. 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)}} \]
                              6. 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-*.f6496.9

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                              7. Applied rewrites96.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}} \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

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

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

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

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

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

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

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

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

                            Alternative 17: 77.2% accurate, 2.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{-15}:\\ \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B}\\ \mathbf{elif}\;x \leq 4.1 \cdot 10^{-5}:\\ \;\;\;\;\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}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \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 (<= x -2.2e-15)
                               (+ (- (* x (/ 1.0 (tan B)))) (/ -1.0 B))
                               (if (<= x 4.1e-5)
                                 (+ (/ (- x) B) (/ (* F (/ 1.0 (sqrt (fma 2.0 x (fma F F 2.0))))) (sin 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 (x <= -2.2e-15) {
                            		tmp = -(x * (1.0 / tan(B))) + (-1.0 / B);
                            	} else if (x <= 4.1e-5) {
                            		tmp = (-x / B) + ((F * (1.0 / sqrt(fma(2.0, x, fma(F, F, 2.0))))) / sin(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 (x <= -2.2e-15)
                            		tmp = Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(-1.0 / B));
                            	elseif (x <= 4.1e-5)
                            		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(Float64(-Float64(Float64(x * 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[x, -2.2e-15], N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.1e-5], 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[((-N[(N[(x * 1.0), $MachinePrecision] / N[Tan[B], $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}\;x \leq -2.2 \cdot 10^{-15}:\\
                            \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B}\\
                            
                            \mathbf{elif}\;x \leq 4.1 \cdot 10^{-5}:\\
                            \;\;\;\;\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}:\\
                            \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if x < -2.19999999999999986e-15

                              1. Initial program 69.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. Taylor expanded in F around -inf

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                              3. 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.f6489.5

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

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

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

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

                                if -2.19999999999999986e-15 < x < 4.10000000000000005e-5

                                1. Initial program 72.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. 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}} \]
                                3. Applied rewrites75.9%

                                  \[\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}} \]
                                4. Step-by-step derivation
                                  1. lift-pow.f64N/A

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

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

                                    \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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. pow2N/A

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

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

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

                                    \[\leadsto \left(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{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(-x \cdot \frac{1}{\tan B}\right) + \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + \left(\color{blue}{F \cdot F} + 2\right)}}}{\sin B} \]
                                  18. +-commutativeN/A

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

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

                                  \[\leadsto \left(-x \cdot \frac{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} \]
                                6. 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} \]
                                7. Step-by-step derivation
                                  1. 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} \]
                                  2. 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} \]
                                  3. lift-neg.f64N/A

                                    \[\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} \]
                                  4. lower-/.f6464.1

                                    \[\leadsto \frac{-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} \]
                                8. Applied rewrites64.1%

                                  \[\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 4.10000000000000005e-5 < x

                                1. Initial program 88.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. Taylor expanded in F around -inf

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                                3. 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.f6496.6

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

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                                5. 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)}} \]
                                6. 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-*.f6496.9

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} \]
                                7. Applied rewrites96.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}} \]
                                8. Step-by-step derivation
                                  1. lift-*.f64N/A

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

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

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

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

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

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

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

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

                              Alternative 18: 68.7% accurate, 2.3× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{-90}:\\ \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B}\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-38}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \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 (<= x -6e-90)
                                 (+ (- (* x (/ 1.0 (tan B)))) (/ -1.0 B))
                                 (if (<= x 4.5e-38)
                                   (* (sqrt (/ 1.0 (fma F F 2.0))) (/ F (sin 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 (x <= -6e-90) {
                              		tmp = -(x * (1.0 / tan(B))) + (-1.0 / B);
                              	} else if (x <= 4.5e-38) {
                              		tmp = sqrt((1.0 / fma(F, F, 2.0))) * (F / sin(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 (x <= -6e-90)
                              		tmp = Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(-1.0 / B));
                              	elseif (x <= 4.5e-38)
                              		tmp = Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * Float64(F / sin(B)));
                              	else
                              		tmp = Float64(Float64(-Float64(Float64(x * 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[x, -6e-90], N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e-38], N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-N[(N[(x * 1.0), $MachinePrecision] / N[Tan[B], $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}\;x \leq -6 \cdot 10^{-90}:\\
                              \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B}\\
                              
                              \mathbf{elif}\;x \leq 4.5 \cdot 10^{-38}:\\
                              \;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\sin B}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(-\frac{x \cdot 1}{\tan B}\right) + \frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if x < -6.00000000000000041e-90

                                1. Initial program 70.6%

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

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                                3. 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.f6466.8

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

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

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

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

                                  if -6.00000000000000041e-90 < x < 4.50000000000000009e-38

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

                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
                                  3. 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. lower-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-/.f6452.6

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

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

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

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

                                      \[\leadsto \sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{\sin B} \]
                                    4. pow2N/A

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

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

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

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

                                      \[\leadsto \sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{\sin B} \]
                                    9. lift-fma.f6452.6

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

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

                                  if 4.50000000000000009e-38 < x

                                  1. Initial program 86.9%

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

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                                  3. 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} \]
                                  4. Applied rewrites90.0%

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                                  5. 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)}} \]
                                  6. 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-*.f6491.8

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

                                    \[\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}} \]
                                  8. Step-by-step derivation
                                    1. lift-*.f64N/A

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

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

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

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

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

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

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

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

                                Alternative 19: 68.6% accurate, 2.4× speedup?

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

                                  1. Initial program 81.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. Taylor expanded in F around -inf

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                                  3. 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.f6481.5

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

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

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

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

                                    if -6.00000000000000041e-90 < x < 4.50000000000000009e-38

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

                                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
                                    3. 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. lower-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-/.f6452.6

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

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

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

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

                                        \[\leadsto \sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{\sin B} \]
                                      4. pow2N/A

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

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

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

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

                                        \[\leadsto \sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{\sin B} \]
                                      9. lift-fma.f6452.6

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

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

                                  Alternative 20: 56.1% accurate, 2.6× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 1.35 \cdot 10^{-10}:\\ \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B}\\ \end{array} \end{array} \]
                                  (FPCore (F B x)
                                   :precision binary64
                                   (if (<= B 1.35e-10)
                                     (/ (- (* (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 <= 1.35e-10) {
                                  		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 <= 1.35e-10)
                                  		tmp = Float64(Float64(Float64(sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))) * F) - x) / B);
                                  	else
                                  		tmp = Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(-1.0 / B));
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[F_, B_, x_] := If[LessEqual[B, 1.35e-10], 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 1.35 \cdot 10^{-10}:\\
                                  \;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot F - x}{B}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if B < 1.35e-10

                                    1. Initial program 74.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. 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}} \]
                                    3. 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}} \]
                                    4. Applied rewrites57.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 1.35e-10 < B

                                    1. Initial program 84.8%

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

                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                                    3. 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.f6456.6

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

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

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

                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B} \]
                                    7. Recombined 2 regimes into one program.
                                    8. Add Preprocessing

                                    Alternative 21: 59.1% accurate, 2.7× speedup?

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

                                      1. Initial program 60.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. Taylor expanded in F around -inf

                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                                      3. 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.3

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

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

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

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

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

                                      if -1.06e-5 < F < 1.4e6

                                      1. Initial program 99.4%

                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      2. 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}} \]
                                      3. 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}} \]
                                      4. Applied rewrites52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 1.4e6 < F

                                      1. Initial program 57.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. 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}} \]
                                      3. 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}} \]
                                      4. Applied rewrites39.1%

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

                                        \[\leadsto \frac{1 - x}{B} \]
                                      6. Step-by-step derivation
                                        1. lower--.f6452.5

                                          \[\leadsto \frac{1 - x}{B} \]
                                      7. Applied rewrites52.5%

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

                                    Alternative 22: 51.9% accurate, 5.7× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -58000000000:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B}\\ \mathbf{elif}\;F \leq 200000000000:\\ \;\;\;\;\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(-0.5, \frac{2 + 2 \cdot x}{B \cdot \left(F \cdot F\right)}, \frac{1 - x}{B}\right)\\ \end{array} \end{array} \]
                                    (FPCore (F B x)
                                     :precision binary64
                                     (if (<= F -58000000000.0)
                                       (+ (- (/ x B)) (/ (- (* (* B B) -0.16666666666666666) 1.0) B))
                                       (if (<= F 200000000000.0)
                                         (/ (- (* (sqrt (/ 1.0 (fma 2.0 x (fma F F 2.0)))) F) x) B)
                                         (fma -0.5 (/ (+ 2.0 (* 2.0 x)) (* B (* F F))) (/ (- 1.0 x) B)))))
                                    double code(double F, double B, double x) {
                                    	double tmp;
                                    	if (F <= -58000000000.0) {
                                    		tmp = -(x / B) + ((((B * B) * -0.16666666666666666) - 1.0) / B);
                                    	} else if (F <= 200000000000.0) {
                                    		tmp = ((sqrt((1.0 / fma(2.0, x, fma(F, F, 2.0)))) * F) - x) / B;
                                    	} else {
                                    		tmp = fma(-0.5, ((2.0 + (2.0 * x)) / (B * (F * F))), ((1.0 - x) / B));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(F, B, x)
                                    	tmp = 0.0
                                    	if (F <= -58000000000.0)
                                    		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(Float64(B * B) * -0.16666666666666666) - 1.0) / B));
                                    	elseif (F <= 200000000000.0)
                                    		tmp = Float64(Float64(Float64(sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))) * F) - x) / B);
                                    	else
                                    		tmp = fma(-0.5, Float64(Float64(2.0 + Float64(2.0 * x)) / Float64(B * Float64(F * F))), Float64(Float64(1.0 - x) / B));
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[F_, B_, x_] := If[LessEqual[F, -58000000000.0], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 200000000000.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[(-0.5 * N[(N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision] / N[(B * N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;F \leq -58000000000:\\
                                    \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B}\\
                                    
                                    \mathbf{elif}\;F \leq 200000000000:\\
                                    \;\;\;\;\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(-0.5, \frac{2 + 2 \cdot x}{B \cdot \left(F \cdot F\right)}, \frac{1 - x}{B}\right)\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if F < -5.8e10

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

                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                                      3. 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.f6499.7

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

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

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

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

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

                                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                      9. 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-*.f6451.1

                                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B} \]
                                      10. Applied rewrites51.1%

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

                                      if -5.8e10 < F < 2e11

                                      1. Initial program 99.4%

                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      2. 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}} \]
                                      3. 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}} \]
                                      4. Applied rewrites52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 2e11 < F

                                      1. Initial program 56.8%

                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      2. 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}} \]
                                      3. 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}} \]
                                      4. Applied rewrites39.0%

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

                                        \[\leadsto \frac{1 - x}{B} \]
                                      6. Step-by-step derivation
                                        1. lower--.f6452.6

                                          \[\leadsto \frac{1 - x}{B} \]
                                      7. Applied rewrites52.6%

                                        \[\leadsto \frac{1 - x}{B} \]
                                      8. 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}} \]
                                      9. 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. div-subN/A

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

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

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

                                    Alternative 23: 51.6% accurate, 5.9× speedup?

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

                                      1. Initial program 59.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. Taylor expanded in F around -inf

                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                                      3. 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.f6499.3

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

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

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

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

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

                                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                      9. 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-*.f6450.7

                                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B} \]
                                      10. Applied rewrites50.7%

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

                                      if -39 < F < 3.5

                                      1. Initial program 99.4%

                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      2. 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}} \]
                                      3. 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}} \]
                                      4. Applied rewrites52.2%

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

                                        \[\leadsto \frac{\sqrt{\frac{1}{2 + 2 \cdot x}} \cdot F - x}{B} \]
                                      6. Step-by-step derivation
                                        1. inv-powN/A

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

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

                                          \[\leadsto \frac{\sqrt{{\left(2 \cdot x + 2\right)}^{-1}} \cdot F - x}{B} \]
                                        4. lift-fma.f6451.7

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

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

                                        \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F - x}{B} \]
                                      9. Step-by-step derivation
                                        1. Applied rewrites51.7%

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

                                        if 3.5 < F

                                        1. Initial program 57.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. 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}} \]
                                        3. 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}} \]
                                        4. Applied rewrites39.2%

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

                                          \[\leadsto \frac{1 - x}{B} \]
                                        6. Step-by-step derivation
                                          1. lower--.f6452.2

                                            \[\leadsto \frac{1 - x}{B} \]
                                        7. Applied rewrites52.2%

                                          \[\leadsto \frac{1 - x}{B} \]
                                        8. 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}} \]
                                        9. 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. div-subN/A

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

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

                                          \[\leadsto \mathsf{fma}\left(-0.5, \color{blue}{\frac{2 + 2 \cdot x}{B \cdot \left(F \cdot F\right)}}, \frac{1 - x}{B}\right) \]
                                      10. Recombined 3 regimes into one program.
                                      11. Add Preprocessing

                                      Alternative 24: 51.6% accurate, 6.7× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -39:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B}\\ \mathbf{elif}\;F \leq 3.5:\\ \;\;\;\;\frac{\sqrt{0.5} \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 -39.0)
                                         (+ (- (/ x B)) (/ (- (* (* B B) -0.16666666666666666) 1.0) B))
                                         (if (<= F 3.5)
                                           (/ (- (* (sqrt 0.5) 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 <= -39.0) {
                                      		tmp = -(x / B) + ((((B * B) * -0.16666666666666666) - 1.0) / B);
                                      	} else if (F <= 3.5) {
                                      		tmp = ((sqrt(0.5) * 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 <= -39.0)
                                      		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(Float64(B * B) * -0.16666666666666666) - 1.0) / B));
                                      	elseif (F <= 3.5)
                                      		tmp = Float64(Float64(Float64(sqrt(0.5) * 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, -39.0], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.5], N[(N[(N[(N[Sqrt[0.5], $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 -39:\\
                                      \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B}\\
                                      
                                      \mathbf{elif}\;F \leq 3.5:\\
                                      \;\;\;\;\frac{\sqrt{0.5} \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 < -39

                                        1. Initial program 59.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. Taylor expanded in F around -inf

                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                                        3. 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.f6499.3

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

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

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

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

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

                                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                        9. 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-*.f6450.7

                                            \[\leadsto \left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B} \]
                                        10. Applied rewrites50.7%

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

                                        if -39 < F < 3.5

                                        1. Initial program 99.4%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. 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}} \]
                                        3. 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}} \]
                                        4. Applied rewrites52.2%

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

                                          \[\leadsto \frac{\sqrt{\frac{1}{2 + 2 \cdot x}} \cdot F - x}{B} \]
                                        6. Step-by-step derivation
                                          1. inv-powN/A

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

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

                                            \[\leadsto \frac{\sqrt{{\left(2 \cdot x + 2\right)}^{-1}} \cdot F - x}{B} \]
                                          4. lift-fma.f6451.7

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

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

                                          \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F - x}{B} \]
                                        9. Step-by-step derivation
                                          1. Applied rewrites51.7%

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

                                          if 3.5 < F

                                          1. Initial program 57.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. 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}} \]
                                          3. 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}} \]
                                          4. Applied rewrites39.2%

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

                                            \[\leadsto \frac{-1 \cdot x}{B} \]
                                          6. Step-by-step derivation
                                            1. mul-1-negN/A

                                              \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                            2. lower-neg.f6425.7

                                              \[\leadsto \frac{-x}{B} \]
                                          7. Applied rewrites25.7%

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

                                            \[\leadsto \frac{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B} \]
                                          9. Step-by-step derivation
                                            1. metadata-evalN/A

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

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

                                              \[\leadsto \frac{\left(1 + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B} \]
                                          10. Applied rewrites52.2%

                                            \[\leadsto \frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B} \]
                                        10. Recombined 3 regimes into one program.
                                        11. Add Preprocessing

                                        Alternative 25: 51.5% accurate, 7.8× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -39:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B}\\ \mathbf{elif}\;F \leq 0.0008:\\ \;\;\;\;\frac{\sqrt{0.5} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                        (FPCore (F B x)
                                         :precision binary64
                                         (if (<= F -39.0)
                                           (+ (- (/ x B)) (/ (- (* (* B B) -0.16666666666666666) 1.0) B))
                                           (if (<= F 0.0008) (/ (- (* (sqrt 0.5) F) x) B) (/ (- 1.0 x) B))))
                                        double code(double F, double B, double x) {
                                        	double tmp;
                                        	if (F <= -39.0) {
                                        		tmp = -(x / B) + ((((B * B) * -0.16666666666666666) - 1.0) / B);
                                        	} else if (F <= 0.0008) {
                                        		tmp = ((sqrt(0.5) * F) - 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 <= (-39.0d0)) then
                                                tmp = -(x / b) + ((((b * b) * (-0.16666666666666666d0)) - 1.0d0) / b)
                                            else if (f <= 0.0008d0) then
                                                tmp = ((sqrt(0.5d0) * f) - 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 <= -39.0) {
                                        		tmp = -(x / B) + ((((B * B) * -0.16666666666666666) - 1.0) / B);
                                        	} else if (F <= 0.0008) {
                                        		tmp = ((Math.sqrt(0.5) * F) - x) / B;
                                        	} else {
                                        		tmp = (1.0 - x) / B;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(F, B, x):
                                        	tmp = 0
                                        	if F <= -39.0:
                                        		tmp = -(x / B) + ((((B * B) * -0.16666666666666666) - 1.0) / B)
                                        	elif F <= 0.0008:
                                        		tmp = ((math.sqrt(0.5) * F) - x) / B
                                        	else:
                                        		tmp = (1.0 - x) / B
                                        	return tmp
                                        
                                        function code(F, B, x)
                                        	tmp = 0.0
                                        	if (F <= -39.0)
                                        		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(Float64(Float64(B * B) * -0.16666666666666666) - 1.0) / B));
                                        	elseif (F <= 0.0008)
                                        		tmp = Float64(Float64(Float64(sqrt(0.5) * F) - 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 <= -39.0)
                                        		tmp = -(x / B) + ((((B * B) * -0.16666666666666666) - 1.0) / B);
                                        	elseif (F <= 0.0008)
                                        		tmp = ((sqrt(0.5) * F) - x) / B;
                                        	else
                                        		tmp = (1.0 - x) / B;
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[F_, B_, x_] := If[LessEqual[F, -39.0], N[((-N[(x / B), $MachinePrecision]) + N[(N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0008], N[(N[(N[(N[Sqrt[0.5], $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;F \leq -39:\\
                                        \;\;\;\;\left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B}\\
                                        
                                        \mathbf{elif}\;F \leq 0.0008:\\
                                        \;\;\;\;\frac{\sqrt{0.5} \cdot F - x}{B}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\frac{1 - x}{B}\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if F < -39

                                          1. Initial program 59.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. Taylor expanded in F around -inf

                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
                                          3. 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.f6499.3

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

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

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

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

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

                                            \[\leadsto \left(-\frac{x}{B}\right) + \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                          9. 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-*.f6450.7

                                              \[\leadsto \left(-\frac{x}{B}\right) + \frac{\left(B \cdot B\right) \cdot -0.16666666666666666 - 1}{B} \]
                                          10. Applied rewrites50.7%

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

                                          if -39 < F < 8.00000000000000038e-4

                                          1. Initial program 99.4%

                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                          2. 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}} \]
                                          3. 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}} \]
                                          4. Applied rewrites52.1%

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

                                            \[\leadsto \frac{\sqrt{\frac{1}{2 + 2 \cdot x}} \cdot F - x}{B} \]
                                          6. Step-by-step derivation
                                            1. inv-powN/A

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

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

                                              \[\leadsto \frac{\sqrt{{\left(2 \cdot x + 2\right)}^{-1}} \cdot F - x}{B} \]
                                            4. lift-fma.f6451.9

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

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

                                            \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F - x}{B} \]
                                          9. Step-by-step derivation
                                            1. Applied rewrites51.8%

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

                                            if 8.00000000000000038e-4 < F

                                            1. Initial program 58.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. 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}} \]
                                            3. 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}} \]
                                            4. Applied rewrites39.5%

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

                                              \[\leadsto \frac{1 - x}{B} \]
                                            6. Step-by-step derivation
                                              1. lower--.f6451.9

                                                \[\leadsto \frac{1 - x}{B} \]
                                            7. Applied rewrites51.9%

                                              \[\leadsto \frac{1 - x}{B} \]
                                          10. Recombined 3 regimes into one program.
                                          11. Add Preprocessing

                                          Alternative 26: 51.5% accurate, 8.8× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.06 \cdot 10^{-5}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 0.0008:\\ \;\;\;\;\frac{\sqrt{0.5} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                          (FPCore (F B x)
                                           :precision binary64
                                           (if (<= F -1.06e-5)
                                             (/ (- -1.0 x) B)
                                             (if (<= F 0.0008) (/ (- (* (sqrt 0.5) F) x) B) (/ (- 1.0 x) B))))
                                          double code(double F, double B, double x) {
                                          	double tmp;
                                          	if (F <= -1.06e-5) {
                                          		tmp = (-1.0 - x) / B;
                                          	} else if (F <= 0.0008) {
                                          		tmp = ((sqrt(0.5) * F) - 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.06d-5)) then
                                                  tmp = ((-1.0d0) - x) / b
                                              else if (f <= 0.0008d0) then
                                                  tmp = ((sqrt(0.5d0) * f) - 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.06e-5) {
                                          		tmp = (-1.0 - x) / B;
                                          	} else if (F <= 0.0008) {
                                          		tmp = ((Math.sqrt(0.5) * F) - x) / B;
                                          	} else {
                                          		tmp = (1.0 - x) / B;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(F, B, x):
                                          	tmp = 0
                                          	if F <= -1.06e-5:
                                          		tmp = (-1.0 - x) / B
                                          	elif F <= 0.0008:
                                          		tmp = ((math.sqrt(0.5) * F) - x) / B
                                          	else:
                                          		tmp = (1.0 - x) / B
                                          	return tmp
                                          
                                          function code(F, B, x)
                                          	tmp = 0.0
                                          	if (F <= -1.06e-5)
                                          		tmp = Float64(Float64(-1.0 - x) / B);
                                          	elseif (F <= 0.0008)
                                          		tmp = Float64(Float64(Float64(sqrt(0.5) * F) - 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.06e-5)
                                          		tmp = (-1.0 - x) / B;
                                          	elseif (F <= 0.0008)
                                          		tmp = ((sqrt(0.5) * F) - x) / B;
                                          	else
                                          		tmp = (1.0 - x) / B;
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[F_, B_, x_] := If[LessEqual[F, -1.06e-5], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.0008], N[(N[(N[(N[Sqrt[0.5], $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;F \leq -1.06 \cdot 10^{-5}:\\
                                          \;\;\;\;\frac{-1 - x}{B}\\
                                          
                                          \mathbf{elif}\;F \leq 0.0008:\\
                                          \;\;\;\;\frac{\sqrt{0.5} \cdot F - x}{B}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\frac{1 - x}{B}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 3 regimes
                                          2. if F < -1.06e-5

                                            1. Initial program 60.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. 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}} \]
                                            3. 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}} \]
                                            4. Applied rewrites38.0%

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

                                              \[\leadsto \frac{\sqrt{\frac{1}{2 + 2 \cdot x}} \cdot F - x}{B} \]
                                            6. Step-by-step derivation
                                              1. inv-powN/A

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

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

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

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

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

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

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

                                              if -1.06e-5 < F < 8.00000000000000038e-4

                                              1. Initial program 99.4%

                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                              2. 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}} \]
                                              3. 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}} \]
                                              4. Applied rewrites52.1%

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

                                                \[\leadsto \frac{\sqrt{\frac{1}{2 + 2 \cdot x}} \cdot F - x}{B} \]
                                              6. Step-by-step derivation
                                                1. inv-powN/A

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

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

                                                  \[\leadsto \frac{\sqrt{{\left(2 \cdot x + 2\right)}^{-1}} \cdot F - x}{B} \]
                                                4. lift-fma.f6452.0

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

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

                                                \[\leadsto \frac{\sqrt{\frac{1}{2}} \cdot F - x}{B} \]
                                              9. Step-by-step derivation
                                                1. Applied rewrites52.0%

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

                                                if 8.00000000000000038e-4 < F

                                                1. Initial program 58.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. 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}} \]
                                                3. 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}} \]
                                                4. Applied rewrites39.5%

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

                                                  \[\leadsto \frac{1 - x}{B} \]
                                                6. Step-by-step derivation
                                                  1. lower--.f6451.9

                                                    \[\leadsto \frac{1 - x}{B} \]
                                                7. Applied rewrites51.9%

                                                  \[\leadsto \frac{1 - x}{B} \]
                                              10. Recombined 3 regimes into one program.
                                              11. Add Preprocessing

                                              Alternative 27: 43.3% accurate, 13.6× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-154}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.15 \cdot 10^{-27}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                              (FPCore (F B x)
                                               :precision binary64
                                               (if (<= F -4e-154)
                                                 (/ (- -1.0 x) B)
                                                 (if (<= F 1.15e-27) (/ (- x) B) (/ (- 1.0 x) B))))
                                              double code(double F, double B, double x) {
                                              	double tmp;
                                              	if (F <= -4e-154) {
                                              		tmp = (-1.0 - x) / B;
                                              	} else if (F <= 1.15e-27) {
                                              		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 <= (-4d-154)) then
                                                      tmp = ((-1.0d0) - x) / b
                                                  else if (f <= 1.15d-27) then
                                                      tmp = -x / b
                                                  else
                                                      tmp = (1.0d0 - x) / b
                                                  end if
                                                  code = tmp
                                              end function
                                              
                                              public static double code(double F, double B, double x) {
                                              	double tmp;
                                              	if (F <= -4e-154) {
                                              		tmp = (-1.0 - x) / B;
                                              	} else if (F <= 1.15e-27) {
                                              		tmp = -x / B;
                                              	} else {
                                              		tmp = (1.0 - x) / B;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(F, B, x):
                                              	tmp = 0
                                              	if F <= -4e-154:
                                              		tmp = (-1.0 - x) / B
                                              	elif F <= 1.15e-27:
                                              		tmp = -x / B
                                              	else:
                                              		tmp = (1.0 - x) / B
                                              	return tmp
                                              
                                              function code(F, B, x)
                                              	tmp = 0.0
                                              	if (F <= -4e-154)
                                              		tmp = Float64(Float64(-1.0 - x) / B);
                                              	elseif (F <= 1.15e-27)
                                              		tmp = Float64(Float64(-x) / B);
                                              	else
                                              		tmp = Float64(Float64(1.0 - x) / B);
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(F, B, x)
                                              	tmp = 0.0;
                                              	if (F <= -4e-154)
                                              		tmp = (-1.0 - x) / B;
                                              	elseif (F <= 1.15e-27)
                                              		tmp = -x / B;
                                              	else
                                              		tmp = (1.0 - x) / B;
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[F_, B_, x_] := If[LessEqual[F, -4e-154], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.15e-27], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              \mathbf{if}\;F \leq -4 \cdot 10^{-154}:\\
                                              \;\;\;\;\frac{-1 - x}{B}\\
                                              
                                              \mathbf{elif}\;F \leq 1.15 \cdot 10^{-27}:\\
                                              \;\;\;\;\frac{-x}{B}\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;\frac{1 - x}{B}\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if F < -3.9999999999999999e-154

                                                1. Initial program 70.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. 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}} \]
                                                3. 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}} \]
                                                4. Applied rewrites41.8%

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

                                                  \[\leadsto \frac{\sqrt{\frac{1}{2 + 2 \cdot x}} \cdot F - x}{B} \]
                                                6. Step-by-step derivation
                                                  1. inv-powN/A

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

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

                                                    \[\leadsto \frac{\sqrt{{\left(2 \cdot x + 2\right)}^{-1}} \cdot F - x}{B} \]
                                                  4. lift-fma.f6423.9

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

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

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

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

                                                  if -3.9999999999999999e-154 < F < 1.15e-27

                                                  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. 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}} \]
                                                  3. 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}} \]
                                                  4. Applied rewrites52.0%

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

                                                    \[\leadsto \frac{-1 \cdot x}{B} \]
                                                  6. Step-by-step derivation
                                                    1. mul-1-negN/A

                                                      \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                                    2. lower-neg.f6438.3

                                                      \[\leadsto \frac{-x}{B} \]
                                                  7. Applied rewrites38.3%

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

                                                  if 1.15e-27 < F

                                                  1. Initial program 60.9%

                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                  2. 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}} \]
                                                  3. 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}} \]
                                                  4. Applied rewrites40.2%

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

                                                    \[\leadsto \frac{1 - x}{B} \]
                                                  6. Step-by-step derivation
                                                    1. lower--.f6450.0

                                                      \[\leadsto \frac{1 - x}{B} \]
                                                  7. Applied rewrites50.0%

                                                    \[\leadsto \frac{1 - x}{B} \]
                                                10. Recombined 3 regimes into one program.
                                                11. Add Preprocessing

                                                Alternative 28: 31.5% accurate, 14.1× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;x \leq -7 \cdot 10^{-117}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-95}:\\ \;\;\;\;\frac{1}{B}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                                (FPCore (F B x)
                                                 :precision binary64
                                                 (let* ((t_0 (/ (- x) B)))
                                                   (if (<= x -7e-117) t_0 (if (<= x 6.5e-95) (/ 1.0 B) t_0))))
                                                double code(double F, double B, double x) {
                                                	double t_0 = -x / B;
                                                	double tmp;
                                                	if (x <= -7e-117) {
                                                		tmp = t_0;
                                                	} else if (x <= 6.5e-95) {
                                                		tmp = 1.0 / B;
                                                	} else {
                                                		tmp = t_0;
                                                	}
                                                	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 (x <= (-7d-117)) then
                                                        tmp = t_0
                                                    else if (x <= 6.5d-95) then
                                                        tmp = 1.0d0 / b
                                                    else
                                                        tmp = t_0
                                                    end if
                                                    code = tmp
                                                end function
                                                
                                                public static double code(double F, double B, double x) {
                                                	double t_0 = -x / B;
                                                	double tmp;
                                                	if (x <= -7e-117) {
                                                		tmp = t_0;
                                                	} else if (x <= 6.5e-95) {
                                                		tmp = 1.0 / B;
                                                	} else {
                                                		tmp = t_0;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(F, B, x):
                                                	t_0 = -x / B
                                                	tmp = 0
                                                	if x <= -7e-117:
                                                		tmp = t_0
                                                	elif x <= 6.5e-95:
                                                		tmp = 1.0 / B
                                                	else:
                                                		tmp = t_0
                                                	return tmp
                                                
                                                function code(F, B, x)
                                                	t_0 = Float64(Float64(-x) / B)
                                                	tmp = 0.0
                                                	if (x <= -7e-117)
                                                		tmp = t_0;
                                                	elseif (x <= 6.5e-95)
                                                		tmp = Float64(1.0 / B);
                                                	else
                                                		tmp = t_0;
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(F, B, x)
                                                	t_0 = -x / B;
                                                	tmp = 0.0;
                                                	if (x <= -7e-117)
                                                		tmp = t_0;
                                                	elseif (x <= 6.5e-95)
                                                		tmp = 1.0 / B;
                                                	else
                                                		tmp = t_0;
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[x, -7e-117], t$95$0, If[LessEqual[x, 6.5e-95], N[(1.0 / B), $MachinePrecision], t$95$0]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_0 := \frac{-x}{B}\\
                                                \mathbf{if}\;x \leq -7 \cdot 10^{-117}:\\
                                                \;\;\;\;t\_0\\
                                                
                                                \mathbf{elif}\;x \leq 6.5 \cdot 10^{-95}:\\
                                                \;\;\;\;\frac{1}{B}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;t\_0\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if x < -6.9999999999999997e-117 or 6.49999999999999985e-95 < x

                                                  1. Initial program 80.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. 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}} \]
                                                  3. 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}} \]
                                                  4. Applied rewrites47.7%

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

                                                    \[\leadsto \frac{-1 \cdot x}{B} \]
                                                  6. Step-by-step derivation
                                                    1. mul-1-negN/A

                                                      \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                                    2. lower-neg.f6442.3

                                                      \[\leadsto \frac{-x}{B} \]
                                                  7. Applied rewrites42.3%

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

                                                  if -6.9999999999999997e-117 < x < 6.49999999999999985e-95

                                                  1. Initial program 71.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. 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}} \]
                                                  3. 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}} \]
                                                  4. Applied rewrites39.9%

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

                                                    \[\leadsto \frac{1 - x}{B} \]
                                                  6. Step-by-step derivation
                                                    1. lower--.f6415.2

                                                      \[\leadsto \frac{1 - x}{B} \]
                                                  7. Applied rewrites15.2%

                                                    \[\leadsto \frac{1 - x}{B} \]
                                                  8. Taylor expanded in x around 0

                                                    \[\leadsto \frac{1}{B} \]
                                                  9. Step-by-step derivation
                                                    1. Applied rewrites15.2%

                                                      \[\leadsto \frac{1}{B} \]
                                                  10. Recombined 2 regimes into one program.
                                                  11. Add Preprocessing

                                                  Alternative 29: 36.9% accurate, 17.5× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq 1.15 \cdot 10^{-27}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                                  (FPCore (F B x)
                                                   :precision binary64
                                                   (if (<= F 1.15e-27) (/ (- x) B) (/ (- 1.0 x) B)))
                                                  double code(double F, double B, double x) {
                                                  	double tmp;
                                                  	if (F <= 1.15e-27) {
                                                  		tmp = -x / B;
                                                  	} else {
                                                  		tmp = (1.0 - x) / B;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  module fmin_fmax_functions
                                                      implicit none
                                                      private
                                                      public fmax
                                                      public fmin
                                                  
                                                      interface fmax
                                                          module procedure fmax88
                                                          module procedure fmax44
                                                          module procedure fmax84
                                                          module procedure fmax48
                                                      end interface
                                                      interface fmin
                                                          module procedure fmin88
                                                          module procedure fmin44
                                                          module procedure fmin84
                                                          module procedure fmin48
                                                      end interface
                                                  contains
                                                      real(8) function fmax88(x, y) result (res)
                                                          real(8), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                      end function
                                                      real(4) function fmax44(x, y) result (res)
                                                          real(4), intent (in) :: x
                                                          real(4), intent (in) :: y
                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmax84(x, y) result(res)
                                                          real(8), intent (in) :: x
                                                          real(4), intent (in) :: y
                                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmax48(x, y) result(res)
                                                          real(4), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmin88(x, y) result (res)
                                                          real(8), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                      end function
                                                      real(4) function fmin44(x, y) result (res)
                                                          real(4), intent (in) :: x
                                                          real(4), intent (in) :: y
                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmin84(x, y) result(res)
                                                          real(8), intent (in) :: x
                                                          real(4), intent (in) :: y
                                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmin48(x, y) result(res)
                                                          real(4), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                      end function
                                                  end module
                                                  
                                                  real(8) function code(f, b, x)
                                                  use fmin_fmax_functions
                                                      real(8), intent (in) :: f
                                                      real(8), intent (in) :: b
                                                      real(8), intent (in) :: x
                                                      real(8) :: tmp
                                                      if (f <= 1.15d-27) then
                                                          tmp = -x / b
                                                      else
                                                          tmp = (1.0d0 - x) / b
                                                      end if
                                                      code = tmp
                                                  end function
                                                  
                                                  public static double code(double F, double B, double x) {
                                                  	double tmp;
                                                  	if (F <= 1.15e-27) {
                                                  		tmp = -x / B;
                                                  	} else {
                                                  		tmp = (1.0 - x) / B;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  def code(F, B, x):
                                                  	tmp = 0
                                                  	if F <= 1.15e-27:
                                                  		tmp = -x / B
                                                  	else:
                                                  		tmp = (1.0 - x) / B
                                                  	return tmp
                                                  
                                                  function code(F, B, x)
                                                  	tmp = 0.0
                                                  	if (F <= 1.15e-27)
                                                  		tmp = Float64(Float64(-x) / B);
                                                  	else
                                                  		tmp = Float64(Float64(1.0 - x) / B);
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  function tmp_2 = code(F, B, x)
                                                  	tmp = 0.0;
                                                  	if (F <= 1.15e-27)
                                                  		tmp = -x / B;
                                                  	else
                                                  		tmp = (1.0 - x) / B;
                                                  	end
                                                  	tmp_2 = tmp;
                                                  end
                                                  
                                                  code[F_, B_, x_] := If[LessEqual[F, 1.15e-27], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  \mathbf{if}\;F \leq 1.15 \cdot 10^{-27}:\\
                                                  \;\;\;\;\frac{-x}{B}\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\frac{1 - x}{B}\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if F < 1.15e-27

                                                    1. Initial program 83.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. 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}} \]
                                                    3. 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}} \]
                                                    4. Applied rewrites46.4%

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

                                                      \[\leadsto \frac{-1 \cdot x}{B} \]
                                                    6. Step-by-step derivation
                                                      1. mul-1-negN/A

                                                        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                                      2. lower-neg.f6431.4

                                                        \[\leadsto \frac{-x}{B} \]
                                                    7. Applied rewrites31.4%

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

                                                    if 1.15e-27 < F

                                                    1. Initial program 60.9%

                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                    2. 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}} \]
                                                    3. 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}} \]
                                                    4. Applied rewrites40.2%

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

                                                      \[\leadsto \frac{1 - x}{B} \]
                                                    6. Step-by-step derivation
                                                      1. lower--.f6450.0

                                                        \[\leadsto \frac{1 - x}{B} \]
                                                    7. Applied rewrites50.0%

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

                                                  Alternative 30: 9.9% 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.8%

                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                  2. 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}} \]
                                                  3. 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}} \]
                                                  4. Applied rewrites44.6%

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

                                                    \[\leadsto \frac{1 - x}{B} \]
                                                  6. Step-by-step derivation
                                                    1. lower--.f6429.7

                                                      \[\leadsto \frac{1 - x}{B} \]
                                                  7. Applied rewrites29.7%

                                                    \[\leadsto \frac{1 - x}{B} \]
                                                  8. Taylor expanded in x around 0

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

                                                      \[\leadsto \frac{1}{B} \]
                                                    2. Add Preprocessing

                                                    Reproduce

                                                    ?
                                                    herbie shell --seed 2025100 
                                                    (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))))))