VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.9% → 99.7%
Time: 6.9s
Alternatives: 25
Speedup: 1.3×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 25 alternatives:

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

Initial Program: 76.9% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.7% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 76.9%

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

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

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

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

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

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

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

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

      if -2.50000000000000004e140 < F < 7.5e19

      1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 7.5e19 < F

      1. Initial program 76.9%

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

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

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

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

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

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

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

          \[\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.0× speedup?

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

        1. Initial program 76.9%

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

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

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

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

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

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

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

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

          if -5.00000000000000024e148 < F < 1e8

          1. Initial program 76.9%

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

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

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

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

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

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

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

          if 1e8 < F

          1. Initial program 76.9%

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

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

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

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

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

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

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

              \[\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: 99.6% accurate, 1.0× speedup?

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

            1. Initial program 76.9%

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

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

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

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

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

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

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

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

              if -2.7e7 < F < 1.6e8

              1. Initial program 76.9%

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

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

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

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

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

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

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

              if 1.6e8 < F

              1. Initial program 76.9%

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

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

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

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

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

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

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

                  \[\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: 98.5% accurate, 1.1× speedup?

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

                1. Initial program 76.9%

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

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

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

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

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

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

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

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

                  if -8200 < F < 2.44999999999999997e-14

                  1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\frac{F \cdot {\left(2 + 2 \cdot x\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                    10. lower-cos.f6456.3

                      \[\leadsto \frac{\frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                  6. Applied rewrites56.3%

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

                  if 2.44999999999999997e-14 < F

                  1. Initial program 76.9%

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

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

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

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

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

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

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

                      \[\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 5: 98.5% accurate, 1.1× speedup?

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

                    1. Initial program 76.9%

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

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

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

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

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

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

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

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

                      if -8200 < F < 2.44999999999999997e-14

                      1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 2.44999999999999997e-14 < F

                        1. Initial program 76.9%

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

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

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

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

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

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

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

                            \[\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 6: 91.7% accurate, 1.3× speedup?

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

                          1. Initial program 76.9%

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

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

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

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

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

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

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

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

                            if -2e4 < F < 7.8999999999999997e-25

                            1. Initial program 76.9%

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

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

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

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

                            if 7.8999999999999997e-25 < F

                            1. Initial program 76.9%

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

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

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

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

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

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

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

                                \[\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 7: 88.4% accurate, 1.2× speedup?

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

                              1. Initial program 76.9%

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

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

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

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

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

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

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

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

                                if -3.39999999999999984e-40 < F < -3.8e-175

                                1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -3.8e-175 < F < 4.1999999999999998e-117

                                1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                5. Step-by-step derivation
                                  1. lower-*.f6456.7

                                    \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                6. Applied rewrites56.7%

                                  \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                7. Step-by-step derivation
                                  1. lift-*.f64N/A

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

                                    \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\tan B} \]
                                  3. lift-neg.f6456.7

                                    \[\leadsto \frac{-x}{\tan B} \]
                                8. Applied rewrites56.7%

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

                                if 4.1999999999999998e-117 < F < 8.2e6

                                1. Initial program 76.9%

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

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

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

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

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

                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                  3. add-flipN/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(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)} \]
                                  4. sub-flipN/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(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)\right)\right)} \]
                                6. Applied rewrites57.1%

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

                                if 8.2e6 < F

                                1. Initial program 76.9%

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

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

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

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

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

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

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

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

                                Alternative 8: 76.7% accurate, 1.4× speedup?

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

                                  1. Initial program 76.9%

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

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

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

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

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

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

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

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

                                    if -6.6999999999999998e-43 < x < 3.19999999999999981e-10

                                    1. Initial program 76.9%

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

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

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

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

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

                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                      3. add-flipN/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(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)} \]
                                      4. sub-flipN/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(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)\right)\right)} \]
                                    6. Applied rewrites57.1%

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

                                    if 3.19999999999999981e-10 < x

                                    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                    5. Step-by-step derivation
                                      1. lower-*.f6456.7

                                        \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                    6. Applied rewrites56.7%

                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                    7. Step-by-step derivation
                                      1. lift-*.f64N/A

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

                                        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\tan B} \]
                                      3. lift-neg.f6456.7

                                        \[\leadsto \frac{-x}{\tan B} \]
                                    8. Applied rewrites56.7%

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

                                  Alternative 9: 76.7% accurate, 1.4× speedup?

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

                                    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                    5. Step-by-step derivation
                                      1. lower-*.f6456.7

                                        \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                    6. Applied rewrites56.7%

                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                    7. Step-by-step derivation
                                      1. lift-*.f64N/A

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

                                        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\tan B} \]
                                      3. lift-neg.f6456.7

                                        \[\leadsto \frac{-x}{\tan B} \]
                                    8. Applied rewrites56.7%

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

                                    if -1.5e-52 < x < 3.19999999999999981e-10

                                    1. Initial program 76.9%

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

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

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

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

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

                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                      3. add-flipN/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(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)} \]
                                      4. sub-flipN/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(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)\right)\right)} \]
                                    6. Applied rewrites57.1%

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

                                  Alternative 10: 75.8% accurate, 1.5× speedup?

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

                                    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                    5. Step-by-step derivation
                                      1. lower-*.f6456.7

                                        \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                    6. Applied rewrites56.7%

                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                    7. Step-by-step derivation
                                      1. lift-*.f64N/A

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

                                        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\tan B} \]
                                      3. lift-neg.f6456.7

                                        \[\leadsto \frac{-x}{\tan B} \]
                                    8. Applied rewrites56.7%

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

                                    if -1.5e-52 < x < 3.19999999999999981e-10

                                    1. Initial program 76.9%

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

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

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

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

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

                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                      3. add-flipN/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(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)} \]
                                      4. sub-flipN/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(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)\right)\right)} \]
                                    6. Applied rewrites57.1%

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

                                  Alternative 11: 74.7% accurate, 1.5× speedup?

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

                                    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                    5. Step-by-step derivation
                                      1. lower-*.f6456.7

                                        \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                    6. Applied rewrites56.7%

                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                    7. Step-by-step derivation
                                      1. lift-*.f64N/A

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

                                        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\tan B} \]
                                      3. lift-neg.f6456.7

                                        \[\leadsto \frac{-x}{\tan B} \]
                                    8. Applied rewrites56.7%

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

                                    if -9.5000000000000008e-53 < x < 1.4000000000000001e-16

                                    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

                                  Alternative 12: 56.6% accurate, 2.2× speedup?

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

                                    1. Initial program 76.9%

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

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

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

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

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

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

                                    if 2.59999999999999999e-7 < B

                                    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                    5. Step-by-step derivation
                                      1. lower-*.f6456.7

                                        \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                    6. Applied rewrites56.7%

                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                    7. Step-by-step derivation
                                      1. lift-*.f64N/A

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

                                        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\tan B} \]
                                      3. lift-neg.f6456.7

                                        \[\leadsto \frac{-x}{\tan B} \]
                                    8. Applied rewrites56.7%

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

                                  Alternative 13: 56.6% accurate, 2.5× speedup?

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

                                    1. Initial program 76.9%

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

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

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

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

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

                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                      3. add-flipN/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(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)} \]
                                      4. sub-flipN/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(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)\right)\right)} \]
                                    6. Applied rewrites57.1%

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

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

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

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

                                    if 2.59999999999999999e-7 < B

                                    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                    5. Step-by-step derivation
                                      1. lower-*.f6456.7

                                        \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                    6. Applied rewrites56.7%

                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                    7. Step-by-step derivation
                                      1. lift-*.f64N/A

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

                                        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\tan B} \]
                                      3. lift-neg.f6456.7

                                        \[\leadsto \frac{-x}{\tan B} \]
                                    8. Applied rewrites56.7%

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

                                  Alternative 14: 56.6% accurate, 2.6× speedup?

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

                                    1. Initial program 76.9%

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

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

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

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

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

                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                      3. add-flipN/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(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)} \]
                                      4. sub-flipN/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(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)\right)\right)} \]
                                    6. Applied rewrites57.1%

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

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

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

                                      if 2.59999999999999999e-7 < B

                                      1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                      5. Step-by-step derivation
                                        1. lower-*.f6456.7

                                          \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                      6. Applied rewrites56.7%

                                        \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                      7. Step-by-step derivation
                                        1. lift-*.f64N/A

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

                                          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\tan B} \]
                                        3. lift-neg.f6456.7

                                          \[\leadsto \frac{-x}{\tan B} \]
                                      8. Applied rewrites56.7%

                                        \[\leadsto \color{blue}{\frac{-x}{\tan B}} \]
                                    9. Recombined 2 regimes into one program.
                                    10. Add Preprocessing

                                    Alternative 15: 46.8% accurate, 2.7× speedup?

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

                                      1. Initial program 76.9%

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

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

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

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

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

                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                        3. add-flipN/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(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)} \]
                                        4. sub-flipN/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(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(-\frac{x}{B}\right)\right)\right)\right)\right)} \]
                                      6. Applied rewrites57.1%

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

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

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

                                        if 2.59999999999999999e-7 < B

                                        1. Initial program 76.9%

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

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

                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                      9. Recombined 2 regimes into one program.
                                      10. Add Preprocessing

                                      Alternative 16: 45.2% accurate, 2.6× speedup?

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

                                        1. Initial program 76.9%

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

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

                                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                          2. lower-sin.f6417.1

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

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

                                        if -32000 < F < 130

                                        1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                        5. Step-by-step derivation
                                          1. lower-*.f6456.7

                                            \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                        6. Applied rewrites56.7%

                                          \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                        7. Taylor expanded in B around 0

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

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

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

                                            \[\leadsto \frac{-1 \cdot x}{B \cdot \left(1 + \frac{1}{3} \cdot \color{blue}{{B}^{2}}\right)} \]
                                          4. lower-pow.f6429.3

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

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

                                        if 130 < F

                                        1. Initial program 76.9%

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

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

                                            \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                                          2. lower-sin.f6416.6

                                            \[\leadsto \frac{1}{\sin B} \]
                                        4. Applied rewrites16.6%

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

                                      Alternative 17: 32.6% accurate, 2.9× speedup?

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

                                        1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                        5. Step-by-step derivation
                                          1. lower-*.f6456.7

                                            \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                        6. Applied rewrites56.7%

                                          \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                        7. Taylor expanded in B around 0

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

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

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

                                            \[\leadsto \frac{-1 \cdot x}{B \cdot \left(1 + \frac{1}{3} \cdot \color{blue}{{B}^{2}}\right)} \]
                                          4. lower-pow.f6429.3

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

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

                                        if 78 < B

                                        1. Initial program 76.9%

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

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

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

                                      Alternative 18: 29.3% accurate, 3.6× speedup?

                                      \[\begin{array}{l} \\ \frac{-1 \cdot x}{B \cdot \left(1 + 0.3333333333333333 \cdot {B}^{2}\right)} \end{array} \]
                                      (FPCore (F B x)
                                       :precision binary64
                                       (/ (* -1.0 x) (* B (+ 1.0 (* 0.3333333333333333 (pow B 2.0))))))
                                      double code(double F, double B, double x) {
                                      	return (-1.0 * x) / (B * (1.0 + (0.3333333333333333 * pow(B, 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 = ((-1.0d0) * x) / (b * (1.0d0 + (0.3333333333333333d0 * (b ** 2.0d0))))
                                      end function
                                      
                                      public static double code(double F, double B, double x) {
                                      	return (-1.0 * x) / (B * (1.0 + (0.3333333333333333 * Math.pow(B, 2.0))));
                                      }
                                      
                                      def code(F, B, x):
                                      	return (-1.0 * x) / (B * (1.0 + (0.3333333333333333 * math.pow(B, 2.0))))
                                      
                                      function code(F, B, x)
                                      	return Float64(Float64(-1.0 * x) / Float64(B * Float64(1.0 + Float64(0.3333333333333333 * (B ^ 2.0)))))
                                      end
                                      
                                      function tmp = code(F, B, x)
                                      	tmp = (-1.0 * x) / (B * (1.0 + (0.3333333333333333 * (B ^ 2.0))));
                                      end
                                      
                                      code[F_, B_, x_] := N[(N[(-1.0 * x), $MachinePrecision] / N[(B * N[(1.0 + N[(0.3333333333333333 * N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \frac{-1 \cdot x}{B \cdot \left(1 + 0.3333333333333333 \cdot {B}^{2}\right)}
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                      5. Step-by-step derivation
                                        1. lower-*.f6456.7

                                          \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                      6. Applied rewrites56.7%

                                        \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                      7. Taylor expanded in B around 0

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

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

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

                                          \[\leadsto \frac{-1 \cdot x}{B \cdot \left(1 + \frac{1}{3} \cdot \color{blue}{{B}^{2}}\right)} \]
                                        4. lower-pow.f6429.3

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

                                        \[\leadsto \frac{-1 \cdot x}{\color{blue}{B \cdot \left(1 + 0.3333333333333333 \cdot {B}^{2}\right)}} \]
                                      10. Add Preprocessing

                                      Alternative 19: 29.2% accurate, 3.9× speedup?

                                      \[\begin{array}{l} \\ \frac{1 + -0.3333333333333333 \cdot {B}^{2}}{B} \cdot \left(-x\right) \end{array} \]
                                      (FPCore (F B x)
                                       :precision binary64
                                       (* (/ (+ 1.0 (* -0.3333333333333333 (pow B 2.0))) B) (- x)))
                                      double code(double F, double B, double x) {
                                      	return ((1.0 + (-0.3333333333333333 * pow(B, 2.0))) / B) * -x;
                                      }
                                      
                                      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 + ((-0.3333333333333333d0) * (b ** 2.0d0))) / b) * -x
                                      end function
                                      
                                      public static double code(double F, double B, double x) {
                                      	return ((1.0 + (-0.3333333333333333 * Math.pow(B, 2.0))) / B) * -x;
                                      }
                                      
                                      def code(F, B, x):
                                      	return ((1.0 + (-0.3333333333333333 * math.pow(B, 2.0))) / B) * -x
                                      
                                      function code(F, B, x)
                                      	return Float64(Float64(Float64(1.0 + Float64(-0.3333333333333333 * (B ^ 2.0))) / B) * Float64(-x))
                                      end
                                      
                                      function tmp = code(F, B, x)
                                      	tmp = ((1.0 + (-0.3333333333333333 * (B ^ 2.0))) / B) * -x;
                                      end
                                      
                                      code[F_, B_, x_] := N[(N[(N[(1.0 + N[(-0.3333333333333333 * N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] * (-x)), $MachinePrecision]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \frac{1 + -0.3333333333333333 \cdot {B}^{2}}{B} \cdot \left(-x\right)
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                      5. Step-by-step derivation
                                        1. lower-*.f6456.7

                                          \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                      6. Applied rewrites56.7%

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

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

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

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

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

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

                                          \[\leadsto \frac{1}{\color{blue}{\tan B}} \cdot \left(-1 \cdot x\right) \]
                                        7. lower-/.f6456.6

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

                                          \[\leadsto \frac{1}{\tan B} \cdot \left(-1 \cdot \color{blue}{x}\right) \]
                                        9. mul-1-negN/A

                                          \[\leadsto \frac{1}{\tan B} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
                                        10. lift-neg.f6456.6

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

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

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

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

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

                                          \[\leadsto \frac{1 + \frac{-1}{3} \cdot {B}^{2}}{B} \cdot \left(-x\right) \]
                                        4. lower-pow.f6429.2

                                          \[\leadsto \frac{1 + -0.3333333333333333 \cdot {B}^{2}}{B} \cdot \left(-x\right) \]
                                      11. Applied rewrites29.2%

                                        \[\leadsto \color{blue}{\frac{1 + -0.3333333333333333 \cdot {B}^{2}}{B}} \cdot \left(-x\right) \]
                                      12. Add Preprocessing

                                      Alternative 20: 15.7% accurate, 3.5× speedup?

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

                                        1. Initial program 76.9%

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

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

                                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                          2. lower-sin.f6417.1

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

                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                        5. Taylor expanded in B around 0

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

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

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

                                            \[\leadsto \frac{-1}{B \cdot \left(1 + \frac{-1}{6} \cdot {B}^{\color{blue}{2}}\right)} \]
                                          4. lower-pow.f6410.4

                                            \[\leadsto \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot {B}^{2}\right)} \]
                                        7. Applied rewrites10.4%

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

                                        if 6.0000000000000001e59 < x

                                        1. Initial program 76.9%

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

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

                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                        5. Taylor expanded in B around 0

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

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

                                            \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                          3. lower-*.f64N/A

                                            \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                          4. lower-pow.f6410.3

                                            \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B} \]
                                        7. Applied rewrites10.3%

                                          \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                        8. Step-by-step derivation
                                          1. lift-/.f64N/A

                                            \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                          2. lift--.f64N/A

                                            \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                          3. div-subN/A

                                            \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2}}{B} - \frac{1}{\color{blue}{B}} \]
                                          4. frac-subN/A

                                            \[\leadsto \frac{\left(\frac{-1}{6} \cdot {B}^{2}\right) \cdot B - B \cdot 1}{B \cdot \color{blue}{B}} \]
                                          5. unpow2N/A

                                            \[\leadsto \frac{\left(\frac{-1}{6} \cdot {B}^{2}\right) \cdot B - B \cdot 1}{{B}^{2}} \]
                                          6. lift-pow.f64N/A

                                            \[\leadsto \frac{\left(\frac{-1}{6} \cdot {B}^{2}\right) \cdot B - B \cdot 1}{{B}^{2}} \]
                                          7. mult-flipN/A

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

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

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

                                            \[\leadsto \left(\left(\frac{-1}{6} \cdot {B}^{2}\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{{B}^{2}} \]
                                          11. lift-*.f64N/A

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

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

                                            \[\leadsto \left(\left({B}^{2} \cdot \frac{-1}{6}\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{{B}^{2}} \]
                                          14. lift-pow.f64N/A

                                            \[\leadsto \left(\left({B}^{2} \cdot \frac{-1}{6}\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{{B}^{2}} \]
                                          15. unpow2N/A

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

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

                                            \[\leadsto \left(\left(\left(B \cdot B\right) \cdot \frac{-1}{6}\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{{B}^{2}} \]
                                          18. lower-/.f6411.5

                                            \[\leadsto \left(\left(\left(B \cdot B\right) \cdot -0.16666666666666666\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{{B}^{\color{blue}{2}}} \]
                                          19. lift-pow.f64N/A

                                            \[\leadsto \left(\left(\left(B \cdot B\right) \cdot \frac{-1}{6}\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{{B}^{2}} \]
                                          20. unpow2N/A

                                            \[\leadsto \left(\left(\left(B \cdot B\right) \cdot \frac{-1}{6}\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{B \cdot B} \]
                                          21. lower-*.f6411.5

                                            \[\leadsto \left(\left(\left(B \cdot B\right) \cdot -0.16666666666666666\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{B \cdot B} \]
                                        9. Applied rewrites11.5%

                                          \[\leadsto \left(\left(\left(B \cdot B\right) \cdot -0.16666666666666666\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{\color{blue}{B \cdot B}} \]
                                      3. Recombined 2 regimes into one program.
                                      4. Add Preprocessing

                                      Alternative 21: 15.6% accurate, 4.1× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 6 \cdot 10^{+59}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(B \cdot B\right) \cdot -0.16666666666666666\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{B \cdot B}\\ \end{array} \end{array} \]
                                      (FPCore (F B x)
                                       :precision binary64
                                       (if (<= x 6e+59)
                                         (/ -1.0 B)
                                         (* (- (* (* (* B B) -0.16666666666666666) B) (* B 1.0)) (/ 1.0 (* B B)))))
                                      double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (x <= 6e+59) {
                                      		tmp = -1.0 / B;
                                      	} else {
                                      		tmp = ((((B * B) * -0.16666666666666666) * B) - (B * 1.0)) * (1.0 / (B * B));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      module fmin_fmax_functions
                                          implicit none
                                          private
                                          public fmax
                                          public fmin
                                      
                                          interface fmax
                                              module procedure fmax88
                                              module procedure fmax44
                                              module procedure fmax84
                                              module procedure fmax48
                                          end interface
                                          interface fmin
                                              module procedure fmin88
                                              module procedure fmin44
                                              module procedure fmin84
                                              module procedure fmin48
                                          end interface
                                      contains
                                          real(8) function fmax88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmax44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmax84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmax48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmin44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmin48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                          end function
                                      end module
                                      
                                      real(8) function code(f, b, x)
                                      use fmin_fmax_functions
                                          real(8), intent (in) :: f
                                          real(8), intent (in) :: b
                                          real(8), intent (in) :: x
                                          real(8) :: tmp
                                          if (x <= 6d+59) then
                                              tmp = (-1.0d0) / b
                                          else
                                              tmp = ((((b * b) * (-0.16666666666666666d0)) * b) - (b * 1.0d0)) * (1.0d0 / (b * b))
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (x <= 6e+59) {
                                      		tmp = -1.0 / B;
                                      	} else {
                                      		tmp = ((((B * B) * -0.16666666666666666) * B) - (B * 1.0)) * (1.0 / (B * B));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(F, B, x):
                                      	tmp = 0
                                      	if x <= 6e+59:
                                      		tmp = -1.0 / B
                                      	else:
                                      		tmp = ((((B * B) * -0.16666666666666666) * B) - (B * 1.0)) * (1.0 / (B * B))
                                      	return tmp
                                      
                                      function code(F, B, x)
                                      	tmp = 0.0
                                      	if (x <= 6e+59)
                                      		tmp = Float64(-1.0 / B);
                                      	else
                                      		tmp = Float64(Float64(Float64(Float64(Float64(B * B) * -0.16666666666666666) * B) - Float64(B * 1.0)) * Float64(1.0 / Float64(B * B)));
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(F, B, x)
                                      	tmp = 0.0;
                                      	if (x <= 6e+59)
                                      		tmp = -1.0 / B;
                                      	else
                                      		tmp = ((((B * B) * -0.16666666666666666) * B) - (B * 1.0)) * (1.0 / (B * B));
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[F_, B_, x_] := If[LessEqual[x, 6e+59], N[(-1.0 / B), $MachinePrecision], N[(N[(N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * B), $MachinePrecision] - N[(B * 1.0), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;x \leq 6 \cdot 10^{+59}:\\
                                      \;\;\;\;\frac{-1}{B}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\left(\left(\left(B \cdot B\right) \cdot -0.16666666666666666\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{B \cdot B}\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if x < 6.0000000000000001e59

                                        1. Initial program 76.9%

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

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

                                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                          2. lower-sin.f6417.1

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

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

                                            \[\leadsto \frac{-1}{B} \]

                                          if 6.0000000000000001e59 < x

                                          1. Initial program 76.9%

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

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

                                            \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                          5. Taylor expanded in B around 0

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

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

                                              \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                            3. lower-*.f64N/A

                                              \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                            4. lower-pow.f6410.3

                                              \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B} \]
                                          7. Applied rewrites10.3%

                                            \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                          8. Step-by-step derivation
                                            1. lift-/.f64N/A

                                              \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                            2. lift--.f64N/A

                                              \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                            3. div-subN/A

                                              \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2}}{B} - \frac{1}{\color{blue}{B}} \]
                                            4. frac-subN/A

                                              \[\leadsto \frac{\left(\frac{-1}{6} \cdot {B}^{2}\right) \cdot B - B \cdot 1}{B \cdot \color{blue}{B}} \]
                                            5. unpow2N/A

                                              \[\leadsto \frac{\left(\frac{-1}{6} \cdot {B}^{2}\right) \cdot B - B \cdot 1}{{B}^{2}} \]
                                            6. lift-pow.f64N/A

                                              \[\leadsto \frac{\left(\frac{-1}{6} \cdot {B}^{2}\right) \cdot B - B \cdot 1}{{B}^{2}} \]
                                            7. mult-flipN/A

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

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

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

                                              \[\leadsto \left(\left(\frac{-1}{6} \cdot {B}^{2}\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{{B}^{2}} \]
                                            11. lift-*.f64N/A

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

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

                                              \[\leadsto \left(\left({B}^{2} \cdot \frac{-1}{6}\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{{B}^{2}} \]
                                            14. lift-pow.f64N/A

                                              \[\leadsto \left(\left({B}^{2} \cdot \frac{-1}{6}\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{{B}^{2}} \]
                                            15. unpow2N/A

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

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

                                              \[\leadsto \left(\left(\left(B \cdot B\right) \cdot \frac{-1}{6}\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{{B}^{2}} \]
                                            18. lower-/.f6411.5

                                              \[\leadsto \left(\left(\left(B \cdot B\right) \cdot -0.16666666666666666\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{{B}^{\color{blue}{2}}} \]
                                            19. lift-pow.f64N/A

                                              \[\leadsto \left(\left(\left(B \cdot B\right) \cdot \frac{-1}{6}\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{{B}^{2}} \]
                                            20. unpow2N/A

                                              \[\leadsto \left(\left(\left(B \cdot B\right) \cdot \frac{-1}{6}\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{B \cdot B} \]
                                            21. lower-*.f6411.5

                                              \[\leadsto \left(\left(\left(B \cdot B\right) \cdot -0.16666666666666666\right) \cdot B - B \cdot 1\right) \cdot \frac{1}{B \cdot B} \]
                                          9. Applied rewrites11.5%

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

                                        Alternative 22: 15.5% accurate, 4.6× speedup?

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

                                          1. Initial program 76.9%

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

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

                                              \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                            2. lower-sin.f6417.1

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

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

                                              \[\leadsto \frac{-1}{B} \]

                                            if 6.0000000000000001e59 < x

                                            1. Initial program 76.9%

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

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

                                              \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                            5. Taylor expanded in B around 0

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

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

                                                \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                              3. lower-*.f64N/A

                                                \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                              4. lower-pow.f6410.3

                                                \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B} \]
                                            7. Applied rewrites10.3%

                                              \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                            8. Step-by-step derivation
                                              1. lift-/.f64N/A

                                                \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                              2. lift--.f64N/A

                                                \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                              3. sub-flipN/A

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

                                                \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} + -1}{B} \]
                                              5. div-add-revN/A

                                                \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2}}{B} + \frac{-1}{\color{blue}{B}} \]
                                              6. frac-addN/A

                                                \[\leadsto \frac{\left(\frac{-1}{6} \cdot {B}^{2}\right) \cdot B + B \cdot -1}{B \cdot \color{blue}{B}} \]
                                              7. unpow2N/A

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

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

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

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

                                                \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{6} \cdot {B}^{2}, B, B \cdot -1\right)}{{B}^{2}} \]
                                              12. *-commutativeN/A

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

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

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

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

                                                \[\leadsto \frac{\mathsf{fma}\left(\left(B \cdot B\right) \cdot \frac{-1}{6}, B, B \cdot -1\right)}{{B}^{2}} \]
                                              17. lower-*.f6411.4

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

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

                                                \[\leadsto \frac{\mathsf{fma}\left(\left(B \cdot B\right) \cdot \frac{-1}{6}, B, B \cdot -1\right)}{B \cdot B} \]
                                              20. lower-*.f6411.4

                                                \[\leadsto \frac{\mathsf{fma}\left(\left(B \cdot B\right) \cdot -0.16666666666666666, B, B \cdot -1\right)}{B \cdot B} \]
                                            9. Applied rewrites11.4%

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

                                          Alternative 23: 10.6% accurate, 12.4× speedup?

                                          \[\begin{array}{l} \\ \mathsf{fma}\left(-0.16666666666666666, B, \frac{-1}{B}\right) \end{array} \]
                                          (FPCore (F B x) :precision binary64 (fma -0.16666666666666666 B (/ -1.0 B)))
                                          double code(double F, double B, double x) {
                                          	return fma(-0.16666666666666666, B, (-1.0 / B));
                                          }
                                          
                                          function code(F, B, x)
                                          	return fma(-0.16666666666666666, B, Float64(-1.0 / B))
                                          end
                                          
                                          code[F_, B_, x_] := N[(-0.16666666666666666 * B + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \mathsf{fma}\left(-0.16666666666666666, B, \frac{-1}{B}\right)
                                          \end{array}
                                          
                                          Derivation
                                          1. Initial program 76.9%

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

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

                                              \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                            2. lower-sin.f6417.1

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

                                            \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                          5. Taylor expanded in B around 0

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

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

                                              \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                            3. lower-*.f64N/A

                                              \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                            4. lower-pow.f6410.3

                                              \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B} \]
                                          7. Applied rewrites10.3%

                                            \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                          8. Step-by-step derivation
                                            1. lift-/.f64N/A

                                              \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                            2. lift--.f64N/A

                                              \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                            3. sub-flipN/A

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

                                              \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} + \left(\mathsf{neg}\left(1\right)\right)}{B} \]
                                            5. lift-pow.f64N/A

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

                                              \[\leadsto \frac{\frac{-1}{6} \cdot \left(B \cdot B\right) + \left(\mathsf{neg}\left(1\right)\right)}{B} \]
                                            7. associate-*r*N/A

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

                                              \[\leadsto \frac{\left(\frac{-1}{6} \cdot B\right) \cdot B + -1}{B} \]
                                            9. add-to-fraction-revN/A

                                              \[\leadsto \frac{-1}{6} \cdot B + \frac{-1}{\color{blue}{B}} \]
                                            10. frac-2neg-revN/A

                                              \[\leadsto \frac{-1}{6} \cdot B + \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(B\right)} \]
                                            11. metadata-evalN/A

                                              \[\leadsto \frac{-1}{6} \cdot B + \frac{1}{\mathsf{neg}\left(B\right)} \]
                                            12. lower-fma.f64N/A

                                              \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, B, \frac{1}{\mathsf{neg}\left(B\right)}\right) \]
                                            13. metadata-evalN/A

                                              \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, B, \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(B\right)}\right) \]
                                            14. frac-2neg-revN/A

                                              \[\leadsto \mathsf{fma}\left(\frac{-1}{6}, B, \frac{-1}{B}\right) \]
                                            15. lower-/.f6410.5

                                              \[\leadsto \mathsf{fma}\left(-0.16666666666666666, B, \frac{-1}{B}\right) \]
                                          9. Applied rewrites10.5%

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(-0.16666666666666666, B, \frac{-1}{B}\right)} \]
                                          10. Add Preprocessing

                                          Alternative 24: 10.5% accurate, 26.5× speedup?

                                          \[\begin{array}{l} \\ \frac{-1}{B} \end{array} \]
                                          (FPCore (F B x) :precision binary64 (/ -1.0 B))
                                          double code(double F, double B, double x) {
                                          	return -1.0 / B;
                                          }
                                          
                                          module fmin_fmax_functions
                                              implicit none
                                              private
                                              public fmax
                                              public fmin
                                          
                                              interface fmax
                                                  module procedure fmax88
                                                  module procedure fmax44
                                                  module procedure fmax84
                                                  module procedure fmax48
                                              end interface
                                              interface fmin
                                                  module procedure fmin88
                                                  module procedure fmin44
                                                  module procedure fmin84
                                                  module procedure fmin48
                                              end interface
                                          contains
                                              real(8) function fmax88(x, y) result (res)
                                                  real(8), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                              end function
                                              real(4) function fmax44(x, y) result (res)
                                                  real(4), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                              end function
                                              real(8) function fmax84(x, y) result(res)
                                                  real(8), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                              end function
                                              real(8) function fmax48(x, y) result(res)
                                                  real(4), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                              end function
                                              real(8) function fmin88(x, y) result (res)
                                                  real(8), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                              end function
                                              real(4) function fmin44(x, y) result (res)
                                                  real(4), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                              end function
                                              real(8) function fmin84(x, y) result(res)
                                                  real(8), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                              end function
                                              real(8) function fmin48(x, y) result(res)
                                                  real(4), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                              end function
                                          end module
                                          
                                          real(8) function code(f, b, x)
                                          use fmin_fmax_functions
                                              real(8), intent (in) :: f
                                              real(8), intent (in) :: b
                                              real(8), intent (in) :: x
                                              code = (-1.0d0) / b
                                          end function
                                          
                                          public static double code(double F, double B, double x) {
                                          	return -1.0 / B;
                                          }
                                          
                                          def code(F, B, x):
                                          	return -1.0 / B
                                          
                                          function code(F, B, x)
                                          	return Float64(-1.0 / B)
                                          end
                                          
                                          function tmp = code(F, B, x)
                                          	tmp = -1.0 / B;
                                          end
                                          
                                          code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \frac{-1}{B}
                                          \end{array}
                                          
                                          Derivation
                                          1. Initial program 76.9%

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

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

                                              \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                            2. lower-sin.f6417.1

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

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

                                              \[\leadsto \frac{-1}{B} \]
                                            2. Add Preprocessing

                                            Alternative 25: 3.0% accurate, 29.2× speedup?

                                            \[\begin{array}{l} \\ -0.16666666666666666 \cdot B \end{array} \]
                                            (FPCore (F B x) :precision binary64 (* -0.16666666666666666 B))
                                            double code(double F, double B, double x) {
                                            	return -0.16666666666666666 * 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 = (-0.16666666666666666d0) * b
                                            end function
                                            
                                            public static double code(double F, double B, double x) {
                                            	return -0.16666666666666666 * B;
                                            }
                                            
                                            def code(F, B, x):
                                            	return -0.16666666666666666 * B
                                            
                                            function code(F, B, x)
                                            	return Float64(-0.16666666666666666 * B)
                                            end
                                            
                                            function tmp = code(F, B, x)
                                            	tmp = -0.16666666666666666 * B;
                                            end
                                            
                                            code[F_, B_, x_] := N[(-0.16666666666666666 * B), $MachinePrecision]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            -0.16666666666666666 \cdot B
                                            \end{array}
                                            
                                            Derivation
                                            1. Initial program 76.9%

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

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

                                                \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                              2. lower-sin.f6417.1

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

                                              \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                            5. Taylor expanded in B around 0

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

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

                                                \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                              3. lower-*.f64N/A

                                                \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
                                              4. lower-pow.f6410.3

                                                \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B} \]
                                            7. Applied rewrites10.3%

                                              \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{\color{blue}{B}} \]
                                            8. Taylor expanded in B around inf

                                              \[\leadsto \frac{-1}{6} \cdot B \]
                                            9. Step-by-step derivation
                                              1. lower-*.f643.0

                                                \[\leadsto -0.16666666666666666 \cdot B \]
                                            10. Applied rewrites3.0%

                                              \[\leadsto -0.16666666666666666 \cdot B \]
                                            11. Add Preprocessing

                                            Reproduce

                                            ?
                                            herbie shell --seed 2025156 
                                            (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))))))