VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.3% → 99.7%
Time: 7.2s
Alternatives: 23
Speedup: 1.3×

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

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

Initial Program: 76.3% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.7% accurate, 1.0× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1, t\_0, t\_1\right)\\


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

    1. Initial program 76.3%

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

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

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

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

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

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

      if -5.00000000000000015e39 < F < 5e6

      1. Initial program 76.3%

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{1}{\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}\right)} \]
      3. Applied rewrites84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto {\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}} + \frac{-x}{\sin B} \cdot \cos B \]
        5. associate-*r/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}} + \frac{-x}{\sin B} \cdot \cos B \]
        6. lift-/.f64N/A

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

          \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F}{\sin B} + \color{blue}{\frac{\left(-x\right) \cdot \cos B}{\sin B}} \]
        8. div-add-revN/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 + \left(-x\right) \cdot \cos B}{\sin B}} \]
      8. Applied rewrites84.7%

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

      if 5e6 < F

      1. Initial program 76.3%

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

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

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

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

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

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

      Alternative 2: 99.1% accurate, 1.1× speedup?

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

        1. Initial program 76.3%

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

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

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

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

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

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

          if -1.4199999999999999 < F < 1.3999999999999999

          1. Initial program 76.3%

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

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

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{1}{\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}\right)} \]
          3. Applied rewrites84.6%

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.3999999999999999 < F

          1. Initial program 76.3%

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

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

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

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

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

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

          Alternative 3: 99.0% accurate, 1.1× speedup?

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

            1. Initial program 76.3%

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

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

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

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

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

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

              if -1.3500000000000001 < F < 1.3500000000000001

              1. Initial program 76.3%

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

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

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

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

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

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

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

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

                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
              4. Applied rewrites54.1%

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

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

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

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

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

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

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

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

              if 1.3500000000000001 < F

              1. Initial program 76.3%

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

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

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

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

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

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

              Alternative 4: 91.5% accurate, 1.2× speedup?

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

                1. Initial program 76.3%

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

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

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

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

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

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

                  if -8.6e13 < F < -1e-168

                  1. Initial program 76.3%

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

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

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

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

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

                  if -1e-168 < F < 1.65000000000000013e-169

                  1. Initial program 76.3%

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

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

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

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

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

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

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

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

                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                  4. Applied rewrites54.1%

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

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

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

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                  8. Step-by-step derivation
                    1. metadata-eval48.1

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

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

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

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

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

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

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

                  if 1.65000000000000013e-169 < F < 4.5e6

                  1. Initial program 76.3%

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

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

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

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

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

                  if 4.5e6 < F

                  1. Initial program 76.3%

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

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

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

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

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

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

                  Alternative 5: 84.9% accurate, 1.3× speedup?

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

                    1. Initial program 76.3%

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

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

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

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

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

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

                      if -8.6e13 < F < -1e-168

                      1. Initial program 76.3%

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

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

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

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

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

                      if -1e-168 < F < 2.11999999999999998e-165

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      4. Applied rewrites54.1%

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

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

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

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      8. Step-by-step derivation
                        1. metadata-eval48.1

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

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

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

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

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

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

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

                      if 2.11999999999999998e-165 < F < 3.4e140

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 3.4e140 < F < 1.74999999999999987e147

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      4. Applied rewrites54.1%

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot {2}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
                        5. metadata-eval53.4

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot {2}^{-0.5} \]
                      10. Applied rewrites53.4%

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

                      if 1.74999999999999987e147 < F

                      1. Initial program 76.3%

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

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

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

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

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

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

                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                      8. Step-by-step derivation
                        1. metadata-eval28.0

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F} \]
                        2. metadata-eval28.0

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

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

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

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

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

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

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

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

                    Alternative 6: 76.8% accurate, 0.3× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{\tan B}\\ t_1 := \frac{F}{\sin B}\\ t_2 := \left(-x \cdot \frac{1}{\tan B}\right) + t\_1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+16}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_2 \leq 40:\\ \;\;\;\;{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot t\_1 - \frac{x}{B}\\ \mathbf{elif}\;t\_2 \leq 10^{+305}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{\frac{1}{F}}{\sin B}, -\frac{x}{B}\right)\\ \end{array} \end{array} \]
                    (FPCore (F B x)
                     :precision binary64
                     (let* ((t_0
                             (- (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) (/ F B)) (/ x (tan B))))
                            (t_1 (/ F (sin B)))
                            (t_2
                             (+
                              (- (* x (/ 1.0 (tan B))))
                              (* t_1 (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0)))))))
                       (if (<= t_2 -1e+16)
                         t_0
                         (if (<= t_2 40.0)
                           (- (* (pow (fma 2.0 x (fma F F 2.0)) -0.5) t_1) (/ x B))
                           (if (<= t_2 1e+305) t_0 (fma F (/ (/ 1.0 F) (sin B)) (- (/ x B))))))))
                    double code(double F, double B, double x) {
                    	double t_0 = (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * (F / B)) - (x / tan(B));
                    	double t_1 = F / sin(B);
                    	double t_2 = -(x * (1.0 / tan(B))) + (t_1 * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
                    	double tmp;
                    	if (t_2 <= -1e+16) {
                    		tmp = t_0;
                    	} else if (t_2 <= 40.0) {
                    		tmp = (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) * t_1) - (x / B);
                    	} else if (t_2 <= 1e+305) {
                    		tmp = t_0;
                    	} else {
                    		tmp = fma(F, ((1.0 / F) / sin(B)), -(x / B));
                    	}
                    	return tmp;
                    }
                    
                    function code(F, B, x)
                    	t_0 = Float64(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / tan(B)))
                    	t_1 = Float64(F / sin(B))
                    	t_2 = Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(t_1 * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0)))))
                    	tmp = 0.0
                    	if (t_2 <= -1e+16)
                    		tmp = t_0;
                    	elseif (t_2 <= 40.0)
                    		tmp = Float64(Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) * t_1) - Float64(x / B));
                    	elseif (t_2 <= 1e+305)
                    		tmp = t_0;
                    	else
                    		tmp = fma(F, Float64(Float64(1.0 / F) / sin(B)), Float64(-Float64(x / B)));
                    	end
                    	return tmp
                    end
                    
                    code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(t$95$1 * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+16], t$95$0, If[LessEqual[t$95$2, 40.0], N[(N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * t$95$1), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+305], t$95$0, N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + (-N[(x / B), $MachinePrecision])), $MachinePrecision]]]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
                    t_1 := \frac{F}{\sin B}\\
                    t_2 := \left(-x \cdot \frac{1}{\tan B}\right) + t\_1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\
                    \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+16}:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{elif}\;t\_2 \leq 40:\\
                    \;\;\;\;{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot t\_1 - \frac{x}{B}\\
                    
                    \mathbf{elif}\;t\_2 \leq 10^{+305}:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(F, \frac{\frac{1}{F}}{\sin B}, -\frac{x}{B}\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)))))) < -1e16 or 40 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 9.9999999999999994e304

                      1. Initial program 76.3%

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

                          \[\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 rewrites61.4%

                        \[\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 rewrites61.5%

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

                      if -1e16 < (+.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)))))) < 40

                      1. Initial program 76.3%

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

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

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

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

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

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

                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                        4. 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)} - \frac{x}{B}} \]
                        5. lower--.f6450.1

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

                        \[\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}{B}} \]

                      if 9.9999999999999994e304 < (+.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.3%

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

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

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

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

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

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

                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                      8. Step-by-step derivation
                        1. metadata-eval28.0

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F} \]
                        2. metadata-eval28.0

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

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

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

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

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

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

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

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

                    Alternative 7: 76.6% accurate, 1.3× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := -\frac{x}{B}\\ t_1 := \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\_0\right)\\ \mathbf{if}\;F \leq -1.75 \cdot 10^{+165}:\\ \;\;\;\;-\mathsf{fma}\left(F, \frac{\frac{-1}{F \cdot \sin B}}{t\_0}, 1\right) \cdot \frac{x}{B}\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-168}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;F \leq 2.12 \cdot 10^{-165}:\\ \;\;\;\;{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.4 \cdot 10^{+140}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;F \leq 1.75 \cdot 10^{+147}:\\ \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot {2}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{\frac{1}{F}}{\sin B}, t\_0\right)\\ \end{array} \end{array} \]
                    (FPCore (F B x)
                     :precision binary64
                     (let* ((t_0 (- (/ x B)))
                            (t_1 (fma F (/ (pow (fma 2.0 x (fma F F 2.0)) -0.5) (sin B)) t_0)))
                       (if (<= F -1.75e+165)
                         (- (* (fma F (/ (/ -1.0 (* F (sin B))) t_0) 1.0) (/ x B)))
                         (if (<= F -1e-168)
                           t_1
                           (if (<= F 2.12e-165)
                             (- (* (pow (fma 2.0 x 2.0) -0.5) (/ F B)) (/ x (tan B)))
                             (if (<= F 3.4e+140)
                               t_1
                               (if (<= F 1.75e+147)
                                 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F B) (pow 2.0 -0.5)))
                                 (fma F (/ (/ 1.0 F) (sin B)) t_0))))))))
                    double code(double F, double B, double x) {
                    	double t_0 = -(x / B);
                    	double t_1 = fma(F, (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) / sin(B)), t_0);
                    	double tmp;
                    	if (F <= -1.75e+165) {
                    		tmp = -(fma(F, ((-1.0 / (F * sin(B))) / t_0), 1.0) * (x / B));
                    	} else if (F <= -1e-168) {
                    		tmp = t_1;
                    	} else if (F <= 2.12e-165) {
                    		tmp = (pow(fma(2.0, x, 2.0), -0.5) * (F / B)) - (x / tan(B));
                    	} else if (F <= 3.4e+140) {
                    		tmp = t_1;
                    	} else if (F <= 1.75e+147) {
                    		tmp = -(x * (1.0 / tan(B))) + ((F / B) * pow(2.0, -0.5));
                    	} else {
                    		tmp = fma(F, ((1.0 / F) / sin(B)), t_0);
                    	}
                    	return tmp;
                    }
                    
                    function code(F, B, x)
                    	t_0 = Float64(-Float64(x / B))
                    	t_1 = fma(F, Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) / sin(B)), t_0)
                    	tmp = 0.0
                    	if (F <= -1.75e+165)
                    		tmp = Float64(-Float64(fma(F, Float64(Float64(-1.0 / Float64(F * sin(B))) / t_0), 1.0) * Float64(x / B)));
                    	elseif (F <= -1e-168)
                    		tmp = t_1;
                    	elseif (F <= 2.12e-165)
                    		tmp = Float64(Float64((fma(2.0, x, 2.0) ^ -0.5) * Float64(F / B)) - Float64(x / tan(B)));
                    	elseif (F <= 3.4e+140)
                    		tmp = t_1;
                    	elseif (F <= 1.75e+147)
                    		tmp = Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / B) * (2.0 ^ -0.5)));
                    	else
                    		tmp = fma(F, Float64(Float64(1.0 / F) / sin(B)), t_0);
                    	end
                    	return tmp
                    end
                    
                    code[F_, B_, x_] := Block[{t$95$0 = (-N[(x / B), $MachinePrecision])}, Block[{t$95$1 = 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$0), $MachinePrecision]}, If[LessEqual[F, -1.75e+165], (-N[(N[(F * N[(N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x / B), $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, -1e-168], t$95$1, If[LessEqual[F, 2.12e-165], N[(N[(N[Power[N[(2.0 * x + 2.0), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e+140], t$95$1, If[LessEqual[F, 1.75e+147], N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / B), $MachinePrecision] * N[Power[2.0, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := -\frac{x}{B}\\
                    t_1 := \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\_0\right)\\
                    \mathbf{if}\;F \leq -1.75 \cdot 10^{+165}:\\
                    \;\;\;\;-\mathsf{fma}\left(F, \frac{\frac{-1}{F \cdot \sin B}}{t\_0}, 1\right) \cdot \frac{x}{B}\\
                    
                    \mathbf{elif}\;F \leq -1 \cdot 10^{-168}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;F \leq 2.12 \cdot 10^{-165}:\\
                    \;\;\;\;{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
                    
                    \mathbf{elif}\;F \leq 3.4 \cdot 10^{+140}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;F \leq 1.75 \cdot 10^{+147}:\\
                    \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot {2}^{-0.5}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(F, \frac{\frac{1}{F}}{\sin B}, t\_0\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 5 regimes
                    2. if F < -1.74999999999999998e165

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

                      if -1.74999999999999998e165 < F < -1e-168 or 2.11999999999999998e-165 < F < 3.4e140

                      1. Initial program 76.3%

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

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

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

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

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

                      if -1e-168 < F < 2.11999999999999998e-165

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      4. Applied rewrites54.1%

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

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

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

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      8. Step-by-step derivation
                        1. metadata-eval48.1

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

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

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

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

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

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

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

                      if 3.4e140 < F < 1.74999999999999987e147

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      4. Applied rewrites54.1%

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot {2}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
                        5. metadata-eval53.4

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot {2}^{-0.5} \]
                      10. Applied rewrites53.4%

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

                      if 1.74999999999999987e147 < F

                      1. Initial program 76.3%

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

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

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

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

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

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

                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                      8. Step-by-step derivation
                        1. metadata-eval28.0

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F} \]
                        2. metadata-eval28.0

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

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

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

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

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

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

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

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

                    Alternative 8: 76.0% accurate, 1.5× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := -\frac{x \cdot \cos B}{\sin B}\\ \mathbf{if}\;x \leq -8:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-26}:\\ \;\;\;\;\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}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                    (FPCore (F B x)
                     :precision binary64
                     (let* ((t_0 (- (/ (* x (cos B)) (sin B)))))
                       (if (<= x -8.0)
                         t_0
                         (if (<= x 6.5e-26)
                           (fma F (/ (pow (fma 2.0 x (fma F F 2.0)) -0.5) (sin B)) (- (/ x B)))
                           t_0))))
                    double code(double F, double B, double x) {
                    	double t_0 = -((x * cos(B)) / sin(B));
                    	double tmp;
                    	if (x <= -8.0) {
                    		tmp = t_0;
                    	} else if (x <= 6.5e-26) {
                    		tmp = fma(F, (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) / sin(B)), -(x / B));
                    	} else {
                    		tmp = t_0;
                    	}
                    	return tmp;
                    }
                    
                    function code(F, B, x)
                    	t_0 = Float64(-Float64(Float64(x * cos(B)) / sin(B)))
                    	tmp = 0.0
                    	if (x <= -8.0)
                    		tmp = t_0;
                    	elseif (x <= 6.5e-26)
                    		tmp = fma(F, Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) / sin(B)), Float64(-Float64(x / B)));
                    	else
                    		tmp = t_0;
                    	end
                    	return tmp
                    end
                    
                    code[F_, B_, x_] := Block[{t$95$0 = (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision])}, If[LessEqual[x, -8.0], t$95$0, If[LessEqual[x, 6.5e-26], N[(F * N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + (-N[(x / B), $MachinePrecision])), $MachinePrecision], t$95$0]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := -\frac{x \cdot \cos B}{\sin B}\\
                    \mathbf{if}\;x \leq -8:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{elif}\;x \leq 6.5 \cdot 10^{-26}:\\
                    \;\;\;\;\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}{B}\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_0\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < -8 or 6.5e-26 < x

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

                          \[\leadsto -\frac{x \cdot \cos B}{\sin B} \]
                        4. lower-sin.f6454.9

                          \[\leadsto -\frac{x \cdot \cos B}{\sin B} \]
                      8. Applied rewrites54.9%

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

                      if -8 < x < 6.5e-26

                      1. Initial program 76.3%

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

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

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

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

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

                    Alternative 9: 75.5% accurate, 1.3× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{\sin B}\\ t_1 := -\frac{x}{B}\\ t_2 := {\left(2 + 2 \cdot x\right)}^{-0.5}\\ \mathbf{if}\;F \leq -1.5 \cdot 10^{+203}:\\ \;\;\;\;-\mathsf{fma}\left(F, \frac{\frac{-1}{F \cdot \sin B}}{t\_1}, 1\right) \cdot \frac{x}{B}\\ \mathbf{elif}\;F \leq -1.42:\\ \;\;\;\;t\_1 + t\_0 \cdot \frac{-1}{F}\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-168}:\\ \;\;\;\;t\_1 + t\_0 \cdot t\_2\\ \mathbf{elif}\;F \leq 2.12 \cdot 10^{-165}:\\ \;\;\;\;{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.4:\\ \;\;\;\;t\_1 + \frac{F \cdot t\_2}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{\frac{1}{F}}{\sin B}, t\_1\right)\\ \end{array} \end{array} \]
                    (FPCore (F B x)
                     :precision binary64
                     (let* ((t_0 (/ F (sin B)))
                            (t_1 (- (/ x B)))
                            (t_2 (pow (+ 2.0 (* 2.0 x)) -0.5)))
                       (if (<= F -1.5e+203)
                         (- (* (fma F (/ (/ -1.0 (* F (sin B))) t_1) 1.0) (/ x B)))
                         (if (<= F -1.42)
                           (+ t_1 (* t_0 (/ -1.0 F)))
                           (if (<= F -1e-168)
                             (+ t_1 (* t_0 t_2))
                             (if (<= F 2.12e-165)
                               (- (* (pow (fma 2.0 x 2.0) -0.5) (/ F B)) (/ x (tan B)))
                               (if (<= F 1.4)
                                 (+ t_1 (/ (* F t_2) (sin B)))
                                 (fma F (/ (/ 1.0 F) (sin B)) t_1))))))))
                    double code(double F, double B, double x) {
                    	double t_0 = F / sin(B);
                    	double t_1 = -(x / B);
                    	double t_2 = pow((2.0 + (2.0 * x)), -0.5);
                    	double tmp;
                    	if (F <= -1.5e+203) {
                    		tmp = -(fma(F, ((-1.0 / (F * sin(B))) / t_1), 1.0) * (x / B));
                    	} else if (F <= -1.42) {
                    		tmp = t_1 + (t_0 * (-1.0 / F));
                    	} else if (F <= -1e-168) {
                    		tmp = t_1 + (t_0 * t_2);
                    	} else if (F <= 2.12e-165) {
                    		tmp = (pow(fma(2.0, x, 2.0), -0.5) * (F / B)) - (x / tan(B));
                    	} else if (F <= 1.4) {
                    		tmp = t_1 + ((F * t_2) / sin(B));
                    	} else {
                    		tmp = fma(F, ((1.0 / F) / sin(B)), t_1);
                    	}
                    	return tmp;
                    }
                    
                    function code(F, B, x)
                    	t_0 = Float64(F / sin(B))
                    	t_1 = Float64(-Float64(x / B))
                    	t_2 = Float64(2.0 + Float64(2.0 * x)) ^ -0.5
                    	tmp = 0.0
                    	if (F <= -1.5e+203)
                    		tmp = Float64(-Float64(fma(F, Float64(Float64(-1.0 / Float64(F * sin(B))) / t_1), 1.0) * Float64(x / B)));
                    	elseif (F <= -1.42)
                    		tmp = Float64(t_1 + Float64(t_0 * Float64(-1.0 / F)));
                    	elseif (F <= -1e-168)
                    		tmp = Float64(t_1 + Float64(t_0 * t_2));
                    	elseif (F <= 2.12e-165)
                    		tmp = Float64(Float64((fma(2.0, x, 2.0) ^ -0.5) * Float64(F / B)) - Float64(x / tan(B)));
                    	elseif (F <= 1.4)
                    		tmp = Float64(t_1 + Float64(Float64(F * t_2) / sin(B)));
                    	else
                    		tmp = fma(F, Float64(Float64(1.0 / F) / sin(B)), 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[(x / B), $MachinePrecision])}, Block[{t$95$2 = N[Power[N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -1.5e+203], (-N[(N[(F * N[(N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x / B), $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, -1.42], N[(t$95$1 + N[(t$95$0 * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1e-168], N[(t$95$1 + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.12e-165], N[(N[(N[Power[N[(2.0 * x + 2.0), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(t$95$1 + N[(N[(F * t$95$2), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := \frac{F}{\sin B}\\
                    t_1 := -\frac{x}{B}\\
                    t_2 := {\left(2 + 2 \cdot x\right)}^{-0.5}\\
                    \mathbf{if}\;F \leq -1.5 \cdot 10^{+203}:\\
                    \;\;\;\;-\mathsf{fma}\left(F, \frac{\frac{-1}{F \cdot \sin B}}{t\_1}, 1\right) \cdot \frac{x}{B}\\
                    
                    \mathbf{elif}\;F \leq -1.42:\\
                    \;\;\;\;t\_1 + t\_0 \cdot \frac{-1}{F}\\
                    
                    \mathbf{elif}\;F \leq -1 \cdot 10^{-168}:\\
                    \;\;\;\;t\_1 + t\_0 \cdot t\_2\\
                    
                    \mathbf{elif}\;F \leq 2.12 \cdot 10^{-165}:\\
                    \;\;\;\;{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
                    
                    \mathbf{elif}\;F \leq 1.4:\\
                    \;\;\;\;t\_1 + \frac{F \cdot t\_2}{\sin B}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(F, \frac{\frac{1}{F}}{\sin B}, t\_1\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 6 regimes
                    2. if F < -1.5e203

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

                      if -1.5e203 < F < -1.4199999999999999

                      1. Initial program 76.3%

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

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

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

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

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

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

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

                      if -1.4199999999999999 < F < -1e-168

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
                        7. metadata-eval35.8

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      7. Applied rewrites35.8%

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

                      if -1e-168 < F < 2.11999999999999998e-165

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      4. Applied rewrites54.1%

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

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

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

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      8. Step-by-step derivation
                        1. metadata-eval48.1

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

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

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

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

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

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

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

                      if 2.11999999999999998e-165 < F < 1.3999999999999999

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B} \]
                        10. lower-sin.f6436.4

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

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

                      if 1.3999999999999999 < F

                      1. Initial program 76.3%

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

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

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

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

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

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

                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                      8. Step-by-step derivation
                        1. metadata-eval28.0

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F} \]
                        2. metadata-eval28.0

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

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

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

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

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

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

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

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

                    Alternative 10: 75.1% accurate, 1.3× speedup?

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

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

                      if -1.5e203 < F < -1.4199999999999999

                      1. Initial program 76.3%

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

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

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

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

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

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

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

                      if -1.4199999999999999 < F < -1e-168 or 1.65000000000000013e-169 < F < 1.3999999999999999

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
                        7. metadata-eval35.8

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      7. Applied rewrites35.8%

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

                      if -1e-168 < F < 1.65000000000000013e-169

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      4. Applied rewrites54.1%

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot {2}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
                        5. metadata-eval53.4

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot {2}^{-0.5} \]
                      10. Applied rewrites53.4%

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

                      if 1.3999999999999999 < F

                      1. Initial program 76.3%

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

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

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

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

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

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

                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                      8. Step-by-step derivation
                        1. metadata-eval28.0

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F} \]
                        2. metadata-eval28.0

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

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

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

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

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

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

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

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

                    Alternative 11: 75.0% accurate, 1.3× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := -\frac{x}{B}\\ t_1 := {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -1.75 \cdot 10^{+165}:\\ \;\;\;\;-\mathsf{fma}\left(F, \frac{\frac{-1}{F \cdot \sin B}}{t\_0}, 1\right) \cdot \frac{x}{B}\\ \mathbf{elif}\;F \leq -1 \cdot 10^{-168}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-169}:\\ \;\;\;\;{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{+38}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{\frac{1}{F}}{\sin B}, t\_0\right)\\ \end{array} \end{array} \]
                    (FPCore (F B x)
                     :precision binary64
                     (let* ((t_0 (- (/ x B)))
                            (t_1
                             (- (* (pow (fma 2.0 x (fma F F 2.0)) -0.5) (/ F (sin B))) (/ x B))))
                       (if (<= F -1.75e+165)
                         (- (* (fma F (/ (/ -1.0 (* F (sin B))) t_0) 1.0) (/ x B)))
                         (if (<= F -1e-168)
                           t_1
                           (if (<= F 1.65e-169)
                             (- (* (pow (fma 2.0 x 2.0) -0.5) (/ F B)) (/ x (tan B)))
                             (if (<= F 4.5e+38) t_1 (fma F (/ (/ 1.0 F) (sin B)) t_0)))))))
                    double code(double F, double B, double x) {
                    	double t_0 = -(x / B);
                    	double t_1 = (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) * (F / sin(B))) - (x / B);
                    	double tmp;
                    	if (F <= -1.75e+165) {
                    		tmp = -(fma(F, ((-1.0 / (F * sin(B))) / t_0), 1.0) * (x / B));
                    	} else if (F <= -1e-168) {
                    		tmp = t_1;
                    	} else if (F <= 1.65e-169) {
                    		tmp = (pow(fma(2.0, x, 2.0), -0.5) * (F / B)) - (x / tan(B));
                    	} else if (F <= 4.5e+38) {
                    		tmp = t_1;
                    	} else {
                    		tmp = fma(F, ((1.0 / F) / sin(B)), t_0);
                    	}
                    	return tmp;
                    }
                    
                    function code(F, B, x)
                    	t_0 = Float64(-Float64(x / B))
                    	t_1 = Float64(Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) * Float64(F / sin(B))) - Float64(x / B))
                    	tmp = 0.0
                    	if (F <= -1.75e+165)
                    		tmp = Float64(-Float64(fma(F, Float64(Float64(-1.0 / Float64(F * sin(B))) / t_0), 1.0) * Float64(x / B)));
                    	elseif (F <= -1e-168)
                    		tmp = t_1;
                    	elseif (F <= 1.65e-169)
                    		tmp = Float64(Float64((fma(2.0, x, 2.0) ^ -0.5) * Float64(F / B)) - Float64(x / tan(B)));
                    	elseif (F <= 4.5e+38)
                    		tmp = t_1;
                    	else
                    		tmp = fma(F, Float64(Float64(1.0 / F) / sin(B)), t_0);
                    	end
                    	return tmp
                    end
                    
                    code[F_, B_, x_] := Block[{t$95$0 = (-N[(x / B), $MachinePrecision])}, Block[{t$95$1 = 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] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.75e+165], (-N[(N[(F * N[(N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x / B), $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, -1e-168], t$95$1, If[LessEqual[F, 1.65e-169], N[(N[(N[Power[N[(2.0 * x + 2.0), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e+38], t$95$1, N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := -\frac{x}{B}\\
                    t_1 := {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}\\
                    \mathbf{if}\;F \leq -1.75 \cdot 10^{+165}:\\
                    \;\;\;\;-\mathsf{fma}\left(F, \frac{\frac{-1}{F \cdot \sin B}}{t\_0}, 1\right) \cdot \frac{x}{B}\\
                    
                    \mathbf{elif}\;F \leq -1 \cdot 10^{-168}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;F \leq 1.65 \cdot 10^{-169}:\\
                    \;\;\;\;{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
                    
                    \mathbf{elif}\;F \leq 4.5 \cdot 10^{+38}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(F, \frac{\frac{1}{F}}{\sin B}, t\_0\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 4 regimes
                    2. if F < -1.74999999999999998e165

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

                      if -1.74999999999999998e165 < F < -1e-168 or 1.65000000000000013e-169 < F < 4.4999999999999998e38

                      1. Initial program 76.3%

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

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

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

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

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

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

                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                        4. 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)} - \frac{x}{B}} \]
                        5. lower--.f6450.1

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

                        \[\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}{B}} \]

                      if -1e-168 < F < 1.65000000000000013e-169

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      4. Applied rewrites54.1%

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

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

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

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      8. Step-by-step derivation
                        1. metadata-eval48.1

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

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

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

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

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

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

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

                      if 4.4999999999999998e38 < F

                      1. Initial program 76.3%

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

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

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

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

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

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

                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                      8. Step-by-step derivation
                        1. metadata-eval28.0

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F} \]
                        2. metadata-eval28.0

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

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

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

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

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

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

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

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

                    Alternative 12: 68.8% accurate, 1.5× speedup?

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

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

                      if -1.5e203 < F < -1.4199999999999999

                      1. Initial program 76.3%

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

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

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

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

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

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

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

                      if -1.4199999999999999 < F < 1.3999999999999999

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
                        7. metadata-eval35.8

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      7. Applied rewrites35.8%

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

                      if 1.3999999999999999 < F

                      1. Initial program 76.3%

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

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

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

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

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

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

                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                      8. Step-by-step derivation
                        1. metadata-eval28.0

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F} \]
                        2. metadata-eval28.0

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

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

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

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

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

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

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

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

                    Alternative 13: 68.8% accurate, 1.5× speedup?

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

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

                      if -1.5e203 < F < -1.4199999999999999

                      1. Initial program 76.3%

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

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

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

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

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

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

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

                      if -1.4199999999999999 < F < 1.3999999999999999

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B} \]
                        10. lower-sin.f6436.4

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

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

                      if 1.3999999999999999 < F

                      1. Initial program 76.3%

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

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

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

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

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

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

                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                      8. Step-by-step derivation
                        1. metadata-eval28.0

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F} \]
                        2. metadata-eval28.0

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

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

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

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

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

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

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

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

                    Alternative 14: 61.8% accurate, 1.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := -\frac{x}{B}\\ \mathbf{if}\;F \leq -1.5 \cdot 10^{+203}:\\ \;\;\;\;-\mathsf{fma}\left(F, \frac{\frac{-1}{F \cdot \sin B}}{t\_0}, 1\right) \cdot \frac{x}{B}\\ \mathbf{elif}\;F \leq -1.4 \cdot 10^{+16}:\\ \;\;\;\;t\_0 + \frac{F}{\sin B} \cdot \frac{-1}{F}\\ \mathbf{elif}\;F \leq 440:\\ \;\;\;\;\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{\frac{1}{F}}{\sin B}, t\_0\right)\\ \end{array} \end{array} \]
                    (FPCore (F B x)
                     :precision binary64
                     (let* ((t_0 (- (/ x B))))
                       (if (<= F -1.5e+203)
                         (- (* (fma F (/ (/ -1.0 (* F (sin B))) t_0) 1.0) (/ x B)))
                         (if (<= F -1.4e+16)
                           (+ t_0 (* (/ F (sin B)) (/ -1.0 F)))
                           (if (<= F 440.0)
                             (/ (- (* F (pow (+ 2.0 (fma 2.0 x (pow F 2.0))) -0.5)) x) B)
                             (fma F (/ (/ 1.0 F) (sin B)) t_0))))))
                    double code(double F, double B, double x) {
                    	double t_0 = -(x / B);
                    	double tmp;
                    	if (F <= -1.5e+203) {
                    		tmp = -(fma(F, ((-1.0 / (F * sin(B))) / t_0), 1.0) * (x / B));
                    	} else if (F <= -1.4e+16) {
                    		tmp = t_0 + ((F / sin(B)) * (-1.0 / F));
                    	} else if (F <= 440.0) {
                    		tmp = ((F * pow((2.0 + fma(2.0, x, pow(F, 2.0))), -0.5)) - x) / B;
                    	} else {
                    		tmp = fma(F, ((1.0 / F) / sin(B)), t_0);
                    	}
                    	return tmp;
                    }
                    
                    function code(F, B, x)
                    	t_0 = Float64(-Float64(x / B))
                    	tmp = 0.0
                    	if (F <= -1.5e+203)
                    		tmp = Float64(-Float64(fma(F, Float64(Float64(-1.0 / Float64(F * sin(B))) / t_0), 1.0) * Float64(x / B)));
                    	elseif (F <= -1.4e+16)
                    		tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * Float64(-1.0 / F)));
                    	elseif (F <= 440.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(Float64(1.0 / F) / sin(B)), t_0);
                    	end
                    	return tmp
                    end
                    
                    code[F_, B_, x_] := Block[{t$95$0 = (-N[(x / B), $MachinePrecision])}, If[LessEqual[F, -1.5e+203], (-N[(N[(F * N[(N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x / B), $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, -1.4e+16], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 440.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[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := -\frac{x}{B}\\
                    \mathbf{if}\;F \leq -1.5 \cdot 10^{+203}:\\
                    \;\;\;\;-\mathsf{fma}\left(F, \frac{\frac{-1}{F \cdot \sin B}}{t\_0}, 1\right) \cdot \frac{x}{B}\\
                    
                    \mathbf{elif}\;F \leq -1.4 \cdot 10^{+16}:\\
                    \;\;\;\;t\_0 + \frac{F}{\sin B} \cdot \frac{-1}{F}\\
                    
                    \mathbf{elif}\;F \leq 440:\\
                    \;\;\;\;\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{\frac{1}{F}}{\sin B}, t\_0\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 4 regimes
                    2. if F < -1.5e203

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

                      if -1.5e203 < F < -1.4e16

                      1. Initial program 76.3%

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

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

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

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

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

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

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

                      if -1.4e16 < F < 440

                      1. Initial program 76.3%

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

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

                      if 440 < F

                      1. Initial program 76.3%

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

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

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

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

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

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

                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                      8. Step-by-step derivation
                        1. metadata-eval28.0

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F} \]
                        2. metadata-eval28.0

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

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

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

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

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

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

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

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

                    Alternative 15: 59.8% accurate, 2.0× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := -\frac{x}{B}\\ \mathbf{if}\;F \leq -1.4 \cdot 10^{+16}:\\ \;\;\;\;t\_0 + \frac{F}{\sin B} \cdot \frac{-1}{F}\\ \mathbf{elif}\;F \leq 440:\\ \;\;\;\;\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{\frac{1}{F}}{\sin B}, t\_0\right)\\ \end{array} \end{array} \]
                    (FPCore (F B x)
                     :precision binary64
                     (let* ((t_0 (- (/ x B))))
                       (if (<= F -1.4e+16)
                         (+ t_0 (* (/ F (sin B)) (/ -1.0 F)))
                         (if (<= F 440.0)
                           (/ (- (* F (pow (+ 2.0 (fma 2.0 x (pow F 2.0))) -0.5)) x) B)
                           (fma F (/ (/ 1.0 F) (sin B)) t_0)))))
                    double code(double F, double B, double x) {
                    	double t_0 = -(x / B);
                    	double tmp;
                    	if (F <= -1.4e+16) {
                    		tmp = t_0 + ((F / sin(B)) * (-1.0 / F));
                    	} else if (F <= 440.0) {
                    		tmp = ((F * pow((2.0 + fma(2.0, x, pow(F, 2.0))), -0.5)) - x) / B;
                    	} else {
                    		tmp = fma(F, ((1.0 / F) / sin(B)), t_0);
                    	}
                    	return tmp;
                    }
                    
                    function code(F, B, x)
                    	t_0 = Float64(-Float64(x / B))
                    	tmp = 0.0
                    	if (F <= -1.4e+16)
                    		tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * Float64(-1.0 / F)));
                    	elseif (F <= 440.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(Float64(1.0 / F) / sin(B)), t_0);
                    	end
                    	return tmp
                    end
                    
                    code[F_, B_, x_] := Block[{t$95$0 = (-N[(x / B), $MachinePrecision])}, If[LessEqual[F, -1.4e+16], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 440.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[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := -\frac{x}{B}\\
                    \mathbf{if}\;F \leq -1.4 \cdot 10^{+16}:\\
                    \;\;\;\;t\_0 + \frac{F}{\sin B} \cdot \frac{-1}{F}\\
                    
                    \mathbf{elif}\;F \leq 440:\\
                    \;\;\;\;\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{\frac{1}{F}}{\sin B}, t\_0\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if F < -1.4e16

                      1. Initial program 76.3%

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

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

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

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

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

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

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

                      if -1.4e16 < F < 440

                      1. Initial program 76.3%

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

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

                      if 440 < F

                      1. Initial program 76.3%

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

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

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

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

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

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

                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                      8. Step-by-step derivation
                        1. metadata-eval28.0

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F} \]
                        2. metadata-eval28.0

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

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

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

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

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

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

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

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

                    Alternative 16: 59.0% accurate, 2.0× speedup?

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

                      1. Initial program 76.3%

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

                          \[\leadsto \frac{-1}{\sin B} \]
                      4. Applied rewrites17.8%

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

                      if -1.42000000000000012e65 < F < 440

                      1. Initial program 76.3%

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

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

                      if 440 < F

                      1. Initial program 76.3%

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

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

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

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

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

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

                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                      8. Step-by-step derivation
                        1. metadata-eval28.0

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F} \]
                        2. metadata-eval28.0

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

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

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

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

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

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

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

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

                    Alternative 17: 58.8% accurate, 2.1× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := -\frac{x}{B}\\ \mathbf{if}\;F \leq -1.42 \cdot 10^{+65}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 440:\\ \;\;\;\;t\_0 + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{\frac{1}{F}}{\sin B}, t\_0\right)\\ \end{array} \end{array} \]
                    (FPCore (F B x)
                     :precision binary64
                     (let* ((t_0 (- (/ x B))))
                       (if (<= F -1.42e+65)
                         (/ -1.0 (sin B))
                         (if (<= F 440.0)
                           (+ t_0 (* (/ F B) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0)))))
                           (fma F (/ (/ 1.0 F) (sin B)) t_0)))))
                    double code(double F, double B, double x) {
                    	double t_0 = -(x / B);
                    	double tmp;
                    	if (F <= -1.42e+65) {
                    		tmp = -1.0 / sin(B);
                    	} else if (F <= 440.0) {
                    		tmp = t_0 + ((F / B) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
                    	} else {
                    		tmp = fma(F, ((1.0 / F) / sin(B)), t_0);
                    	}
                    	return tmp;
                    }
                    
                    function code(F, B, x)
                    	t_0 = Float64(-Float64(x / B))
                    	tmp = 0.0
                    	if (F <= -1.42e+65)
                    		tmp = Float64(-1.0 / sin(B));
                    	elseif (F <= 440.0)
                    		tmp = Float64(t_0 + Float64(Float64(F / B) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0)))));
                    	else
                    		tmp = fma(F, Float64(Float64(1.0 / F) / sin(B)), t_0);
                    	end
                    	return tmp
                    end
                    
                    code[F_, B_, x_] := Block[{t$95$0 = (-N[(x / B), $MachinePrecision])}, If[LessEqual[F, -1.42e+65], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 440.0], N[(t$95$0 + N[(N[(F / B), $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[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := -\frac{x}{B}\\
                    \mathbf{if}\;F \leq -1.42 \cdot 10^{+65}:\\
                    \;\;\;\;\frac{-1}{\sin B}\\
                    
                    \mathbf{elif}\;F \leq 440:\\
                    \;\;\;\;t\_0 + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(F, \frac{\frac{1}{F}}{\sin B}, t\_0\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if F < -1.42000000000000012e65

                      1. Initial program 76.3%

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

                          \[\leadsto \frac{-1}{\sin B} \]
                      4. Applied rewrites17.8%

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

                      if -1.42000000000000012e65 < F < 440

                      1. Initial program 76.3%

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

                          \[\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 rewrites61.4%

                        \[\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. Taylor expanded in B around 0

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

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

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

                      if 440 < F

                      1. Initial program 76.3%

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

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

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

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

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

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

                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                      8. Step-by-step derivation
                        1. metadata-eval28.0

                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F} \]
                        2. metadata-eval28.0

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

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

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

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

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

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

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

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

                    Alternative 18: 52.8% accurate, 2.2× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.42 \cdot 10^{+65}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 45000:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \end{array} \]
                    (FPCore (F B x)
                     :precision binary64
                     (if (<= F -1.42e+65)
                       (/ -1.0 (sin B))
                       (if (<= F 45000.0)
                         (+
                          (- (/ x B))
                          (* (/ F B) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0)))))
                         (/ 1.0 (sin B)))))
                    double code(double F, double B, double x) {
                    	double tmp;
                    	if (F <= -1.42e+65) {
                    		tmp = -1.0 / sin(B);
                    	} else if (F <= 45000.0) {
                    		tmp = -(x / B) + ((F / B) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
                    	} else {
                    		tmp = 1.0 / sin(B);
                    	}
                    	return tmp;
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(f, b, x)
                    use fmin_fmax_functions
                        real(8), intent (in) :: f
                        real(8), intent (in) :: b
                        real(8), intent (in) :: x
                        real(8) :: tmp
                        if (f <= (-1.42d+65)) then
                            tmp = (-1.0d0) / sin(b)
                        else if (f <= 45000.0d0) then
                            tmp = -(x / b) + ((f / b) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
                        else
                            tmp = 1.0d0 / sin(b)
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double F, double B, double x) {
                    	double tmp;
                    	if (F <= -1.42e+65) {
                    		tmp = -1.0 / Math.sin(B);
                    	} else if (F <= 45000.0) {
                    		tmp = -(x / B) + ((F / B) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
                    	} else {
                    		tmp = 1.0 / Math.sin(B);
                    	}
                    	return tmp;
                    }
                    
                    def code(F, B, x):
                    	tmp = 0
                    	if F <= -1.42e+65:
                    		tmp = -1.0 / math.sin(B)
                    	elif F <= 45000.0:
                    		tmp = -(x / B) + ((F / B) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
                    	else:
                    		tmp = 1.0 / math.sin(B)
                    	return tmp
                    
                    function code(F, B, x)
                    	tmp = 0.0
                    	if (F <= -1.42e+65)
                    		tmp = Float64(-1.0 / sin(B));
                    	elseif (F <= 45000.0)
                    		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(F / B) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0)))));
                    	else
                    		tmp = Float64(1.0 / sin(B));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(F, B, x)
                    	tmp = 0.0;
                    	if (F <= -1.42e+65)
                    		tmp = -1.0 / sin(B);
                    	elseif (F <= 45000.0)
                    		tmp = -(x / B) + ((F / B) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0)));
                    	else
                    		tmp = 1.0 / sin(B);
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[F_, B_, x_] := If[LessEqual[F, -1.42e+65], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 45000.0], N[((-N[(x / B), $MachinePrecision]) + N[(N[(F / B), $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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;F \leq -1.42 \cdot 10^{+65}:\\
                    \;\;\;\;\frac{-1}{\sin B}\\
                    
                    \mathbf{elif}\;F \leq 45000:\\
                    \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{1}{\sin B}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if F < -1.42000000000000012e65

                      1. Initial program 76.3%

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

                          \[\leadsto \frac{-1}{\sin B} \]
                      4. Applied rewrites17.8%

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

                      if -1.42000000000000012e65 < F < 45000

                      1. Initial program 76.3%

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

                          \[\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 rewrites61.4%

                        \[\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. Taylor expanded in B around 0

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

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

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

                      if 45000 < F

                      1. Initial program 76.3%

                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      2. 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}} \]
                    3. Recombined 3 regimes into one program.
                    4. Add Preprocessing

                    Alternative 19: 52.6% accurate, 2.5× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2300:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1.2 \cdot 10^{-27}:\\ \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \frac{F}{B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \end{array} \]
                    (FPCore (F B x)
                     :precision binary64
                     (if (<= F -2300.0)
                       (/ -1.0 (sin B))
                       (if (<= F 1.2e-27)
                         (+ (- (* x (/ 1.0 B))) (* (/ F B) (pow (+ 2.0 (* 2.0 x)) -0.5)))
                         (/ 1.0 (sin B)))))
                    double code(double F, double B, double x) {
                    	double tmp;
                    	if (F <= -2300.0) {
                    		tmp = -1.0 / sin(B);
                    	} else if (F <= 1.2e-27) {
                    		tmp = -(x * (1.0 / B)) + ((F / B) * pow((2.0 + (2.0 * x)), -0.5));
                    	} else {
                    		tmp = 1.0 / sin(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 <= (-2300.0d0)) then
                            tmp = (-1.0d0) / sin(b)
                        else if (f <= 1.2d-27) then
                            tmp = -(x * (1.0d0 / b)) + ((f / b) * ((2.0d0 + (2.0d0 * x)) ** (-0.5d0)))
                        else
                            tmp = 1.0d0 / sin(b)
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double F, double B, double x) {
                    	double tmp;
                    	if (F <= -2300.0) {
                    		tmp = -1.0 / Math.sin(B);
                    	} else if (F <= 1.2e-27) {
                    		tmp = -(x * (1.0 / B)) + ((F / B) * Math.pow((2.0 + (2.0 * x)), -0.5));
                    	} else {
                    		tmp = 1.0 / Math.sin(B);
                    	}
                    	return tmp;
                    }
                    
                    def code(F, B, x):
                    	tmp = 0
                    	if F <= -2300.0:
                    		tmp = -1.0 / math.sin(B)
                    	elif F <= 1.2e-27:
                    		tmp = -(x * (1.0 / B)) + ((F / B) * math.pow((2.0 + (2.0 * x)), -0.5))
                    	else:
                    		tmp = 1.0 / math.sin(B)
                    	return tmp
                    
                    function code(F, B, x)
                    	tmp = 0.0
                    	if (F <= -2300.0)
                    		tmp = Float64(-1.0 / sin(B));
                    	elseif (F <= 1.2e-27)
                    		tmp = Float64(Float64(-Float64(x * Float64(1.0 / B))) + Float64(Float64(F / B) * (Float64(2.0 + Float64(2.0 * x)) ^ -0.5)));
                    	else
                    		tmp = Float64(1.0 / sin(B));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(F, B, x)
                    	tmp = 0.0;
                    	if (F <= -2300.0)
                    		tmp = -1.0 / sin(B);
                    	elseif (F <= 1.2e-27)
                    		tmp = -(x * (1.0 / B)) + ((F / B) * ((2.0 + (2.0 * x)) ^ -0.5));
                    	else
                    		tmp = 1.0 / sin(B);
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[F_, B_, x_] := If[LessEqual[F, -2300.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.2e-27], N[((-N[(x * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / B), $MachinePrecision] * N[Power[N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;F \leq -2300:\\
                    \;\;\;\;\frac{-1}{\sin B}\\
                    
                    \mathbf{elif}\;F \leq 1.2 \cdot 10^{-27}:\\
                    \;\;\;\;\left(-x \cdot \frac{1}{B}\right) + \frac{F}{B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{1}{\sin B}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if F < -2300

                      1. Initial program 76.3%

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

                          \[\leadsto \frac{-1}{\sin B} \]
                      4. Applied rewrites17.8%

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

                      if -2300 < F < 1.20000000000000001e-27

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} \]
                      4. Applied rewrites54.1%

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

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

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

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

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

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

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

                      if 1.20000000000000001e-27 < F

                      1. Initial program 76.3%

                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      2. 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}} \]
                    3. Recombined 3 regimes into one program.
                    4. Add Preprocessing

                    Alternative 20: 45.8% accurate, 2.6× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -9.8 \cdot 10^{-18}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 3.9 \cdot 10^{-47}:\\ \;\;\;\;-1 \cdot \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \end{array} \]
                    (FPCore (F B x)
                     :precision binary64
                     (if (<= F -9.8e-18)
                       (/ -1.0 (sin B))
                       (if (<= F 3.9e-47) (- (* 1.0 (/ x B))) (/ 1.0 (sin B)))))
                    double code(double F, double B, double x) {
                    	double tmp;
                    	if (F <= -9.8e-18) {
                    		tmp = -1.0 / sin(B);
                    	} else if (F <= 3.9e-47) {
                    		tmp = -(1.0 * (x / B));
                    	} else {
                    		tmp = 1.0 / sin(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 <= (-9.8d-18)) then
                            tmp = (-1.0d0) / sin(b)
                        else if (f <= 3.9d-47) then
                            tmp = -(1.0d0 * (x / b))
                        else
                            tmp = 1.0d0 / sin(b)
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double F, double B, double x) {
                    	double tmp;
                    	if (F <= -9.8e-18) {
                    		tmp = -1.0 / Math.sin(B);
                    	} else if (F <= 3.9e-47) {
                    		tmp = -(1.0 * (x / B));
                    	} else {
                    		tmp = 1.0 / Math.sin(B);
                    	}
                    	return tmp;
                    }
                    
                    def code(F, B, x):
                    	tmp = 0
                    	if F <= -9.8e-18:
                    		tmp = -1.0 / math.sin(B)
                    	elif F <= 3.9e-47:
                    		tmp = -(1.0 * (x / B))
                    	else:
                    		tmp = 1.0 / math.sin(B)
                    	return tmp
                    
                    function code(F, B, x)
                    	tmp = 0.0
                    	if (F <= -9.8e-18)
                    		tmp = Float64(-1.0 / sin(B));
                    	elseif (F <= 3.9e-47)
                    		tmp = Float64(-Float64(1.0 * Float64(x / B)));
                    	else
                    		tmp = Float64(1.0 / sin(B));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(F, B, x)
                    	tmp = 0.0;
                    	if (F <= -9.8e-18)
                    		tmp = -1.0 / sin(B);
                    	elseif (F <= 3.9e-47)
                    		tmp = -(1.0 * (x / B));
                    	else
                    		tmp = 1.0 / sin(B);
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[F_, B_, x_] := If[LessEqual[F, -9.8e-18], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.9e-47], (-N[(1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]), N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;F \leq -9.8 \cdot 10^{-18}:\\
                    \;\;\;\;\frac{-1}{\sin B}\\
                    
                    \mathbf{elif}\;F \leq 3.9 \cdot 10^{-47}:\\
                    \;\;\;\;-1 \cdot \frac{x}{B}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{1}{\sin B}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if F < -9.8000000000000002e-18

                      1. Initial program 76.3%

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

                          \[\leadsto \frac{-1}{\sin B} \]
                      4. Applied rewrites17.8%

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

                      if -9.8000000000000002e-18 < F < 3.89999999999999978e-47

                      1. Initial program 76.3%

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

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

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

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

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

                        \[\leadsto -\color{blue}{1} \cdot \frac{x}{B} \]
                      7. Step-by-step derivation
                        1. Applied rewrites29.4%

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

                        if 3.89999999999999978e-47 < F

                        1. Initial program 76.3%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. 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}} \]
                      8. Recombined 3 regimes into one program.
                      9. Add Preprocessing

                      Alternative 21: 32.2% accurate, 2.9× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 4.7 \cdot 10^{-29}:\\ \;\;\;\;-1 \cdot \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \end{array} \end{array} \]
                      (FPCore (F B x)
                       :precision binary64
                       (if (<= B 4.7e-29) (- (* 1.0 (/ x B))) (/ -1.0 (sin B))))
                      double code(double F, double B, double x) {
                      	double tmp;
                      	if (B <= 4.7e-29) {
                      		tmp = -(1.0 * (x / B));
                      	} else {
                      		tmp = -1.0 / sin(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 (b <= 4.7d-29) then
                              tmp = -(1.0d0 * (x / b))
                          else
                              tmp = (-1.0d0) / sin(b)
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double F, double B, double x) {
                      	double tmp;
                      	if (B <= 4.7e-29) {
                      		tmp = -(1.0 * (x / B));
                      	} else {
                      		tmp = -1.0 / Math.sin(B);
                      	}
                      	return tmp;
                      }
                      
                      def code(F, B, x):
                      	tmp = 0
                      	if B <= 4.7e-29:
                      		tmp = -(1.0 * (x / B))
                      	else:
                      		tmp = -1.0 / math.sin(B)
                      	return tmp
                      
                      function code(F, B, x)
                      	tmp = 0.0
                      	if (B <= 4.7e-29)
                      		tmp = Float64(-Float64(1.0 * Float64(x / B)));
                      	else
                      		tmp = Float64(-1.0 / sin(B));
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(F, B, x)
                      	tmp = 0.0;
                      	if (B <= 4.7e-29)
                      		tmp = -(1.0 * (x / B));
                      	else
                      		tmp = -1.0 / sin(B);
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[F_, B_, x_] := If[LessEqual[B, 4.7e-29], (-N[(1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]), N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;B \leq 4.7 \cdot 10^{-29}:\\
                      \;\;\;\;-1 \cdot \frac{x}{B}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{-1}{\sin B}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if B < 4.6999999999999998e-29

                        1. Initial program 76.3%

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

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

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

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

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

                          \[\leadsto -\color{blue}{1} \cdot \frac{x}{B} \]
                        7. Step-by-step derivation
                          1. Applied rewrites29.4%

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

                          if 4.6999999999999998e-29 < B

                          1. Initial program 76.3%

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

                              \[\leadsto \frac{-1}{\sin B} \]
                          4. Applied rewrites17.8%

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

                        Alternative 22: 29.4% accurate, 14.0× speedup?

                        \[\begin{array}{l} \\ -1 \cdot \frac{x}{B} \end{array} \]
                        (FPCore (F B x) :precision binary64 (- (* 1.0 (/ x B))))
                        double code(double F, double B, double x) {
                        	return -(1.0 * (x / B));
                        }
                        
                        module fmin_fmax_functions
                            implicit none
                            private
                            public fmax
                            public fmin
                        
                            interface fmax
                                module procedure fmax88
                                module procedure fmax44
                                module procedure fmax84
                                module procedure fmax48
                            end interface
                            interface fmin
                                module procedure fmin88
                                module procedure fmin44
                                module procedure fmin84
                                module procedure fmin48
                            end interface
                        contains
                            real(8) function fmax88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmax44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmax84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmax48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                            end function
                            real(8) function fmin88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmin44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmin84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmin48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                            end function
                        end module
                        
                        real(8) function code(f, b, x)
                        use fmin_fmax_functions
                            real(8), intent (in) :: f
                            real(8), intent (in) :: b
                            real(8), intent (in) :: x
                            code = -(1.0d0 * (x / b))
                        end function
                        
                        public static double code(double F, double B, double x) {
                        	return -(1.0 * (x / B));
                        }
                        
                        def code(F, B, x):
                        	return -(1.0 * (x / B))
                        
                        function code(F, B, x)
                        	return Float64(-Float64(1.0 * Float64(x / B)))
                        end
                        
                        function tmp = code(F, B, x)
                        	tmp = -(1.0 * (x / B));
                        end
                        
                        code[F_, B_, x_] := (-N[(1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision])
                        
                        \begin{array}{l}
                        
                        \\
                        -1 \cdot \frac{x}{B}
                        \end{array}
                        
                        Derivation
                        1. Initial program 76.3%

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

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

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

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

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

                          \[\leadsto -\color{blue}{1} \cdot \frac{x}{B} \]
                        7. Step-by-step derivation
                          1. Applied rewrites29.4%

                            \[\leadsto -\color{blue}{1} \cdot \frac{x}{B} \]
                          2. Add Preprocessing

                          Alternative 23: 10.8% 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.3%

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

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

                              \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                            2. lower-sin.f6417.8

                              \[\leadsto \frac{-1}{\sin B} \]
                          4. Applied rewrites17.8%

                            \[\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.8%

                              \[\leadsto \frac{-1}{B} \]
                            2. Add Preprocessing

                            Reproduce

                            ?
                            herbie shell --seed 2025148 
                            (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))))))