VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.6% → 99.7%
Time: 6.5s
Alternatives: 19
Speedup: 1.4×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 19 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.6% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;F \leq 10^{+43}:\\
\;\;\;\;\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}}, t\_0\right)\\

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


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

    1. Initial program 76.6%

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

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

        \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
      8. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

      \[\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}{\tan B}\right)} \]
    4. Taylor expanded in F around -inf

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
        12. lower-/.f6456.5

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

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

      if -4e20 < F < 1.00000000000000001e43

      1. Initial program 76.6%

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

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
        8. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

        \[\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-*.f64N/A

          \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\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) \]

      if 1.00000000000000001e43 < F

      1. Initial program 76.6%

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

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

          \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
        8. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

        \[\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}{\tan B}\right)} \]
      4. Taylor expanded in F around inf

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

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

      Alternative 2: 99.7% accurate, 1.2× speedup?

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

        1. Initial program 76.6%

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

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

            \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
          8. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

          \[\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}{\tan B}\right)} \]
        4. Taylor expanded in F around -inf

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
            12. lower-/.f6456.5

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

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

          if -5.0000000000000001e26 < F < 9.5e7

          1. Initial program 76.6%

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

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
            8. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

            \[\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-*.f64N/A

              \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\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) \]
          7. Step-by-step derivation
            1. lift-fma.f64N/A

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

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

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

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

          if 9.5e7 < F

          1. Initial program 76.6%

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

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

              \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
            8. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

            \[\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}{\tan B}\right)} \]
          4. Taylor expanded in F around inf

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

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

          Alternative 3: 91.9% accurate, 1.3× speedup?

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

            1. Initial program 76.6%

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

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

                \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
              8. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

              \[\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}{\tan B}\right)} \]
            4. Taylor expanded in F around -inf

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
                12. lower-/.f6456.5

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

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

              if -2.7e20 < F < 1.74999999999999998e-4

              1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\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 1.74999999999999998e-4 < F

              1. Initial program 76.6%

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

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

                  \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
                8. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

                \[\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}{\tan B}\right)} \]
              4. Taylor expanded in F around inf

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

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

              Alternative 4: 85.2% accurate, 1.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}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.7 \cdot 10^{+20}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_1\\ \mathbf{elif}\;F \leq 2 \cdot 10^{+30}:\\ \;\;\;\;t\_0 \cdot \frac{F}{B} - t\_1\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{+97}:\\ \;\;\;\;\mathsf{fma}\left(-F, \frac{1}{\frac{\sin B}{-t\_0}}, -1 \cdot \frac{x}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-F, \frac{-1}{B \cdot F}, \frac{-x}{\tan 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)) (t_1 (/ x (tan B))))
                 (if (<= F -2.7e+20)
                   (- (/ -1.0 (sin B)) t_1)
                   (if (<= F 2e+30)
                     (- (* t_0 (/ F B)) t_1)
                     (if (<= F 2.1e+97)
                       (fma (- F) (/ 1.0 (/ (sin B) (- t_0))) (* -1.0 (/ x B)))
                       (fma (- F) (/ -1.0 (* B F)) (/ (- x) (tan B))))))))
              double code(double F, double B, double x) {
              	double t_0 = pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5);
              	double t_1 = x / tan(B);
              	double tmp;
              	if (F <= -2.7e+20) {
              		tmp = (-1.0 / sin(B)) - t_1;
              	} else if (F <= 2e+30) {
              		tmp = (t_0 * (F / B)) - t_1;
              	} else if (F <= 2.1e+97) {
              		tmp = fma(-F, (1.0 / (sin(B) / -t_0)), (-1.0 * (x / B)));
              	} else {
              		tmp = fma(-F, (-1.0 / (B * F)), (-x / tan(B)));
              	}
              	return tmp;
              }
              
              function code(F, B, x)
              	t_0 = fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5
              	t_1 = Float64(x / tan(B))
              	tmp = 0.0
              	if (F <= -2.7e+20)
              		tmp = Float64(Float64(-1.0 / sin(B)) - t_1);
              	elseif (F <= 2e+30)
              		tmp = Float64(Float64(t_0 * Float64(F / B)) - t_1);
              	elseif (F <= 2.1e+97)
              		tmp = fma(Float64(-F), Float64(1.0 / Float64(sin(B) / Float64(-t_0))), Float64(-1.0 * Float64(x / B)));
              	else
              		tmp = fma(Float64(-F), Float64(-1.0 / Float64(B * F)), Float64(Float64(-x) / tan(B)));
              	end
              	return tmp
              end
              
              code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.7e+20], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 2e+30], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 2.1e+97], N[((-F) * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / (-t$95$0)), $MachinePrecision]), $MachinePrecision] + N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-F) * N[(-1.0 / N[(B * F), $MachinePrecision]), $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $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}\\
              t_1 := \frac{x}{\tan B}\\
              \mathbf{if}\;F \leq -2.7 \cdot 10^{+20}:\\
              \;\;\;\;\frac{-1}{\sin B} - t\_1\\
              
              \mathbf{elif}\;F \leq 2 \cdot 10^{+30}:\\
              \;\;\;\;t\_0 \cdot \frac{F}{B} - t\_1\\
              
              \mathbf{elif}\;F \leq 2.1 \cdot 10^{+97}:\\
              \;\;\;\;\mathsf{fma}\left(-F, \frac{1}{\frac{\sin B}{-t\_0}}, -1 \cdot \frac{x}{B}\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\mathsf{fma}\left(-F, \frac{-1}{B \cdot F}, \frac{-x}{\tan B}\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 4 regimes
              2. if F < -2.7e20

                1. Initial program 76.6%

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

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

                    \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
                  8. lower-fma.f64N/A

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

                  \[\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}{\tan B}\right)} \]
                4. Taylor expanded in F around -inf

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
                    12. lower-/.f6456.5

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

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

                  if -2.7e20 < F < 2e30

                  1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\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 2e30 < F < 2.10000000000000012e97

                  1. Initial program 76.6%

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

                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                    8. lower-fma.f64N/A

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                    \[\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-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 2.10000000000000012e97 < F

                  1. Initial program 76.6%

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

                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                    8. lower-fma.f64N/A

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                    \[\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-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 5: 85.2% accurate, 1.3× speedup?

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

                  1. Initial program 76.6%

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

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

                      \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
                    8. lower-fma.f64N/A

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

                    \[\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}{\tan B}\right)} \]
                  4. Taylor expanded in F around -inf

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{-1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
                      12. lower-/.f6456.5

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

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

                    if -2.7e20 < F < 2e30

                    1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\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 2e30 < F < 2.10000000000000012e97

                    1. Initial program 76.6%

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

                        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                      8. lower-fma.f64N/A

                        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                      \[\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-*.f64N/A

                        \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\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) \]
                    7. Taylor expanded in B around 0

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

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

                        \[\leadsto \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}}, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                    9. Applied rewrites58.1%

                      \[\leadsto \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}}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]

                    if 2.10000000000000012e97 < F

                    1. Initial program 76.6%

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

                        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                      8. lower-fma.f64N/A

                        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                      \[\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-*.f64N/A

                        \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 6: 77.3% accurate, 1.4× speedup?

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

                    1. Initial program 76.6%

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

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

                        \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
                      8. lower-fma.f64N/A

                        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

                      \[\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}{\tan B}\right)} \]
                    4. Taylor expanded in F around -inf

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

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

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

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

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

                      if -1.19999999999999997e-15 < x < 2.5499999999999998

                      1. Initial program 76.6%

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

                          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                        8. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                        \[\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-*.f64N/A

                          \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\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) \]
                      7. Taylor expanded in B around 0

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

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

                          \[\leadsto \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}}, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                      9. Applied rewrites58.1%

                        \[\leadsto \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}}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]

                      if 2.5499999999999998 < x

                      1. Initial program 76.6%

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

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

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

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

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

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

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

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

                    Alternative 7: 77.3% accurate, 1.4× speedup?

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

                      1. Initial program 76.6%

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

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

                          \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
                        8. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

                        \[\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}{\tan B}\right)} \]
                      4. Taylor expanded in F around -inf

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

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

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

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

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

                        if -1.19999999999999997e-15 < x < 2.5499999999999998

                        1. Initial program 76.6%

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

                            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                          8. lower-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                          \[\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 B around 0

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

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

                            \[\leadsto \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}, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                        6. Applied rewrites58.1%

                          \[\leadsto \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}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]

                        if 2.5499999999999998 < x

                        1. Initial program 76.6%

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

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

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

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

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

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

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

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

                      Alternative 8: 77.3% accurate, 1.4× speedup?

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

                        1. Initial program 76.6%

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

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

                            \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
                          8. lower-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

                          \[\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}{\tan B}\right)} \]
                        4. Taylor expanded in F around -inf

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

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

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

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

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

                          if -1.19999999999999997e-15 < x < 2.2000000000000002

                          1. Initial program 76.6%

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

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

                              \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
                            8. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

                            \[\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}{\tan B}\right)} \]
                          4. Taylor expanded in B around 0

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

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

                              \[\leadsto \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, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                          6. Applied rewrites58.1%

                            \[\leadsto \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, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]

                          if 2.2000000000000002 < x

                          1. Initial program 76.6%

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

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

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

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

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

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

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

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

                        Alternative 9: 73.7% accurate, 0.3× speedup?

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

                          1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\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 -5e4 < (+.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)))))) < 10

                          1. Initial program 76.6%

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

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                            8. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                            \[\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-*.f64N/A

                              \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\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) \]
                          7. Taylor expanded in x around 0

                            \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{2 + {F}^{2}}}} \]
                          8. Step-by-step derivation
                            1. lower-/.f64N/A

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

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

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

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

                              \[\leadsto \frac{F}{\sin B \cdot \sqrt{2 + {F}^{2}}} \]
                            6. lower-pow.f6430.2

                              \[\leadsto \frac{F}{\sin B \cdot \sqrt{2 + {F}^{2}}} \]
                          9. Applied rewrites30.2%

                            \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{2 + {F}^{2}}}} \]

                          if 4.99999999999999981e225 < (+.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.6%

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

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                            8. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                            \[\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-*.f64N/A

                              \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 10: 73.7% accurate, 0.3× speedup?

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

                          1. Initial program 76.6%

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

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

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

                            \[\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. lift-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -5e4 < (+.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)))))) < 10

                          1. Initial program 76.6%

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

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                            8. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                            \[\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-*.f64N/A

                              \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\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) \]
                          7. Taylor expanded in x around 0

                            \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{2 + {F}^{2}}}} \]
                          8. Step-by-step derivation
                            1. lower-/.f64N/A

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

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

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

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

                              \[\leadsto \frac{F}{\sin B \cdot \sqrt{2 + {F}^{2}}} \]
                            6. lower-pow.f6430.2

                              \[\leadsto \frac{F}{\sin B \cdot \sqrt{2 + {F}^{2}}} \]
                          9. Applied rewrites30.2%

                            \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{2 + {F}^{2}}}} \]

                          if 4.99999999999999981e225 < (+.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.6%

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

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                            8. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                            \[\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-*.f64N/A

                              \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 11: 70.9% accurate, 1.7× speedup?

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

                          1. Initial program 76.6%

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

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

                              \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
                            8. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

                            \[\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}{\tan B}\right)} \]
                          4. Taylor expanded in F around -inf

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

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

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

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

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

                            if -4.3000000000000002e-35 < x < 2.05000000000000003e-84

                            1. Initial program 76.6%

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

                                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                              8. lower-fma.f64N/A

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                              \[\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-*.f64N/A

                                \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\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) \]
                            7. Taylor expanded in x around 0

                              \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{2 + {F}^{2}}}} \]
                            8. Step-by-step derivation
                              1. lower-/.f64N/A

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

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

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

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

                                \[\leadsto \frac{F}{\sin B \cdot \sqrt{2 + {F}^{2}}} \]
                              6. lower-pow.f6430.2

                                \[\leadsto \frac{F}{\sin B \cdot \sqrt{2 + {F}^{2}}} \]
                            9. Applied rewrites30.2%

                              \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{2 + {F}^{2}}}} \]
                          6. Recombined 2 regimes into one program.
                          7. Add Preprocessing

                          Alternative 12: 58.8% accurate, 2.2× speedup?

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

                            1. Initial program 76.6%

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

                                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                              8. lower-fma.f64N/A

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                              \[\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-*.f64N/A

                                \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\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) \]
                            7. Taylor expanded in B around 0

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

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

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

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

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

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

                                \[\leadsto \frac{\mathsf{fma}\left(-1, x, \frac{F}{\sqrt{2 + \mathsf{fma}\left(2, x, {F}^{2}\right)}}\right)}{B} \]
                              7. lower-pow.f6444.4

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

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

                            if 2.64999999999999991 < B

                            1. Initial program 76.6%

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

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

                                \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
                              8. lower-fma.f64N/A

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

                              \[\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}{\tan B}\right)} \]
                            4. Taylor expanded in F around -inf

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

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

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

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

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

                            Alternative 13: 56.1% accurate, 2.3× speedup?

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

                              1. Initial program 76.6%

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

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

                                  \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \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) \]
                                8. lower-fma.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \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 rewrites85.0%

                                \[\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}{\tan B}\right)} \]
                              4. Taylor expanded in F around -inf

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

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

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

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

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

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

                                if -2.7e20 < F < 2.2000000000000001e31

                                1. Initial program 76.6%

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

                                    \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                                  8. lower-fma.f64N/A

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                                  \[\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-*.f64N/A

                                    \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\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) \]
                                7. Taylor expanded in B around 0

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

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

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

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

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

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

                                    \[\leadsto \frac{\mathsf{fma}\left(-1, x, \frac{F}{\sqrt{2 + \mathsf{fma}\left(2, x, {F}^{2}\right)}}\right)}{B} \]
                                  7. lower-pow.f6444.4

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

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

                                if 2.2000000000000001e31 < F

                                1. Initial program 76.6%

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

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

                                    \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                                  2. lower-sin.f6416.9

                                    \[\leadsto \frac{1}{\sin B} \]
                                4. Applied rewrites16.9%

                                  \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                              6. Recombined 3 regimes into one program.
                              7. Add Preprocessing

                              Alternative 14: 47.8% accurate, 2.8× speedup?

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

                                1. Initial program 76.6%

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

                                    \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(F\right)}{\mathsf{neg}\left(\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. mult-flipN/A

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

                                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\frac{1}{\mathsf{neg}\left(\sin B\right)} \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) \]
                                  8. lower-fma.f64N/A

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(F\right), \frac{1}{\mathsf{neg}\left(\sin B\right)} \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.9%

                                  \[\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-*.f64N/A

                                    \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\frac{-1}{\sin B} \cdot {\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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(-F, \color{blue}{\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) \]
                                7. Taylor expanded in B around 0

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

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

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

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

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

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

                                    \[\leadsto \frac{\mathsf{fma}\left(-1, x, \frac{F}{\sqrt{2 + \mathsf{fma}\left(2, x, {F}^{2}\right)}}\right)}{B} \]
                                  7. lower-pow.f6444.4

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

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

                                if 0.97999999999999998 < B

                                1. Initial program 76.6%

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

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

                                    \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                                  2. lower-sin.f6416.9

                                    \[\leadsto \frac{1}{\sin B} \]
                                4. Applied rewrites16.9%

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

                              Alternative 15: 37.9% accurate, 2.6× speedup?

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

                                1. Initial program 76.6%

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

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

                                    \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                  2. lower-sin.f6417.2

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

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

                                if -2.95e20 < F < 3.3e9

                                1. Initial program 76.6%

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

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

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

                                  \[\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 \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \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-/.f64N/A

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

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

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

                                    \[\leadsto \frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B} + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  5. lower-pow.f6436.0

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

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

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

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

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

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

                                if 3.3e9 < F

                                1. Initial program 76.6%

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

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

                                    \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                                  2. lower-sin.f6416.9

                                    \[\leadsto \frac{1}{\sin B} \]
                                4. Applied rewrites16.9%

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

                              Alternative 16: 31.0% accurate, 2.9× speedup?

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

                                1. Initial program 76.6%

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

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

                                    \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                  2. lower-sin.f6417.2

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

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

                                if -2.7e20 < F

                                1. Initial program 76.6%

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

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

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

                                  \[\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 \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \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-/.f64N/A

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

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

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

                                    \[\leadsto \frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B} + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  5. lower-pow.f6436.0

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

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

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

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

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

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

                              Alternative 17: 26.1% accurate, 3.7× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot 0.3333333333333333 - x}{B}\\ \mathbf{if}\;F \leq -8.5 \cdot 10^{-263}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-1}{F}, \frac{F}{B}, t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{F}, \frac{F}{B}, t\_0\right)\\ \end{array} \end{array} \]
                              (FPCore (F B x)
                               :precision binary64
                               (let* ((t_0 (/ (- (* (* (* B B) x) 0.3333333333333333) x) B)))
                                 (if (<= F -8.5e-263)
                                   (fma (/ -1.0 F) (/ F B) t_0)
                                   (fma (/ 1.0 F) (/ F B) t_0))))
                              double code(double F, double B, double x) {
                              	double t_0 = ((((B * B) * x) * 0.3333333333333333) - x) / B;
                              	double tmp;
                              	if (F <= -8.5e-263) {
                              		tmp = fma((-1.0 / F), (F / B), t_0);
                              	} else {
                              		tmp = fma((1.0 / F), (F / B), t_0);
                              	}
                              	return tmp;
                              }
                              
                              function code(F, B, x)
                              	t_0 = Float64(Float64(Float64(Float64(Float64(B * B) * x) * 0.3333333333333333) - x) / B)
                              	tmp = 0.0
                              	if (F <= -8.5e-263)
                              		tmp = fma(Float64(-1.0 / F), Float64(F / B), t_0);
                              	else
                              		tmp = fma(Float64(1.0 / F), Float64(F / B), t_0);
                              	end
                              	return tmp
                              end
                              
                              code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(N[(N[(B * B), $MachinePrecision] * x), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -8.5e-263], N[(N[(-1.0 / F), $MachinePrecision] * N[(F / B), $MachinePrecision] + t$95$0), $MachinePrecision], N[(N[(1.0 / F), $MachinePrecision] * N[(F / B), $MachinePrecision] + t$95$0), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              t_0 := \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot 0.3333333333333333 - x}{B}\\
                              \mathbf{if}\;F \leq -8.5 \cdot 10^{-263}:\\
                              \;\;\;\;\mathsf{fma}\left(\frac{-1}{F}, \frac{F}{B}, t\_0\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\mathsf{fma}\left(\frac{1}{F}, \frac{F}{B}, t\_0\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if F < -8.49999999999999975e-263

                                1. Initial program 76.6%

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

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

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

                                  \[\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 \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \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-/.f64N/A

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

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

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

                                    \[\leadsto \frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B} + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  5. lower-pow.f6436.0

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

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

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

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

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

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

                                if -8.49999999999999975e-263 < F

                                1. Initial program 76.6%

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

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

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

                                  \[\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 \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \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-/.f64N/A

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

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

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

                                    \[\leadsto \frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B} + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  5. lower-pow.f6436.0

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

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

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

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

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

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

                              Alternative 18: 22.4% accurate, 4.2× speedup?

                              \[\begin{array}{l} \\ \mathsf{fma}\left(\frac{-1}{F}, \frac{F}{B}, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot 0.3333333333333333 - x}{B}\right) \end{array} \]
                              (FPCore (F B x)
                               :precision binary64
                               (fma (/ -1.0 F) (/ F B) (/ (- (* (* (* B B) x) 0.3333333333333333) x) B)))
                              double code(double F, double B, double x) {
                              	return fma((-1.0 / F), (F / B), (((((B * B) * x) * 0.3333333333333333) - x) / B));
                              }
                              
                              function code(F, B, x)
                              	return fma(Float64(-1.0 / F), Float64(F / B), Float64(Float64(Float64(Float64(Float64(B * B) * x) * 0.3333333333333333) - x) / B))
                              end
                              
                              code[F_, B_, x_] := N[(N[(-1.0 / F), $MachinePrecision] * N[(F / B), $MachinePrecision] + N[(N[(N[(N[(N[(B * B), $MachinePrecision] * x), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]
                              
                              \begin{array}{l}
                              
                              \\
                              \mathsf{fma}\left(\frac{-1}{F}, \frac{F}{B}, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot 0.3333333333333333 - x}{B}\right)
                              \end{array}
                              
                              Derivation
                              1. Initial program 76.6%

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

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

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

                                \[\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 \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \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-/.f64N/A

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

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

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

                                  \[\leadsto \frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B} + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                5. lower-pow.f6436.0

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

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

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

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

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

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

                              Alternative 19: 10.3% 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.6%

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

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

                                  \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                2. lower-sin.f6417.2

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

                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                              5. Taylor expanded in B around 0

                                \[\leadsto \frac{-1}{B} \]
                              6. Step-by-step derivation
                                1. Applied rewrites10.3%

                                  \[\leadsto \frac{-1}{B} \]
                                2. Add Preprocessing

                                Reproduce

                                ?
                                herbie shell --seed 2025154 
                                (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))))))