VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.9% → 99.6%
Time: 7.1s
Alternatives: 22
Speedup: 1.4×

Specification

?
\[\begin{array}{l} \\ \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (+
  (- (* x (/ 1.0 (tan B))))
  (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
	return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

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

\[\begin{array}{l} \\ \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (+
  (- (* x (/ 1.0 (tan B))))
  (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
	return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

Alternative 1: 99.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;F \leq 42000000:\\
\;\;\;\;\left(-\frac{x}{\sin B} \cdot \cos B\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\

\mathbf{else}:\\
\;\;\;\;t\_0 - \frac{x}{\tan B}\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{-1}{\tan B}, x, \color{blue}{-1} \cdot \frac{1}{\sin B}\right) \]
    7. Step-by-step derivation
      1. Applied rewrites55.9%

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

      if -1.16000000000000005e24 < F < 4.2e7

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

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

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

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

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

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

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

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

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

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

      if 4.2e7 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto 1 \cdot \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right)} \]
          8. sub-flip-reverseN/A

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

            \[\leadsto \color{blue}{1 \cdot \frac{1}{\sin B} - \frac{x}{\tan B}} \]
          10. lift-*.f64N/A

            \[\leadsto \color{blue}{1 \cdot \frac{1}{\sin B}} - \frac{x}{\tan B} \]
          11. lift-/.f64N/A

            \[\leadsto 1 \cdot \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
          12. mult-flip-revN/A

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

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

            \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
          15. lift-tan.f6456.3

            \[\leadsto \frac{1}{\sin B} - \frac{x}{\color{blue}{\tan B}} \]
        3. Applied rewrites56.3%

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

      Alternative 2: 99.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{\tan B}, x, \color{blue}{-1} \cdot \frac{1}{\sin B}\right) \]
        7. Step-by-step derivation
          1. Applied rewrites55.9%

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

          if -1.16000000000000005e24 < F < 4.2e7

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

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

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

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

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

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

          if 4.2e7 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto 1 \cdot \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right)} \]
              8. sub-flip-reverseN/A

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

                \[\leadsto \color{blue}{1 \cdot \frac{1}{\sin B} - \frac{x}{\tan B}} \]
              10. lift-*.f64N/A

                \[\leadsto \color{blue}{1 \cdot \frac{1}{\sin B}} - \frac{x}{\tan B} \]
              11. lift-/.f64N/A

                \[\leadsto 1 \cdot \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
              12. mult-flip-revN/A

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

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

                \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
              15. lift-tan.f6456.3

                \[\leadsto \frac{1}{\sin B} - \frac{x}{\color{blue}{\tan B}} \]
            3. Applied rewrites56.3%

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

          Alternative 3: 98.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{-1}{\tan B}, x, \color{blue}{-1} \cdot \frac{1}{\sin B}\right) \]
            7. Step-by-step derivation
              1. Applied rewrites55.9%

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

              if -3.7e8 < F < 3.1e-4

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

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

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

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

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

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

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

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

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

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

                if 3.1e-4 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto 1 \cdot \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right)} \]
                    8. sub-flip-reverseN/A

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

                      \[\leadsto \color{blue}{1 \cdot \frac{1}{\sin B} - \frac{x}{\tan B}} \]
                    10. lift-*.f64N/A

                      \[\leadsto \color{blue}{1 \cdot \frac{1}{\sin B}} - \frac{x}{\tan B} \]
                    11. lift-/.f64N/A

                      \[\leadsto 1 \cdot \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
                    12. mult-flip-revN/A

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

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

                      \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
                    15. lift-tan.f6456.3

                      \[\leadsto \frac{1}{\sin B} - \frac{x}{\color{blue}{\tan B}} \]
                  3. Applied rewrites56.3%

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

                Alternative 4: 92.4% accurate, 1.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}\\ t_2 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -370000:\\ \;\;\;\;\mathsf{fma}\left(\frac{-1}{\tan B}, x, -1 \cdot t\_2\right)\\ \mathbf{elif}\;F \leq -3.2 \cdot 10^{-58}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-1}{B}, x, \frac{t\_1}{\frac{\sin B}{F}}\right)\\ \mathbf{elif}\;F \leq 920000:\\ \;\;\;\;\frac{F}{B} \cdot t\_1 - t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_2 - t\_0\\ \end{array} \end{array} \]
                (FPCore (F B x)
                 :precision binary64
                 (let* ((t_0 (/ x (tan B)))
                        (t_1 (pow (fma x 2.0 (fma F F 2.0)) -0.5))
                        (t_2 (/ 1.0 (sin B))))
                   (if (<= F -370000.0)
                     (fma (/ -1.0 (tan B)) x (* -1.0 t_2))
                     (if (<= F -3.2e-58)
                       (fma (/ -1.0 B) x (/ t_1 (/ (sin B) F)))
                       (if (<= F 920000.0) (- (* (/ F B) t_1) t_0) (- t_2 t_0))))))
                double code(double F, double B, double x) {
                	double t_0 = x / tan(B);
                	double t_1 = pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5);
                	double t_2 = 1.0 / sin(B);
                	double tmp;
                	if (F <= -370000.0) {
                		tmp = fma((-1.0 / tan(B)), x, (-1.0 * t_2));
                	} else if (F <= -3.2e-58) {
                		tmp = fma((-1.0 / B), x, (t_1 / (sin(B) / F)));
                	} else if (F <= 920000.0) {
                		tmp = ((F / B) * t_1) - t_0;
                	} else {
                		tmp = t_2 - t_0;
                	}
                	return tmp;
                }
                
                function code(F, B, x)
                	t_0 = Float64(x / tan(B))
                	t_1 = fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5
                	t_2 = Float64(1.0 / sin(B))
                	tmp = 0.0
                	if (F <= -370000.0)
                		tmp = fma(Float64(-1.0 / tan(B)), x, Float64(-1.0 * t_2));
                	elseif (F <= -3.2e-58)
                		tmp = fma(Float64(-1.0 / B), x, Float64(t_1 / Float64(sin(B) / F)));
                	elseif (F <= 920000.0)
                		tmp = Float64(Float64(Float64(F / B) * t_1) - t_0);
                	else
                		tmp = Float64(t_2 - t_0);
                	end
                	return tmp
                end
                
                code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -370000.0], N[(N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision] * x + N[(-1.0 * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.2e-58], N[(N[(-1.0 / B), $MachinePrecision] * x + N[(t$95$1 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 920000.0], N[(N[(N[(F / B), $MachinePrecision] * t$95$1), $MachinePrecision] - t$95$0), $MachinePrecision], N[(t$95$2 - t$95$0), $MachinePrecision]]]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := \frac{x}{\tan B}\\
                t_1 := {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}\\
                t_2 := \frac{1}{\sin B}\\
                \mathbf{if}\;F \leq -370000:\\
                \;\;\;\;\mathsf{fma}\left(\frac{-1}{\tan B}, x, -1 \cdot t\_2\right)\\
                
                \mathbf{elif}\;F \leq -3.2 \cdot 10^{-58}:\\
                \;\;\;\;\mathsf{fma}\left(\frac{-1}{B}, x, \frac{t\_1}{\frac{\sin B}{F}}\right)\\
                
                \mathbf{elif}\;F \leq 920000:\\
                \;\;\;\;\frac{F}{B} \cdot t\_1 - t\_0\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_2 - t\_0\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 4 regimes
                2. if F < -3.7e5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{-1}{\tan B}, x, \color{blue}{-1} \cdot \frac{1}{\sin B}\right) \]
                  7. Step-by-step derivation
                    1. Applied rewrites55.9%

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

                    if -3.7e5 < F < -3.2000000000000001e-58

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{-1}{\color{blue}{B}}, x, \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\frac{\sin B}{F}}\right) \]
                    7. Step-by-step derivation
                      1. Applied rewrites50.5%

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

                      if -3.2000000000000001e-58 < F < 9.2e5

                      1. Initial program 76.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 \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      3. Step-by-step derivation
                        1. lower-/.f6462.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 9.2e5 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto 1 \cdot \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right)} \]
                          8. sub-flip-reverseN/A

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

                            \[\leadsto \color{blue}{1 \cdot \frac{1}{\sin B} - \frac{x}{\tan B}} \]
                          10. lift-*.f64N/A

                            \[\leadsto \color{blue}{1 \cdot \frac{1}{\sin B}} - \frac{x}{\tan B} \]
                          11. lift-/.f64N/A

                            \[\leadsto 1 \cdot \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
                          12. mult-flip-revN/A

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

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

                            \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
                          15. lift-tan.f6456.3

                            \[\leadsto \frac{1}{\sin B} - \frac{x}{\color{blue}{\tan B}} \]
                        3. Applied rewrites56.3%

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

                      Alternative 5: 83.9% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, -1 \cdot \frac{x}{B}\right) \]
                        9. Applied rewrites34.7%

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

                        if -3.0500000000000001e161 < F < 9.2e5

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\color{blue}{B}}, \frac{-x}{\tan B}\right) \]
                        5. Step-by-step derivation
                          1. Applied rewrites70.3%

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

                          if 9.2e5 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto 1 \cdot \frac{1}{\sin B} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{\tan B}\right)\right)} \]
                              8. sub-flip-reverseN/A

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

                                \[\leadsto \color{blue}{1 \cdot \frac{1}{\sin B} - \frac{x}{\tan B}} \]
                              10. lift-*.f64N/A

                                \[\leadsto \color{blue}{1 \cdot \frac{1}{\sin B}} - \frac{x}{\tan B} \]
                              11. lift-/.f64N/A

                                \[\leadsto 1 \cdot \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
                              12. mult-flip-revN/A

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

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

                                \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
                              15. lift-tan.f6456.3

                                \[\leadsto \frac{1}{\sin B} - \frac{x}{\color{blue}{\tan B}} \]
                            3. Applied rewrites56.3%

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

                          Alternative 6: 79.7% accurate, 0.3× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_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)}\\ t_1 := -1 \cdot \frac{x}{B}\\ t_2 := {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}\\ t_3 := \mathsf{fma}\left(F, \frac{t\_2}{B}, \frac{-x}{\tan B}\right)\\ \mathbf{if}\;t\_0 \leq -1000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_0 \leq 2:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{t\_2}{\sin B}, t\_1\right)\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, t\_1\right)\\ \end{array} \end{array} \]
                          (FPCore (F B x)
                           :precision binary64
                           (let* ((t_0
                                   (+
                                    (- (* x (/ 1.0 (tan B))))
                                    (*
                                     (/ F (sin B))
                                     (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
                                  (t_1 (* -1.0 (/ x B)))
                                  (t_2 (pow (fma 2.0 x (fma F F 2.0)) -0.5))
                                  (t_3 (fma F (/ t_2 B) (/ (- x) (tan B)))))
                             (if (<= t_0 -1000.0)
                               t_3
                               (if (<= t_0 2.0)
                                 (fma F (/ t_2 (sin B)) t_1)
                                 (if (<= t_0 INFINITY) t_3 (fma F (/ -1.0 (* F (sin B))) t_1))))))
                          double code(double F, double B, double x) {
                          	double t_0 = -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
                          	double t_1 = -1.0 * (x / B);
                          	double t_2 = pow(fma(2.0, x, fma(F, F, 2.0)), -0.5);
                          	double t_3 = fma(F, (t_2 / B), (-x / tan(B)));
                          	double tmp;
                          	if (t_0 <= -1000.0) {
                          		tmp = t_3;
                          	} else if (t_0 <= 2.0) {
                          		tmp = fma(F, (t_2 / sin(B)), t_1);
                          	} else if (t_0 <= ((double) INFINITY)) {
                          		tmp = t_3;
                          	} else {
                          		tmp = fma(F, (-1.0 / (F * sin(B))), t_1);
                          	}
                          	return tmp;
                          }
                          
                          function code(F, B, x)
                          	t_0 = 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)))))
                          	t_1 = Float64(-1.0 * Float64(x / B))
                          	t_2 = fma(2.0, x, fma(F, F, 2.0)) ^ -0.5
                          	t_3 = fma(F, Float64(t_2 / B), Float64(Float64(-x) / tan(B)))
                          	tmp = 0.0
                          	if (t_0 <= -1000.0)
                          		tmp = t_3;
                          	elseif (t_0 <= 2.0)
                          		tmp = fma(F, Float64(t_2 / sin(B)), t_1);
                          	elseif (t_0 <= Inf)
                          		tmp = t_3;
                          	else
                          		tmp = fma(F, Float64(-1.0 / Float64(F * sin(B))), t_1);
                          	end
                          	return tmp
                          end
                          
                          code[F_, B_, x_] := Block[{t$95$0 = N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[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]}, Block[{t$95$1 = N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$3 = N[(F * N[(t$95$2 / B), $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1000.0], t$95$3, If[LessEqual[t$95$0, 2.0], N[(F * N[(t$95$2 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t$95$0, Infinity], t$95$3, N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_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)}\\
                          t_1 := -1 \cdot \frac{x}{B}\\
                          t_2 := {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}\\
                          t_3 := \mathsf{fma}\left(F, \frac{t\_2}{B}, \frac{-x}{\tan B}\right)\\
                          \mathbf{if}\;t\_0 \leq -1000:\\
                          \;\;\;\;t\_3\\
                          
                          \mathbf{elif}\;t\_0 \leq 2:\\
                          \;\;\;\;\mathsf{fma}\left(F, \frac{t\_2}{\sin B}, t\_1\right)\\
                          
                          \mathbf{elif}\;t\_0 \leq \infty:\\
                          \;\;\;\;t\_3\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, t\_1\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 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)))))) < -1e3 or 2 < (+.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 76.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 \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                              2. +-commutativeN/A

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\color{blue}{B}}, \frac{-x}{\tan B}\right) \]
                            5. Step-by-step derivation
                              1. Applied rewrites70.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, -1 \cdot \frac{x}{B}\right) \]
                              9. Applied rewrites34.7%

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

                            Alternative 7: 77.9% accurate, 0.3× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_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)}\\ t_1 := -1 \cdot \frac{x}{B}\\ t_2 := \frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{\tan B}\\ \mathbf{if}\;t\_0 \leq -1000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_0 \leq 2:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, t\_1\right)\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, t\_1\right)\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (let* ((t_0
                                     (+
                                      (- (* x (/ 1.0 (tan B))))
                                      (*
                                       (/ F (sin B))
                                       (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
                                    (t_1 (* -1.0 (/ x B)))
                                    (t_2
                                     (- (* (/ F B) (pow (fma x 2.0 (fma F F 2.0)) -0.5)) (/ x (tan B)))))
                               (if (<= t_0 -1000.0)
                                 t_2
                                 (if (<= t_0 2.0)
                                   (fma F (/ (pow (fma 2.0 x (fma F F 2.0)) -0.5) (sin B)) t_1)
                                   (if (<= t_0 INFINITY) t_2 (fma F (/ -1.0 (* F (sin B))) t_1))))))
                            double code(double F, double B, double x) {
                            	double t_0 = -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
                            	double t_1 = -1.0 * (x / B);
                            	double t_2 = ((F / B) * pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5)) - (x / tan(B));
                            	double tmp;
                            	if (t_0 <= -1000.0) {
                            		tmp = t_2;
                            	} else if (t_0 <= 2.0) {
                            		tmp = fma(F, (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) / sin(B)), t_1);
                            	} else if (t_0 <= ((double) INFINITY)) {
                            		tmp = t_2;
                            	} else {
                            		tmp = fma(F, (-1.0 / (F * sin(B))), t_1);
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	t_0 = 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)))))
                            	t_1 = Float64(-1.0 * Float64(x / B))
                            	t_2 = Float64(Float64(Float64(F / B) * (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5)) - Float64(x / tan(B)))
                            	tmp = 0.0
                            	if (t_0 <= -1000.0)
                            		tmp = t_2;
                            	elseif (t_0 <= 2.0)
                            		tmp = fma(F, Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) / sin(B)), t_1);
                            	elseif (t_0 <= Inf)
                            		tmp = t_2;
                            	else
                            		tmp = fma(F, Float64(-1.0 / Float64(F * sin(B))), t_1);
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := Block[{t$95$0 = N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[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]}, Block[{t$95$1 = N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(F / B), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1000.0], t$95$2, If[LessEqual[t$95$0, 2.0], N[(F * N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t$95$0, Infinity], t$95$2, N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_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)}\\
                            t_1 := -1 \cdot \frac{x}{B}\\
                            t_2 := \frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{\tan B}\\
                            \mathbf{if}\;t\_0 \leq -1000:\\
                            \;\;\;\;t\_2\\
                            
                            \mathbf{elif}\;t\_0 \leq 2:\\
                            \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, t\_1\right)\\
                            
                            \mathbf{elif}\;t\_0 \leq \infty:\\
                            \;\;\;\;t\_2\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, t\_1\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 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)))))) < -1e3 or 2 < (+.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 76.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 \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              3. Step-by-step derivation
                                1. lower-/.f6462.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, -1 \cdot \frac{x}{B}\right) \]
                              9. Applied rewrites34.7%

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

                            Alternative 8: 77.6% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\frac{-1}{\tan B}, x, 1 \cdot \color{blue}{\frac{1}{B}}\right) \]
                                3. Step-by-step derivation
                                  1. lower-/.f6454.0

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

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

                                if -1.95e-10 < x < 7.2e-9

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

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

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

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

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

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

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

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

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

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

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

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

                                if 7.2e-9 < x

                                1. Initial program 76.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 0

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

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

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

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

                                    \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin B} \]
                                  5. lower-sin.f6455.8

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

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

                              Alternative 9: 77.4% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{\tan B}, x, 1 \cdot \color{blue}{\frac{1}{B}}\right) \]
                                  3. Step-by-step derivation
                                    1. lower-/.f6454.0

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

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

                                  if -1.95e-10 < x < 1.21999999999999997

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 10: 75.5% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(\frac{-1}{\tan B}, x, 1 \cdot \color{blue}{\frac{1}{B}}\right) \]
                                    3. Step-by-step derivation
                                      1. lower-/.f6454.0

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

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

                                    if -1.4e-11 < x < 0.0057000000000000002

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}, \frac{F}{\color{blue}{\sin B}}, -1 \cdot \frac{x}{B}\right) \]
                                      9. lower-/.f6449.8

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}, \frac{F}{\sin B}, \frac{-1 \cdot x}{B}\right) \]
                                      14. lower-/.f6449.8

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

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

                                        \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}, \frac{F}{\sin B}, \frac{\mathsf{neg}\left(x\right)}{B}\right) \]
                                      17. lower-neg.f6449.8

                                        \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{F}{\sin B}, \frac{-x}{B}\right) \]
                                    8. Applied rewrites49.8%

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

                                  Alternative 11: 71.0% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, -1 \cdot \frac{x}{B}\right) \]
                                    9. Applied rewrites34.7%

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

                                    if -3.7e8 < F < 9.00000000000000057e-5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 9.00000000000000057e-5 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(\frac{-1}{\tan B}, x, 1 \cdot \color{blue}{\frac{1}{B}}\right) \]
                                        3. Step-by-step derivation
                                          1. lower-/.f6454.0

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

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

                                      Alternative 12: 64.4% accurate, 2.1× speedup?

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

                                        1. Initial program 76.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 {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B}} \]
                                        3. Step-by-step derivation
                                          1. metadata-evalN/A

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

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

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

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

                                        if 9e4 < B

                                        1. Initial program 76.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 \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        3. Step-by-step derivation
                                          1. lower-/.f6462.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{F}{B} \cdot \color{blue}{\frac{1}{F}} - \frac{x}{\tan B} \]
                                        8. Step-by-step derivation
                                          1. lower-/.f6446.4

                                            \[\leadsto \frac{F}{B} \cdot \frac{1}{\color{blue}{F}} - \frac{x}{\tan B} \]
                                        9. Applied rewrites46.4%

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

                                      Alternative 13: 58.4% accurate, 2.1× speedup?

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

                                        1. Initial program 76.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 {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B}} \]
                                        3. Step-by-step derivation
                                          1. metadata-evalN/A

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

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

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

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

                                        if 9e4 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{\tan B}, x, 1 \cdot \color{blue}{\frac{1}{B}}\right) \]
                                          3. Step-by-step derivation
                                            1. lower-/.f6454.0

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

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

                                        Alternative 14: 55.8% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, -1 \cdot \frac{x}{B}\right) \]
                                          9. Applied rewrites34.7%

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

                                          if -6.3000000000000004e-18 < F < 9.2e5

                                          1. Initial program 76.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 {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B}} \]
                                          3. Step-by-step derivation
                                            1. metadata-evalN/A

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

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

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

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

                                          if 9.2e5 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(F, \frac{1}{F \cdot \sin B}, -1 \cdot \frac{x}{B}\right) \]
                                          9. Applied rewrites32.4%

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

                                        Alternative 15: 55.5% accurate, 2.0× speedup?

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

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

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

                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                            4. lift-/.f64N/A

                                              \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                            5. associate-*l/N/A

                                              \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                            6. associate-/l*N/A

                                              \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                            7. lower-fma.f64N/A

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, -x \cdot \frac{1}{\tan B}\right)} \]
                                          3. Applied rewrites85.2%

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \frac{-x}{\tan B}\right)} \]
                                          4. Taylor expanded in B around 0

                                            \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                          5. Step-by-step derivation
                                            1. lower-*.f64N/A

                                              \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
                                            2. lower-/.f6458.0

                                              \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                                          6. Applied rewrites58.0%

                                            \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                          7. Taylor expanded in F around -inf

                                            \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{-1}{F \cdot \sin B}}, -1 \cdot \frac{x}{B}\right) \]
                                          8. Step-by-step derivation
                                            1. lower-/.f64N/A

                                              \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\color{blue}{F \cdot \sin B}}, -1 \cdot \frac{x}{B}\right) \]
                                            2. lower-*.f64N/A

                                              \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot \color{blue}{\sin B}}, -1 \cdot \frac{x}{B}\right) \]
                                            3. lower-sin.f6434.7

                                              \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, -1 \cdot \frac{x}{B}\right) \]
                                          9. Applied rewrites34.7%

                                            \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{-1}{F \cdot \sin B}}, -1 \cdot \frac{x}{B}\right) \]

                                          if -6.3000000000000004e-18 < F < 6.6e6

                                          1. Initial program 76.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 {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B}} \]
                                          3. Step-by-step derivation
                                            1. metadata-evalN/A

                                              \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                            2. metadata-evalN/A

                                              \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                            3. lower-/.f64N/A

                                              \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{\color{blue}{B}} \]
                                          4. Applied rewrites43.9%

                                            \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]

                                          if 6.6e6 < F

                                          1. Initial program 76.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 \color{blue}{\frac{1}{\sin B}} \]
                                          3. Step-by-step derivation
                                            1. lower-/.f64N/A

                                              \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                                            2. lower-sin.f6416.9

                                              \[\leadsto \frac{1}{\sin B} \]
                                          4. Applied rewrites16.9%

                                            \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                        3. Recombined 3 regimes into one program.
                                        4. Add Preprocessing

                                        Alternative 16: 52.2% accurate, 2.0× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.4 \cdot 10^{+153}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 6600000:\\ \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \end{array} \]
                                        (FPCore (F B x)
                                         :precision binary64
                                         (if (<= F -3.4e+153)
                                           (/ -1.0 (sin B))
                                           (if (<= F 6600000.0)
                                             (/ (- (* F (pow (+ 2.0 (fma 2.0 x (pow F 2.0))) -0.5)) x) B)
                                             (/ 1.0 (sin B)))))
                                        double code(double F, double B, double x) {
                                        	double tmp;
                                        	if (F <= -3.4e+153) {
                                        		tmp = -1.0 / sin(B);
                                        	} else if (F <= 6600000.0) {
                                        		tmp = ((F * pow((2.0 + fma(2.0, x, pow(F, 2.0))), -0.5)) - x) / B;
                                        	} else {
                                        		tmp = 1.0 / sin(B);
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(F, B, x)
                                        	tmp = 0.0
                                        	if (F <= -3.4e+153)
                                        		tmp = Float64(-1.0 / sin(B));
                                        	elseif (F <= 6600000.0)
                                        		tmp = Float64(Float64(Float64(F * (Float64(2.0 + fma(2.0, x, (F ^ 2.0))) ^ -0.5)) - x) / B);
                                        	else
                                        		tmp = Float64(1.0 / sin(B));
                                        	end
                                        	return tmp
                                        end
                                        
                                        code[F_, B_, x_] := If[LessEqual[F, -3.4e+153], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6600000.0], N[(N[(N[(F * N[Power[N[(2.0 + N[(2.0 * x + N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;F \leq -3.4 \cdot 10^{+153}:\\
                                        \;\;\;\;\frac{-1}{\sin B}\\
                                        
                                        \mathbf{elif}\;F \leq 6600000:\\
                                        \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\frac{1}{\sin B}\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if F < -3.3999999999999997e153

                                          1. Initial program 76.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 \color{blue}{\frac{-1}{\sin B}} \]
                                          3. Step-by-step derivation
                                            1. lower-/.f64N/A

                                              \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                            2. lower-sin.f6417.2

                                              \[\leadsto \frac{-1}{\sin B} \]
                                          4. Applied rewrites17.2%

                                            \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                          if -3.3999999999999997e153 < F < 6.6e6

                                          1. Initial program 76.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 {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B}} \]
                                          3. Step-by-step derivation
                                            1. metadata-evalN/A

                                              \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                            2. metadata-evalN/A

                                              \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                            3. lower-/.f64N/A

                                              \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{\color{blue}{B}} \]
                                          4. Applied rewrites43.9%

                                            \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]

                                          if 6.6e6 < F

                                          1. Initial program 76.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 \color{blue}{\frac{1}{\sin B}} \]
                                          3. Step-by-step derivation
                                            1. lower-/.f64N/A

                                              \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                                            2. lower-sin.f6416.9

                                              \[\leadsto \frac{1}{\sin B} \]
                                          4. Applied rewrites16.9%

                                            \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                        3. Recombined 3 regimes into one program.
                                        4. Add Preprocessing

                                        Alternative 17: 51.7% accurate, 2.5× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6.3 \cdot 10^{-18}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 6600000:\\ \;\;\;\;\frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \end{array} \]
                                        (FPCore (F B x)
                                         :precision binary64
                                         (if (<= F -6.3e-18)
                                           (/ -1.0 (sin B))
                                           (if (<= F 6600000.0)
                                             (- (* (/ F B) (pow (fma x 2.0 (fma F F 2.0)) -0.5)) (/ x B))
                                             (/ 1.0 (sin B)))))
                                        double code(double F, double B, double x) {
                                        	double tmp;
                                        	if (F <= -6.3e-18) {
                                        		tmp = -1.0 / sin(B);
                                        	} else if (F <= 6600000.0) {
                                        		tmp = ((F / B) * pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5)) - (x / B);
                                        	} else {
                                        		tmp = 1.0 / sin(B);
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(F, B, x)
                                        	tmp = 0.0
                                        	if (F <= -6.3e-18)
                                        		tmp = Float64(-1.0 / sin(B));
                                        	elseif (F <= 6600000.0)
                                        		tmp = Float64(Float64(Float64(F / B) * (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5)) - Float64(x / B));
                                        	else
                                        		tmp = Float64(1.0 / sin(B));
                                        	end
                                        	return tmp
                                        end
                                        
                                        code[F_, B_, x_] := If[LessEqual[F, -6.3e-18], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6600000.0], N[(N[(N[(F / B), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;F \leq -6.3 \cdot 10^{-18}:\\
                                        \;\;\;\;\frac{-1}{\sin B}\\
                                        
                                        \mathbf{elif}\;F \leq 6600000:\\
                                        \;\;\;\;\frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\frac{1}{\sin B}\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if F < -6.3000000000000004e-18

                                          1. Initial program 76.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 \color{blue}{\frac{-1}{\sin B}} \]
                                          3. Step-by-step derivation
                                            1. lower-/.f64N/A

                                              \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                            2. lower-sin.f6417.2

                                              \[\leadsto \frac{-1}{\sin B} \]
                                          4. Applied rewrites17.2%

                                            \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                          if -6.3000000000000004e-18 < F < 6.6e6

                                          1. Initial program 76.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 \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                          3. Step-by-step derivation
                                            1. lower-/.f6462.0

                                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                          4. Applied rewrites62.0%

                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                          5. Step-by-step derivation
                                            1. lift-+.f64N/A

                                              \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                            2. +-commutativeN/A

                                              \[\leadsto \color{blue}{\frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                            3. add-flipN/A

                                              \[\leadsto \color{blue}{\frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \left(\mathsf{neg}\left(\left(-x \cdot \frac{1}{\tan B}\right)\right)\right)} \]
                                            4. lift-neg.f64N/A

                                              \[\leadsto \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)}\right)\right) \]
                                            5. lift-*.f64N/A

                                              \[\leadsto \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{x \cdot \frac{1}{\tan B}}\right)\right)\right)\right) \]
                                            6. lift-/.f64N/A

                                              \[\leadsto \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot \color{blue}{\frac{1}{\tan B}}\right)\right)\right)\right) \]
                                            7. mult-flip-revN/A

                                              \[\leadsto \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\frac{x}{\tan B}}\right)\right)\right)\right) \]
                                            8. distribute-frac-negN/A

                                              \[\leadsto \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \left(\mathsf{neg}\left(\color{blue}{\frac{\mathsf{neg}\left(x\right)}{\tan B}}\right)\right) \]
                                            9. lift-neg.f64N/A

                                              \[\leadsto \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \left(\mathsf{neg}\left(\frac{\color{blue}{-x}}{\tan B}\right)\right) \]
                                            10. lift-/.f64N/A

                                              \[\leadsto \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \left(\mathsf{neg}\left(\color{blue}{\frac{-x}{\tan B}}\right)\right) \]
                                            11. lower--.f64N/A

                                              \[\leadsto \color{blue}{\frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \left(\mathsf{neg}\left(\frac{-x}{\tan B}\right)\right)} \]
                                          6. Applied rewrites62.1%

                                            \[\leadsto \color{blue}{\frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{\tan B}} \]
                                          7. Taylor expanded in B around 0

                                            \[\leadsto \frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{\color{blue}{B}} \]
                                          8. Step-by-step derivation
                                            1. Applied rewrites35.7%

                                              \[\leadsto \frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{\color{blue}{B}} \]

                                            if 6.6e6 < F

                                            1. Initial program 76.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 \color{blue}{\frac{1}{\sin B}} \]
                                            3. Step-by-step derivation
                                              1. lower-/.f64N/A

                                                \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                                              2. lower-sin.f6416.9

                                                \[\leadsto \frac{1}{\sin B} \]
                                            4. Applied rewrites16.9%

                                              \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                          9. Recombined 3 regimes into one program.
                                          10. Add Preprocessing

                                          Alternative 18: 36.6% accurate, 2.9× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.4 \cdot 10^{-22}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\ \end{array} \end{array} \]
                                          (FPCore (F B x)
                                           :precision binary64
                                           (if (<= F -3.4e-22)
                                             (/ -1.0 (sin B))
                                             (/ (* F (fma -1.0 (/ x F) (/ 1.0 F))) B)))
                                          double code(double F, double B, double x) {
                                          	double tmp;
                                          	if (F <= -3.4e-22) {
                                          		tmp = -1.0 / sin(B);
                                          	} else {
                                          		tmp = (F * fma(-1.0, (x / F), (1.0 / F))) / B;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(F, B, x)
                                          	tmp = 0.0
                                          	if (F <= -3.4e-22)
                                          		tmp = Float64(-1.0 / sin(B));
                                          	else
                                          		tmp = Float64(Float64(F * fma(-1.0, Float64(x / F), Float64(1.0 / F))) / B);
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[F_, B_, x_] := If[LessEqual[F, -3.4e-22], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(-1.0 * N[(x / F), $MachinePrecision] + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;F \leq -3.4 \cdot 10^{-22}:\\
                                          \;\;\;\;\frac{-1}{\sin B}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if F < -3.3999999999999998e-22

                                            1. Initial program 76.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 \color{blue}{\frac{-1}{\sin B}} \]
                                            3. Step-by-step derivation
                                              1. lower-/.f64N/A

                                                \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                              2. lower-sin.f6417.2

                                                \[\leadsto \frac{-1}{\sin B} \]
                                            4. Applied rewrites17.2%

                                              \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                            if -3.3999999999999998e-22 < F

                                            1. Initial program 76.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 \color{blue}{F \cdot \left(-1 \cdot \frac{x \cdot \cos B}{F \cdot \sin B} + \frac{1}{F \cdot \sin B}\right)} \]
                                            3. Step-by-step derivation
                                              1. lower-*.f64N/A

                                                \[\leadsto F \cdot \color{blue}{\left(-1 \cdot \frac{x \cdot \cos B}{F \cdot \sin B} + \frac{1}{F \cdot \sin B}\right)} \]
                                              2. lower-fma.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}, \frac{1}{F \cdot \sin B}\right) \]
                                              3. lower-/.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}, \frac{1}{F \cdot \sin B}\right) \]
                                              4. lower-*.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                              5. lower-cos.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                              6. lower-*.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}, \frac{1}{F \cdot \sin B}\right) \]
                                              7. lower-sin.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                              8. lower-/.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                              9. lower-*.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                              10. lower-sin.f6447.7

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                            4. Applied rewrites47.7%

                                              \[\leadsto \color{blue}{F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right)} \]
                                            5. Taylor expanded in B around 0

                                              \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{\color{blue}{B}} \]
                                            6. Step-by-step derivation
                                              1. lower-/.f64N/A

                                                \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                              2. lower-*.f64N/A

                                                \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                              3. lower-fma.f64N/A

                                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                              4. lower-/.f64N/A

                                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                              5. lower-/.f6428.7

                                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                            7. Applied rewrites28.7%

                                              \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{\color{blue}{B}} \]
                                          3. Recombined 2 regimes into one program.
                                          4. Add Preprocessing

                                          Alternative 19: 30.7% accurate, 3.9× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -215:\\ \;\;\;\;\frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\ \end{array} \end{array} \]
                                          (FPCore (F B x)
                                           :precision binary64
                                           (if (<= F -215.0)
                                             (/ (- (* -0.16666666666666666 (pow B 2.0)) 1.0) B)
                                             (/ (* F (fma -1.0 (/ x F) (/ 1.0 F))) B)))
                                          double code(double F, double B, double x) {
                                          	double tmp;
                                          	if (F <= -215.0) {
                                          		tmp = ((-0.16666666666666666 * pow(B, 2.0)) - 1.0) / B;
                                          	} else {
                                          		tmp = (F * fma(-1.0, (x / F), (1.0 / F))) / B;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(F, B, x)
                                          	tmp = 0.0
                                          	if (F <= -215.0)
                                          		tmp = Float64(Float64(Float64(-0.16666666666666666 * (B ^ 2.0)) - 1.0) / B);
                                          	else
                                          		tmp = Float64(Float64(F * fma(-1.0, Float64(x / F), Float64(1.0 / F))) / B);
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[F_, B_, x_] := If[LessEqual[F, -215.0], N[(N[(N[(-0.16666666666666666 * N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision], N[(N[(F * N[(-1.0 * N[(x / F), $MachinePrecision] + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;F \leq -215:\\
                                          \;\;\;\;\frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if F < -215

                                            1. Initial program 76.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 \color{blue}{\frac{-1}{\sin B}} \]
                                            3. Step-by-step derivation
                                              1. lower-/.f64N/A

                                                \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                              2. lower-sin.f6417.2

                                                \[\leadsto \frac{-1}{\sin B} \]
                                            4. Applied rewrites17.2%

                                              \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                            5. Taylor expanded in B around 0

                                              \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                            6. Step-by-step derivation
                                              1. lower-/.f64N/A

                                                \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                              2. lower--.f64N/A

                                                \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                              3. lower-*.f64N/A

                                                \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                              4. lower-pow.f649.9

                                                \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B} \]
                                            7. Applied rewrites9.9%

                                              \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{\color{blue}{B}} \]

                                            if -215 < F

                                            1. Initial program 76.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 \color{blue}{F \cdot \left(-1 \cdot \frac{x \cdot \cos B}{F \cdot \sin B} + \frac{1}{F \cdot \sin B}\right)} \]
                                            3. Step-by-step derivation
                                              1. lower-*.f64N/A

                                                \[\leadsto F \cdot \color{blue}{\left(-1 \cdot \frac{x \cdot \cos B}{F \cdot \sin B} + \frac{1}{F \cdot \sin B}\right)} \]
                                              2. lower-fma.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}, \frac{1}{F \cdot \sin B}\right) \]
                                              3. lower-/.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}, \frac{1}{F \cdot \sin B}\right) \]
                                              4. lower-*.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                              5. lower-cos.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                              6. lower-*.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}, \frac{1}{F \cdot \sin B}\right) \]
                                              7. lower-sin.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                              8. lower-/.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                              9. lower-*.f64N/A

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                              10. lower-sin.f6447.7

                                                \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                            4. Applied rewrites47.7%

                                              \[\leadsto \color{blue}{F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right)} \]
                                            5. Taylor expanded in B around 0

                                              \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{\color{blue}{B}} \]
                                            6. Step-by-step derivation
                                              1. lower-/.f64N/A

                                                \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                              2. lower-*.f64N/A

                                                \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                              3. lower-fma.f64N/A

                                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                              4. lower-/.f64N/A

                                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                              5. lower-/.f6428.7

                                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                            7. Applied rewrites28.7%

                                              \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{\color{blue}{B}} \]
                                          3. Recombined 2 regimes into one program.
                                          4. Add Preprocessing

                                          Alternative 20: 29.7% accurate, 5.1× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3100000000:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\ \end{array} \end{array} \]
                                          (FPCore (F B x)
                                           :precision binary64
                                           (if (<= F -3100000000.0) (/ -1.0 B) (/ (* F (fma -1.0 (/ x F) (/ 1.0 F))) B)))
                                          double code(double F, double B, double x) {
                                          	double tmp;
                                          	if (F <= -3100000000.0) {
                                          		tmp = -1.0 / B;
                                          	} else {
                                          		tmp = (F * fma(-1.0, (x / F), (1.0 / F))) / B;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(F, B, x)
                                          	tmp = 0.0
                                          	if (F <= -3100000000.0)
                                          		tmp = Float64(-1.0 / B);
                                          	else
                                          		tmp = Float64(Float64(F * fma(-1.0, Float64(x / F), Float64(1.0 / F))) / B);
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[F_, B_, x_] := If[LessEqual[F, -3100000000.0], N[(-1.0 / B), $MachinePrecision], N[(N[(F * N[(-1.0 * N[(x / F), $MachinePrecision] + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;F \leq -3100000000:\\
                                          \;\;\;\;\frac{-1}{B}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if F < -3.1e9

                                            1. Initial program 76.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 \color{blue}{\frac{-1}{\sin B}} \]
                                            3. Step-by-step derivation
                                              1. lower-/.f64N/A

                                                \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                              2. lower-sin.f6417.2

                                                \[\leadsto \frac{-1}{\sin B} \]
                                            4. Applied rewrites17.2%

                                              \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                            5. Taylor expanded in B around 0

                                              \[\leadsto \frac{-1}{B} \]
                                            6. Step-by-step derivation
                                              1. Applied rewrites10.2%

                                                \[\leadsto \frac{-1}{B} \]

                                              if -3.1e9 < F

                                              1. Initial program 76.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 \color{blue}{F \cdot \left(-1 \cdot \frac{x \cdot \cos B}{F \cdot \sin B} + \frac{1}{F \cdot \sin B}\right)} \]
                                              3. Step-by-step derivation
                                                1. lower-*.f64N/A

                                                  \[\leadsto F \cdot \color{blue}{\left(-1 \cdot \frac{x \cdot \cos B}{F \cdot \sin B} + \frac{1}{F \cdot \sin B}\right)} \]
                                                2. lower-fma.f64N/A

                                                  \[\leadsto F \cdot \mathsf{fma}\left(-1, \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}, \frac{1}{F \cdot \sin B}\right) \]
                                                3. lower-/.f64N/A

                                                  \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}, \frac{1}{F \cdot \sin B}\right) \]
                                                4. lower-*.f64N/A

                                                  \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                                5. lower-cos.f64N/A

                                                  \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                                6. lower-*.f64N/A

                                                  \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}, \frac{1}{F \cdot \sin B}\right) \]
                                                7. lower-sin.f64N/A

                                                  \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                                8. lower-/.f64N/A

                                                  \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                                9. lower-*.f64N/A

                                                  \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                                10. lower-sin.f6447.7

                                                  \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                              4. Applied rewrites47.7%

                                                \[\leadsto \color{blue}{F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right)} \]
                                              5. Taylor expanded in B around 0

                                                \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{\color{blue}{B}} \]
                                              6. Step-by-step derivation
                                                1. lower-/.f64N/A

                                                  \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                                2. lower-*.f64N/A

                                                  \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                                3. lower-fma.f64N/A

                                                  \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                4. lower-/.f64N/A

                                                  \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                5. lower-/.f6428.7

                                                  \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                              7. Applied rewrites28.7%

                                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{\color{blue}{B}} \]
                                            7. Recombined 2 regimes into one program.
                                            8. Add Preprocessing

                                            Alternative 21: 29.6% accurate, 10.7× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3100000000:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                            (FPCore (F B x)
                                             :precision binary64
                                             (if (<= F -3100000000.0) (/ -1.0 B) (/ (- 1.0 x) B)))
                                            double code(double F, double B, double x) {
                                            	double tmp;
                                            	if (F <= -3100000000.0) {
                                            		tmp = -1.0 / 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 <= (-3100000000.0d0)) then
                                                    tmp = (-1.0d0) / 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 <= -3100000000.0) {
                                            		tmp = -1.0 / B;
                                            	} else {
                                            		tmp = (1.0 - x) / B;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(F, B, x):
                                            	tmp = 0
                                            	if F <= -3100000000.0:
                                            		tmp = -1.0 / B
                                            	else:
                                            		tmp = (1.0 - x) / B
                                            	return tmp
                                            
                                            function code(F, B, x)
                                            	tmp = 0.0
                                            	if (F <= -3100000000.0)
                                            		tmp = Float64(-1.0 / 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 <= -3100000000.0)
                                            		tmp = -1.0 / B;
                                            	else
                                            		tmp = (1.0 - x) / B;
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[F_, B_, x_] := If[LessEqual[F, -3100000000.0], N[(-1.0 / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;F \leq -3100000000:\\
                                            \;\;\;\;\frac{-1}{B}\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\frac{1 - x}{B}\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if F < -3.1e9

                                              1. Initial program 76.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 \color{blue}{\frac{-1}{\sin B}} \]
                                              3. Step-by-step derivation
                                                1. lower-/.f64N/A

                                                  \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                2. lower-sin.f6417.2

                                                  \[\leadsto \frac{-1}{\sin B} \]
                                              4. Applied rewrites17.2%

                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                              5. Taylor expanded in B around 0

                                                \[\leadsto \frac{-1}{B} \]
                                              6. Step-by-step derivation
                                                1. Applied rewrites10.2%

                                                  \[\leadsto \frac{-1}{B} \]

                                                if -3.1e9 < F

                                                1. Initial program 76.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 \color{blue}{F \cdot \left(-1 \cdot \frac{x \cdot \cos B}{F \cdot \sin B} + \frac{1}{F \cdot \sin B}\right)} \]
                                                3. Step-by-step derivation
                                                  1. lower-*.f64N/A

                                                    \[\leadsto F \cdot \color{blue}{\left(-1 \cdot \frac{x \cdot \cos B}{F \cdot \sin B} + \frac{1}{F \cdot \sin B}\right)} \]
                                                  2. lower-fma.f64N/A

                                                    \[\leadsto F \cdot \mathsf{fma}\left(-1, \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}, \frac{1}{F \cdot \sin B}\right) \]
                                                  3. lower-/.f64N/A

                                                    \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}, \frac{1}{F \cdot \sin B}\right) \]
                                                  4. lower-*.f64N/A

                                                    \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                                  5. lower-cos.f64N/A

                                                    \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                                  6. lower-*.f64N/A

                                                    \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}, \frac{1}{F \cdot \sin B}\right) \]
                                                  7. lower-sin.f64N/A

                                                    \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                                  8. lower-/.f64N/A

                                                    \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                                  9. lower-*.f64N/A

                                                    \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                                  10. lower-sin.f6447.7

                                                    \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
                                                4. Applied rewrites47.7%

                                                  \[\leadsto \color{blue}{F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right)} \]
                                                5. Step-by-step derivation
                                                  1. lift-*.f64N/A

                                                    \[\leadsto F \cdot \color{blue}{\mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right)} \]
                                                  2. lift-fma.f64N/A

                                                    \[\leadsto F \cdot \left(-1 \cdot \frac{x \cdot \cos B}{F \cdot \sin B} + \color{blue}{\frac{1}{F \cdot \sin B}}\right) \]
                                                  3. distribute-rgt-inN/A

                                                    \[\leadsto \left(-1 \cdot \frac{x \cdot \cos B}{F \cdot \sin B}\right) \cdot F + \color{blue}{\frac{1}{F \cdot \sin B} \cdot F} \]
                                                  4. lower-fma.f64N/A

                                                    \[\leadsto \mathsf{fma}\left(-1 \cdot \frac{x \cdot \cos B}{F \cdot \sin B}, \color{blue}{F}, \frac{1}{F \cdot \sin B} \cdot F\right) \]
                                                6. Applied rewrites48.0%

                                                  \[\leadsto \mathsf{fma}\left(-\frac{\frac{x}{\tan B}}{F}, \color{blue}{F}, \frac{F}{\sin B \cdot F}\right) \]
                                                7. Taylor expanded in B around 0

                                                  \[\leadsto \frac{1 + -1 \cdot x}{\color{blue}{B}} \]
                                                8. Step-by-step derivation
                                                  1. lower-/.f64N/A

                                                    \[\leadsto \frac{1 + -1 \cdot x}{B} \]
                                                  2. lower-+.f64N/A

                                                    \[\leadsto \frac{1 + -1 \cdot x}{B} \]
                                                  3. lower-*.f6429.7

                                                    \[\leadsto \frac{1 + -1 \cdot x}{B} \]
                                                9. Applied rewrites29.7%

                                                  \[\leadsto \frac{1 + -1 \cdot x}{\color{blue}{B}} \]
                                                10. Step-by-step derivation
                                                  1. lift-+.f64N/A

                                                    \[\leadsto \frac{1 + -1 \cdot x}{B} \]
                                                  2. lift-*.f64N/A

                                                    \[\leadsto \frac{1 + -1 \cdot x}{B} \]
                                                  3. mul-1-negN/A

                                                    \[\leadsto \frac{1 + \left(\mathsf{neg}\left(x\right)\right)}{B} \]
                                                  4. sub-flip-reverseN/A

                                                    \[\leadsto \frac{1 - x}{B} \]
                                                  5. lower--.f6429.7

                                                    \[\leadsto \frac{1 - x}{B} \]
                                                11. Applied rewrites29.7%

                                                  \[\leadsto \frac{1 - x}{\color{blue}{B}} \]
                                              7. Recombined 2 regimes into one program.
                                              8. Add Preprocessing

                                              Alternative 22: 10.2% accurate, 26.5× 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.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 \color{blue}{\frac{-1}{\sin B}} \]
                                              3. Step-by-step derivation
                                                1. lower-/.f64N/A

                                                  \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                2. lower-sin.f6417.2

                                                  \[\leadsto \frac{-1}{\sin B} \]
                                              4. Applied rewrites17.2%

                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                              5. Taylor expanded in B around 0

                                                \[\leadsto \frac{-1}{B} \]
                                              6. Step-by-step derivation
                                                1. Applied rewrites10.2%

                                                  \[\leadsto \frac{-1}{B} \]
                                                2. Add Preprocessing

                                                Reproduce

                                                ?
                                                herbie shell --seed 2025150 
                                                (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))))))