VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.2% → 99.6%
Time: 6.6s
Alternatives: 22
Speedup: 1.4×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 76.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.6% accurate, 1.0× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(F, \frac{\frac{1}{F}}{\sin B}, \frac{-1}{\frac{\tan B}{x}}\right)\\


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

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2e19 < F < 5e3

      1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

      if 5e3 < F

      1. Initial program 76.2%

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

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

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

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

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

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

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

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

        \[\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. div-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}, \color{blue}{\frac{1}{\frac{\tan B}{-x}}}\right) \]
        3. 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{1}{\frac{\tan B}{\color{blue}{\mathsf{neg}\left(x\right)}}}\right) \]
        4. distribute-frac-neg2N/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{1}{\color{blue}{\mathsf{neg}\left(\frac{\tan B}{x}\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}, \frac{1}{\mathsf{neg}\left(\frac{\color{blue}{\tan B}}{x}\right)}\right) \]
        6. 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{1}{\mathsf{neg}\left(\frac{\color{blue}{\frac{\sin B}{\cos B}}}{x}\right)}\right) \]
        7. 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{1}{\mathsf{neg}\left(\frac{\frac{\color{blue}{\sin B}}{\cos B}}{x}\right)}\right) \]
        8. lift-cos.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{1}{\mathsf{neg}\left(\frac{\frac{\sin B}{\color{blue}{\cos B}}}{x}\right)}\right) \]
        9. 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}, \frac{1}{\mathsf{neg}\left(\color{blue}{\frac{\sin B}{\cos B \cdot x}}\right)}\right) \]
        10. *-commutativeN/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{1}{\mathsf{neg}\left(\frac{\sin B}{\color{blue}{x \cdot \cos B}}\right)}\right) \]
        11. 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}, \frac{1}{\mathsf{neg}\left(\frac{\sin B}{\color{blue}{x \cdot \cos B}}\right)}\right) \]
        12. distribute-neg-frac2N/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{1}{\frac{\sin B}{x \cdot \cos B}}\right)}\right) \]
        13. 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(1\right)}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
        14. metadata-evalN/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}{-1}}{\frac{\sin B}{x \cdot \cos B}}\right) \]
        15. 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{-1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
        16. 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}, \frac{-1}{\frac{\sin B}{\color{blue}{x \cdot \cos B}}}\right) \]
        17. *-commutativeN/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{-1}{\frac{\sin B}{\color{blue}{\cos B \cdot x}}}\right) \]
        18. 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}, \frac{-1}{\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}}\right) \]
        19. 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{-1}{\frac{\frac{\color{blue}{\sin B}}{\cos B}}{x}}\right) \]
        20. lift-cos.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{-1}{\frac{\frac{\sin B}{\color{blue}{\cos B}}}{x}}\right) \]
        21. 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{-1}{\frac{\color{blue}{\tan B}}{x}}\right) \]
        22. 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{-1}{\frac{\color{blue}{\tan B}}{x}}\right) \]
        23. lower-/.f6484.7

          \[\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{-1}{\color{blue}{\frac{\tan B}{x}}}\right) \]
      5. Applied rewrites84.7%

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

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

          \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\color{blue}{F}}}{\sin B}, \frac{-1}{\frac{\tan B}{x}}\right) \]
      8. Applied rewrites52.3%

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

    Alternative 2: 99.6% accurate, 1.0× speedup?

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

      1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -2e8 < F < 8e13

        1. Initial program 76.2%

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

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

          \[\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 8e13 < F

        1. Initial program 76.2%

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

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

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

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

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

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

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

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

          \[\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. div-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}, \color{blue}{\frac{1}{\frac{\tan B}{-x}}}\right) \]
          3. 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{1}{\frac{\tan B}{\color{blue}{\mathsf{neg}\left(x\right)}}}\right) \]
          4. distribute-frac-neg2N/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{1}{\color{blue}{\mathsf{neg}\left(\frac{\tan B}{x}\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}, \frac{1}{\mathsf{neg}\left(\frac{\color{blue}{\tan B}}{x}\right)}\right) \]
          6. 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{1}{\mathsf{neg}\left(\frac{\color{blue}{\frac{\sin B}{\cos B}}}{x}\right)}\right) \]
          7. 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{1}{\mathsf{neg}\left(\frac{\frac{\color{blue}{\sin B}}{\cos B}}{x}\right)}\right) \]
          8. lift-cos.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{1}{\mathsf{neg}\left(\frac{\frac{\sin B}{\color{blue}{\cos B}}}{x}\right)}\right) \]
          9. 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}, \frac{1}{\mathsf{neg}\left(\color{blue}{\frac{\sin B}{\cos B \cdot x}}\right)}\right) \]
          10. *-commutativeN/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{1}{\mathsf{neg}\left(\frac{\sin B}{\color{blue}{x \cdot \cos B}}\right)}\right) \]
          11. 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}, \frac{1}{\mathsf{neg}\left(\frac{\sin B}{\color{blue}{x \cdot \cos B}}\right)}\right) \]
          12. distribute-neg-frac2N/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{1}{\frac{\sin B}{x \cdot \cos B}}\right)}\right) \]
          13. 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(1\right)}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
          14. metadata-evalN/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}{-1}}{\frac{\sin B}{x \cdot \cos B}}\right) \]
          15. 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{-1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
          16. 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}, \frac{-1}{\frac{\sin B}{\color{blue}{x \cdot \cos B}}}\right) \]
          17. *-commutativeN/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{-1}{\frac{\sin B}{\color{blue}{\cos B \cdot x}}}\right) \]
          18. 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}, \frac{-1}{\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}}\right) \]
          19. 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{-1}{\frac{\frac{\color{blue}{\sin B}}{\cos B}}{x}}\right) \]
          20. lift-cos.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{-1}{\frac{\frac{\sin B}{\color{blue}{\cos B}}}{x}}\right) \]
          21. 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{-1}{\frac{\color{blue}{\tan B}}{x}}\right) \]
          22. 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{-1}{\frac{\color{blue}{\tan B}}{x}}\right) \]
          23. lower-/.f6484.7

            \[\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{-1}{\color{blue}{\frac{\tan B}{x}}}\right) \]
        5. Applied rewrites84.7%

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

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

            \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\color{blue}{F}}}{\sin B}, \frac{-1}{\frac{\tan B}{x}}\right) \]
        8. Applied rewrites52.3%

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

      Alternative 3: 99.1% accurate, 1.1× speedup?

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

        1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -1.4199999999999999 < F < 2.60000000000000009

          1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

            if 2.60000000000000009 < F

            1. Initial program 76.2%

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

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

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

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

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

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

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

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

              \[\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. div-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}, \color{blue}{\frac{1}{\frac{\tan B}{-x}}}\right) \]
              3. 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{1}{\frac{\tan B}{\color{blue}{\mathsf{neg}\left(x\right)}}}\right) \]
              4. distribute-frac-neg2N/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{1}{\color{blue}{\mathsf{neg}\left(\frac{\tan B}{x}\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}, \frac{1}{\mathsf{neg}\left(\frac{\color{blue}{\tan B}}{x}\right)}\right) \]
              6. 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{1}{\mathsf{neg}\left(\frac{\color{blue}{\frac{\sin B}{\cos B}}}{x}\right)}\right) \]
              7. 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{1}{\mathsf{neg}\left(\frac{\frac{\color{blue}{\sin B}}{\cos B}}{x}\right)}\right) \]
              8. lift-cos.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{1}{\mathsf{neg}\left(\frac{\frac{\sin B}{\color{blue}{\cos B}}}{x}\right)}\right) \]
              9. 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}, \frac{1}{\mathsf{neg}\left(\color{blue}{\frac{\sin B}{\cos B \cdot x}}\right)}\right) \]
              10. *-commutativeN/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{1}{\mathsf{neg}\left(\frac{\sin B}{\color{blue}{x \cdot \cos B}}\right)}\right) \]
              11. 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}, \frac{1}{\mathsf{neg}\left(\frac{\sin B}{\color{blue}{x \cdot \cos B}}\right)}\right) \]
              12. distribute-neg-frac2N/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{1}{\frac{\sin B}{x \cdot \cos B}}\right)}\right) \]
              13. 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(1\right)}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
              14. metadata-evalN/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}{-1}}{\frac{\sin B}{x \cdot \cos B}}\right) \]
              15. 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{-1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
              16. 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}, \frac{-1}{\frac{\sin B}{\color{blue}{x \cdot \cos B}}}\right) \]
              17. *-commutativeN/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{-1}{\frac{\sin B}{\color{blue}{\cos B \cdot x}}}\right) \]
              18. 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}, \frac{-1}{\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}}\right) \]
              19. 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{-1}{\frac{\frac{\color{blue}{\sin B}}{\cos B}}{x}}\right) \]
              20. lift-cos.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{-1}{\frac{\frac{\sin B}{\color{blue}{\cos B}}}{x}}\right) \]
              21. 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{-1}{\frac{\color{blue}{\tan B}}{x}}\right) \]
              22. 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{-1}{\frac{\color{blue}{\tan B}}{x}}\right) \]
              23. lower-/.f6484.7

                \[\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{-1}{\color{blue}{\frac{\tan B}{x}}}\right) \]
            5. Applied rewrites84.7%

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

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

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\color{blue}{F}}}{\sin B}, \frac{-1}{\frac{\tan B}{x}}\right) \]
            8. Applied rewrites52.3%

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

          Alternative 4: 99.1% accurate, 1.1× speedup?

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

            1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -1.4199999999999999 < F < 2.60000000000000009

              1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 2.60000000000000009 < F

                1. Initial program 76.2%

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

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

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

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

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

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

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

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

                  \[\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. div-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}, \color{blue}{\frac{1}{\frac{\tan B}{-x}}}\right) \]
                  3. 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{1}{\frac{\tan B}{\color{blue}{\mathsf{neg}\left(x\right)}}}\right) \]
                  4. distribute-frac-neg2N/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{1}{\color{blue}{\mathsf{neg}\left(\frac{\tan B}{x}\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}, \frac{1}{\mathsf{neg}\left(\frac{\color{blue}{\tan B}}{x}\right)}\right) \]
                  6. 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{1}{\mathsf{neg}\left(\frac{\color{blue}{\frac{\sin B}{\cos B}}}{x}\right)}\right) \]
                  7. 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{1}{\mathsf{neg}\left(\frac{\frac{\color{blue}{\sin B}}{\cos B}}{x}\right)}\right) \]
                  8. lift-cos.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{1}{\mathsf{neg}\left(\frac{\frac{\sin B}{\color{blue}{\cos B}}}{x}\right)}\right) \]
                  9. 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}, \frac{1}{\mathsf{neg}\left(\color{blue}{\frac{\sin B}{\cos B \cdot x}}\right)}\right) \]
                  10. *-commutativeN/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{1}{\mathsf{neg}\left(\frac{\sin B}{\color{blue}{x \cdot \cos B}}\right)}\right) \]
                  11. 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}, \frac{1}{\mathsf{neg}\left(\frac{\sin B}{\color{blue}{x \cdot \cos B}}\right)}\right) \]
                  12. distribute-neg-frac2N/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{1}{\frac{\sin B}{x \cdot \cos B}}\right)}\right) \]
                  13. 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(1\right)}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                  14. metadata-evalN/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}{-1}}{\frac{\sin B}{x \cdot \cos B}}\right) \]
                  15. 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{-1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                  16. 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}, \frac{-1}{\frac{\sin B}{\color{blue}{x \cdot \cos B}}}\right) \]
                  17. *-commutativeN/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{-1}{\frac{\sin B}{\color{blue}{\cos B \cdot x}}}\right) \]
                  18. 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}, \frac{-1}{\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}}\right) \]
                  19. 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{-1}{\frac{\frac{\color{blue}{\sin B}}{\cos B}}{x}}\right) \]
                  20. lift-cos.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{-1}{\frac{\frac{\sin B}{\color{blue}{\cos B}}}{x}}\right) \]
                  21. 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{-1}{\frac{\color{blue}{\tan B}}{x}}\right) \]
                  22. 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{-1}{\frac{\color{blue}{\tan B}}{x}}\right) \]
                  23. lower-/.f6484.7

                    \[\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{-1}{\color{blue}{\frac{\tan B}{x}}}\right) \]
                5. Applied rewrites84.7%

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

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

                    \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\color{blue}{F}}}{\sin B}, \frac{-1}{\frac{\tan B}{x}}\right) \]
                8. Applied rewrites52.3%

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

              Alternative 5: 92.2% accurate, 1.2× speedup?

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

                1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -0.182 < F < 440

                  1. Initial program 76.2%

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

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

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

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

                  if 440 < F

                  1. Initial program 76.2%

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

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

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

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

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

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

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

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

                    \[\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. div-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}, \color{blue}{\frac{1}{\frac{\tan B}{-x}}}\right) \]
                    3. 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{1}{\frac{\tan B}{\color{blue}{\mathsf{neg}\left(x\right)}}}\right) \]
                    4. distribute-frac-neg2N/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{1}{\color{blue}{\mathsf{neg}\left(\frac{\tan B}{x}\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}, \frac{1}{\mathsf{neg}\left(\frac{\color{blue}{\tan B}}{x}\right)}\right) \]
                    6. 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{1}{\mathsf{neg}\left(\frac{\color{blue}{\frac{\sin B}{\cos B}}}{x}\right)}\right) \]
                    7. 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{1}{\mathsf{neg}\left(\frac{\frac{\color{blue}{\sin B}}{\cos B}}{x}\right)}\right) \]
                    8. lift-cos.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{1}{\mathsf{neg}\left(\frac{\frac{\sin B}{\color{blue}{\cos B}}}{x}\right)}\right) \]
                    9. 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}, \frac{1}{\mathsf{neg}\left(\color{blue}{\frac{\sin B}{\cos B \cdot x}}\right)}\right) \]
                    10. *-commutativeN/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{1}{\mathsf{neg}\left(\frac{\sin B}{\color{blue}{x \cdot \cos B}}\right)}\right) \]
                    11. 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}, \frac{1}{\mathsf{neg}\left(\frac{\sin B}{\color{blue}{x \cdot \cos B}}\right)}\right) \]
                    12. distribute-neg-frac2N/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{1}{\frac{\sin B}{x \cdot \cos B}}\right)}\right) \]
                    13. 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(1\right)}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                    14. metadata-evalN/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}{-1}}{\frac{\sin B}{x \cdot \cos B}}\right) \]
                    15. 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{-1}{\frac{\sin B}{x \cdot \cos B}}}\right) \]
                    16. 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}, \frac{-1}{\frac{\sin B}{\color{blue}{x \cdot \cos B}}}\right) \]
                    17. *-commutativeN/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{-1}{\frac{\sin B}{\color{blue}{\cos B \cdot x}}}\right) \]
                    18. 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}, \frac{-1}{\color{blue}{\frac{\frac{\sin B}{\cos B}}{x}}}\right) \]
                    19. 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{-1}{\frac{\frac{\color{blue}{\sin B}}{\cos B}}{x}}\right) \]
                    20. lift-cos.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{-1}{\frac{\frac{\sin B}{\color{blue}{\cos B}}}{x}}\right) \]
                    21. 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{-1}{\frac{\color{blue}{\tan B}}{x}}\right) \]
                    22. 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{-1}{\frac{\color{blue}{\tan B}}{x}}\right) \]
                    23. lower-/.f6484.7

                      \[\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{-1}{\color{blue}{\frac{\tan B}{x}}}\right) \]
                  5. Applied rewrites84.7%

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

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

                      \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\color{blue}{F}}}{\sin B}, \frac{-1}{\frac{\tan B}{x}}\right) \]
                  8. Applied rewrites52.3%

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

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

                  1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -0.182 < F < 440

                    1. Initial program 76.2%

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

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

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

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

                    if 440 < F

                    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 7: 89.7% accurate, 1.2× speedup?

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

                      1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -1.55e19 < F < -3.2999999999999999e-227 or 5.1000000000000002e-138 < F < 1.08e7

                        1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -3.2999999999999999e-227 < F < 5.1000000000000002e-138

                        1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                          6. lift-*.f64N/A

                            \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                          7. *-commutativeN/A

                            \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(\cos B \cdot x\right)}} \]
                          8. distribute-rgt-neg-inN/A

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

                            \[\leadsto \frac{1}{\frac{\sin B}{\cos B \cdot \left(-x\right)}} \]
                          10. associate-/l/N/A

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

                            \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                          12. lift-cos.f64N/A

                            \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                          13. tan-quotN/A

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

                            \[\leadsto \frac{1}{\frac{\tan B}{-\color{blue}{x}}} \]
                          15. div-flipN/A

                            \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                          16. lift-/.f6455.5

                            \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                        6. Applied rewrites55.5%

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

                        if 1.08e7 < F

                        1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 8: 76.6% 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 -2.9 \cdot 10^{-52}:\\ \;\;\;\;\mathsf{fma}\left(-1, t\_0, t\_1\right)\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{-34}:\\ \;\;\;\;\mathsf{fma}\left({\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, t\_0, -1 \cdot \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 -2.9e-52)
                             (fma -1.0 t_0 t_1)
                             (if (<= x 1.85e-34)
                               (fma (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) F) t_0 (* -1.0 (/ 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 <= -2.9e-52) {
                        		tmp = fma(-1.0, t_0, t_1);
                        	} else if (x <= 1.85e-34) {
                        		tmp = fma((pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * F), t_0, (-1.0 * (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 <= -2.9e-52)
                        		tmp = fma(-1.0, t_0, t_1);
                        	elseif (x <= 1.85e-34)
                        		tmp = fma(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * F), t_0, Float64(-1.0 * 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, -2.9e-52], N[(-1.0 * t$95$0 + t$95$1), $MachinePrecision], If[LessEqual[x, 1.85e-34], N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F), $MachinePrecision] * t$95$0 + N[(-1.0 * N[(x / B), $MachinePrecision]), $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 -2.9 \cdot 10^{-52}:\\
                        \;\;\;\;\mathsf{fma}\left(-1, t\_0, t\_1\right)\\
                        
                        \mathbf{elif}\;x \leq 1.85 \cdot 10^{-34}:\\
                        \;\;\;\;\mathsf{fma}\left({\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, t\_0, -1 \cdot \frac{x}{B}\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if x < -2.9000000000000002e-52

                          1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -2.9000000000000002e-52 < x < 1.84999999999999994e-34

                            1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 1.84999999999999994e-34 < x

                            1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                              6. lift-*.f64N/A

                                \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                              7. *-commutativeN/A

                                \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(\cos B \cdot x\right)}} \]
                              8. distribute-rgt-neg-inN/A

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

                                \[\leadsto \frac{1}{\frac{\sin B}{\cos B \cdot \left(-x\right)}} \]
                              10. associate-/l/N/A

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

                                \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                              12. lift-cos.f64N/A

                                \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                              13. tan-quotN/A

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

                                \[\leadsto \frac{1}{\frac{\tan B}{-\color{blue}{x}}} \]
                              15. div-flipN/A

                                \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                              16. lift-/.f6455.5

                                \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                            6. Applied rewrites55.5%

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

                          Alternative 9: 76.3% accurate, 1.4× speedup?

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

                            1. Initial program 76.2%

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

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

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

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

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

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

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

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

                              \[\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 inf

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(F, \frac{1}{F \cdot B}, \frac{-x}{\tan B}\right) \]
                            8. Step-by-step derivation
                              1. Applied rewrites49.7%

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

                              if -6.3000000000000002e-12 < x < 1.84999999999999994e-34

                              1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 1.84999999999999994e-34 < x

                              1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                                6. lift-*.f64N/A

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                                7. *-commutativeN/A

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(\cos B \cdot x\right)}} \]
                                8. distribute-rgt-neg-inN/A

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

                                  \[\leadsto \frac{1}{\frac{\sin B}{\cos B \cdot \left(-x\right)}} \]
                                10. associate-/l/N/A

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

                                  \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                                12. lift-cos.f64N/A

                                  \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                                13. tan-quotN/A

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

                                  \[\leadsto \frac{1}{\frac{\tan B}{-\color{blue}{x}}} \]
                                15. div-flipN/A

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                                16. lift-/.f6455.5

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                              6. Applied rewrites55.5%

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

                            Alternative 10: 75.3% accurate, 1.4× speedup?

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

                              1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                                6. lift-*.f64N/A

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                                7. *-commutativeN/A

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(\cos B \cdot x\right)}} \]
                                8. distribute-rgt-neg-inN/A

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

                                  \[\leadsto \frac{1}{\frac{\sin B}{\cos B \cdot \left(-x\right)}} \]
                                10. associate-/l/N/A

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

                                  \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                                12. lift-cos.f64N/A

                                  \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                                13. tan-quotN/A

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

                                  \[\leadsto \frac{1}{\frac{\tan B}{-\color{blue}{x}}} \]
                                15. div-flipN/A

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                                16. lift-/.f6455.5

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                              6. Applied rewrites55.5%

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

                              if -2.1e16 < x < 1.84999999999999994e-34

                              1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 11: 61.3% accurate, 2.2× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 1.25 \cdot 10^{-5}:\\ \;\;\;\;\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 1.25e-5)
                               (/ (- (* 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 <= 1.25e-5) {
                            		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 <= 1.25e-5)
                            		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, 1.25e-5], 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 1.25 \cdot 10^{-5}:\\
                            \;\;\;\;\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 < 1.25000000000000006e-5

                              1. Initial program 76.2%

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

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

                              if 1.25000000000000006e-5 < B

                              1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                                6. lift-*.f64N/A

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                                7. *-commutativeN/A

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(\cos B \cdot x\right)}} \]
                                8. distribute-rgt-neg-inN/A

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

                                  \[\leadsto \frac{1}{\frac{\sin B}{\cos B \cdot \left(-x\right)}} \]
                                10. associate-/l/N/A

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

                                  \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                                12. lift-cos.f64N/A

                                  \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                                13. tan-quotN/A

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

                                  \[\leadsto \frac{1}{\frac{\tan B}{-\color{blue}{x}}} \]
                                15. div-flipN/A

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                                16. lift-/.f6455.5

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                              6. Applied rewrites55.5%

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

                            Alternative 12: 61.0% accurate, 2.3× speedup?

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

                              1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                                6. lift-*.f64N/A

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                                7. *-commutativeN/A

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(\cos B \cdot x\right)}} \]
                                8. distribute-rgt-neg-inN/A

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

                                  \[\leadsto \frac{1}{\frac{\sin B}{\cos B \cdot \left(-x\right)}} \]
                                10. associate-/l/N/A

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

                                  \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                                12. lift-cos.f64N/A

                                  \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                                13. tan-quotN/A

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

                                  \[\leadsto \frac{1}{\frac{\tan B}{-\color{blue}{x}}} \]
                                15. div-flipN/A

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                                16. lift-/.f6455.5

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                              6. Applied rewrites55.5%

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

                              if -2.1e16 < x < 3.0000000000000002e-126

                              1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 13: 57.7% accurate, 2.3× speedup?

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

                              1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                                6. lift-*.f64N/A

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                                7. *-commutativeN/A

                                  \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(\cos B \cdot x\right)}} \]
                                8. distribute-rgt-neg-inN/A

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

                                  \[\leadsto \frac{1}{\frac{\sin B}{\cos B \cdot \left(-x\right)}} \]
                                10. associate-/l/N/A

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

                                  \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                                12. lift-cos.f64N/A

                                  \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                                13. tan-quotN/A

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

                                  \[\leadsto \frac{1}{\frac{\tan B}{-\color{blue}{x}}} \]
                                15. div-flipN/A

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                                16. lift-/.f6455.5

                                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                              6. Applied rewrites55.5%

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

                              if -1.4e-8 < x < 3.0000000000000002e-126

                              1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\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{1}{B} \cdot x} \]
                              9. Taylor expanded in B around 0

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

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

                              Alternative 14: 56.8% accurate, 2.4× speedup?

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

                                1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                                  6. lift-*.f64N/A

                                    \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(x \cdot \cos B\right)}} \]
                                  7. *-commutativeN/A

                                    \[\leadsto \frac{1}{\frac{\sin B}{\mathsf{neg}\left(\cos B \cdot x\right)}} \]
                                  8. distribute-rgt-neg-inN/A

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

                                    \[\leadsto \frac{1}{\frac{\sin B}{\cos B \cdot \left(-x\right)}} \]
                                  10. associate-/l/N/A

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

                                    \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                                  12. lift-cos.f64N/A

                                    \[\leadsto \frac{1}{\frac{\frac{\sin B}{\cos B}}{-x}} \]
                                  13. tan-quotN/A

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

                                    \[\leadsto \frac{1}{\frac{\tan B}{-\color{blue}{x}}} \]
                                  15. div-flipN/A

                                    \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                                  16. lift-/.f6455.5

                                    \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                                6. Applied rewrites55.5%

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

                                if -1.6e-13 < x < 4.04999999999999993e-227

                                1. Initial program 76.2%

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

                                  \[\leadsto \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.7

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

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

                              Alternative 15: 46.0% accurate, 2.5× speedup?

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

                                1. Initial program 76.2%

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

                                  \[\leadsto \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.7

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

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

                                if -1.7999999999999999e-13 < F < 0.00145

                                1. Initial program 76.2%

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

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

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

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

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

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

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

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

                                  \[\leadsto -1 \cdot \frac{x}{\sin \color{blue}{B}} \]
                                6. Step-by-step derivation
                                  1. Applied rewrites31.1%

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

                                  if 0.00145 < F

                                  1. Initial program 76.2%

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

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

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

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

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

                                Alternative 16: 44.6% accurate, 2.6× speedup?

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

                                  1. Initial program 76.2%

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

                                    \[\leadsto \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.7

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

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

                                  if -1.70000000000000008e-13 < F < 5.9000000000000002e-28

                                  1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto -1 \cdot \frac{1}{\frac{\sin B}{\cos B \cdot \color{blue}{x}}} \]
                                    6. associate-/r*N/A

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

                                      \[\leadsto -1 \cdot \frac{1}{\frac{\frac{\sin B}{\cos B}}{x}} \]
                                    8. lift-cos.f64N/A

                                      \[\leadsto -1 \cdot \frac{1}{\frac{\frac{\sin B}{\cos B}}{x}} \]
                                    9. tan-quotN/A

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

                                      \[\leadsto -1 \cdot \frac{1}{\frac{\tan B}{x}} \]
                                    11. lower-/.f6455.4

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

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

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

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

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

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

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

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

                                  if 5.9000000000000002e-28 < F

                                  1. Initial program 76.2%

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

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

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

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

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

                                Alternative 17: 36.7% accurate, 2.9× speedup?

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

                                  1. Initial program 76.2%

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

                                    \[\leadsto \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.7

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

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

                                  if -1.70000000000000008e-13 < F

                                  1. Initial program 76.2%

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

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

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

                                      \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                                    3. lower-*.f64N/A

                                      \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin \color{blue}{B}} \]
                                    4. lower-cos.f64N/A

                                      \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin B} \]
                                    5. lower-sin.f6455.4

                                      \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin B} \]
                                  4. Applied rewrites55.4%

                                    \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                                  5. Step-by-step derivation
                                    1. lift-/.f64N/A

                                      \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                                    2. div-flipN/A

                                      \[\leadsto -1 \cdot \frac{1}{\color{blue}{\frac{\sin B}{x \cdot \cos B}}} \]
                                    3. lower-/.f64N/A

                                      \[\leadsto -1 \cdot \frac{1}{\color{blue}{\frac{\sin B}{x \cdot \cos B}}} \]
                                    4. lift-*.f64N/A

                                      \[\leadsto -1 \cdot \frac{1}{\frac{\sin B}{x \cdot \color{blue}{\cos B}}} \]
                                    5. *-commutativeN/A

                                      \[\leadsto -1 \cdot \frac{1}{\frac{\sin B}{\cos B \cdot \color{blue}{x}}} \]
                                    6. associate-/r*N/A

                                      \[\leadsto -1 \cdot \frac{1}{\frac{\frac{\sin B}{\cos B}}{\color{blue}{x}}} \]
                                    7. lift-sin.f64N/A

                                      \[\leadsto -1 \cdot \frac{1}{\frac{\frac{\sin B}{\cos B}}{x}} \]
                                    8. lift-cos.f64N/A

                                      \[\leadsto -1 \cdot \frac{1}{\frac{\frac{\sin B}{\cos B}}{x}} \]
                                    9. tan-quotN/A

                                      \[\leadsto -1 \cdot \frac{1}{\frac{\tan B}{x}} \]
                                    10. lift-tan.f64N/A

                                      \[\leadsto -1 \cdot \frac{1}{\frac{\tan B}{x}} \]
                                    11. lower-/.f6455.4

                                      \[\leadsto -1 \cdot \frac{1}{\frac{\tan B}{\color{blue}{x}}} \]
                                  6. Applied rewrites55.4%

                                    \[\leadsto -1 \cdot \frac{1}{\color{blue}{\frac{\tan B}{x}}} \]
                                  7. Taylor expanded in B around 0

                                    \[\leadsto -1 \cdot \frac{1}{\frac{B \cdot \left(1 + \frac{1}{3} \cdot {B}^{2}\right)}{x}} \]
                                  8. Step-by-step derivation
                                    1. lower-*.f64N/A

                                      \[\leadsto -1 \cdot \frac{1}{\frac{B \cdot \left(1 + \frac{1}{3} \cdot {B}^{2}\right)}{x}} \]
                                    2. lower-+.f64N/A

                                      \[\leadsto -1 \cdot \frac{1}{\frac{B \cdot \left(1 + \frac{1}{3} \cdot {B}^{2}\right)}{x}} \]
                                    3. lower-*.f64N/A

                                      \[\leadsto -1 \cdot \frac{1}{\frac{B \cdot \left(1 + \frac{1}{3} \cdot {B}^{2}\right)}{x}} \]
                                    4. lower-pow.f6428.7

                                      \[\leadsto -1 \cdot \frac{1}{\frac{B \cdot \left(1 + 0.3333333333333333 \cdot {B}^{2}\right)}{x}} \]
                                  9. Applied rewrites28.7%

                                    \[\leadsto -1 \cdot \frac{1}{\frac{B \cdot \left(1 + 0.3333333333333333 \cdot {B}^{2}\right)}{x}} \]
                                3. Recombined 2 regimes into one program.
                                4. Add Preprocessing

                                Alternative 18: 30.6% accurate, 8.9× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := -\frac{x}{B}\\ \mathbf{if}\;x \leq -2.9 \cdot 10^{-25}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 4.9 \cdot 10^{-225}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                (FPCore (F B x)
                                 :precision binary64
                                 (let* ((t_0 (- (/ x B))))
                                   (if (<= x -2.9e-25) t_0 (if (<= x 4.9e-225) (/ -1.0 B) t_0))))
                                double code(double F, double B, double x) {
                                	double t_0 = -(x / B);
                                	double tmp;
                                	if (x <= -2.9e-25) {
                                		tmp = t_0;
                                	} else if (x <= 4.9e-225) {
                                		tmp = -1.0 / B;
                                	} else {
                                		tmp = t_0;
                                	}
                                	return tmp;
                                }
                                
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(f, b, x)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: f
                                    real(8), intent (in) :: b
                                    real(8), intent (in) :: x
                                    real(8) :: t_0
                                    real(8) :: tmp
                                    t_0 = -(x / b)
                                    if (x <= (-2.9d-25)) then
                                        tmp = t_0
                                    else if (x <= 4.9d-225) then
                                        tmp = (-1.0d0) / b
                                    else
                                        tmp = t_0
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double F, double B, double x) {
                                	double t_0 = -(x / B);
                                	double tmp;
                                	if (x <= -2.9e-25) {
                                		tmp = t_0;
                                	} else if (x <= 4.9e-225) {
                                		tmp = -1.0 / B;
                                	} else {
                                		tmp = t_0;
                                	}
                                	return tmp;
                                }
                                
                                def code(F, B, x):
                                	t_0 = -(x / B)
                                	tmp = 0
                                	if x <= -2.9e-25:
                                		tmp = t_0
                                	elif x <= 4.9e-225:
                                		tmp = -1.0 / B
                                	else:
                                		tmp = t_0
                                	return tmp
                                
                                function code(F, B, x)
                                	t_0 = Float64(-Float64(x / B))
                                	tmp = 0.0
                                	if (x <= -2.9e-25)
                                		tmp = t_0;
                                	elseif (x <= 4.9e-225)
                                		tmp = Float64(-1.0 / B);
                                	else
                                		tmp = t_0;
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(F, B, x)
                                	t_0 = -(x / B);
                                	tmp = 0.0;
                                	if (x <= -2.9e-25)
                                		tmp = t_0;
                                	elseif (x <= 4.9e-225)
                                		tmp = -1.0 / B;
                                	else
                                		tmp = t_0;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[F_, B_, x_] := Block[{t$95$0 = (-N[(x / B), $MachinePrecision])}, If[LessEqual[x, -2.9e-25], t$95$0, If[LessEqual[x, 4.9e-225], N[(-1.0 / B), $MachinePrecision], t$95$0]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_0 := -\frac{x}{B}\\
                                \mathbf{if}\;x \leq -2.9 \cdot 10^{-25}:\\
                                \;\;\;\;t\_0\\
                                
                                \mathbf{elif}\;x \leq 4.9 \cdot 10^{-225}:\\
                                \;\;\;\;\frac{-1}{B}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_0\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if x < -2.9000000000000001e-25 or 4.89999999999999971e-225 < x

                                  1. Initial program 76.2%

                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  2. Taylor expanded in F around 0

                                    \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                                  3. Step-by-step derivation
                                    1. lower-*.f64N/A

                                      \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                                    2. lower-/.f64N/A

                                      \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                                    3. lower-*.f64N/A

                                      \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin \color{blue}{B}} \]
                                    4. lower-cos.f64N/A

                                      \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin B} \]
                                    5. lower-sin.f6455.4

                                      \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin B} \]
                                  4. Applied rewrites55.4%

                                    \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                                  5. Taylor expanded in B around 0

                                    \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
                                  6. Step-by-step derivation
                                    1. lower-/.f6428.8

                                      \[\leadsto -1 \cdot \frac{x}{B} \]
                                  7. Applied rewrites28.8%

                                    \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
                                  8. Applied rewrites28.8%

                                    \[\leadsto \color{blue}{-\frac{x}{B}} \]

                                  if -2.9000000000000001e-25 < x < 4.89999999999999971e-225

                                  1. Initial program 76.2%

                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  2. Taylor expanded in F around -inf

                                    \[\leadsto \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.7

                                      \[\leadsto \frac{-1}{\sin B} \]
                                  4. Applied rewrites17.7%

                                    \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                  5. Taylor expanded in B around 0

                                    \[\leadsto \frac{-1}{B} \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites10.8%

                                      \[\leadsto \frac{-1}{B} \]
                                  7. Recombined 2 regimes into one program.
                                  8. Add Preprocessing

                                  Alternative 19: 29.8% accurate, 3.0× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.8 \cdot 10^{-13}:\\ \;\;\;\;\frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{1}{\frac{B \cdot \left(1 + 0.3333333333333333 \cdot {B}^{2}\right)}{x}}\\ \end{array} \end{array} \]
                                  (FPCore (F B x)
                                   :precision binary64
                                   (if (<= F -1.8e-13)
                                     (/ (- (* -0.16666666666666666 (pow B 2.0)) 1.0) B)
                                     (* -1.0 (/ 1.0 (/ (* B (+ 1.0 (* 0.3333333333333333 (pow B 2.0)))) x)))))
                                  double code(double F, double B, double x) {
                                  	double tmp;
                                  	if (F <= -1.8e-13) {
                                  		tmp = ((-0.16666666666666666 * pow(B, 2.0)) - 1.0) / B;
                                  	} else {
                                  		tmp = -1.0 * (1.0 / ((B * (1.0 + (0.3333333333333333 * pow(B, 2.0)))) / x));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  module fmin_fmax_functions
                                      implicit none
                                      private
                                      public fmax
                                      public fmin
                                  
                                      interface fmax
                                          module procedure fmax88
                                          module procedure fmax44
                                          module procedure fmax84
                                          module procedure fmax48
                                      end interface
                                      interface fmin
                                          module procedure fmin88
                                          module procedure fmin44
                                          module procedure fmin84
                                          module procedure fmin48
                                      end interface
                                  contains
                                      real(8) function fmax88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmax44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmax84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmax48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmin44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmin48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                      end function
                                  end module
                                  
                                  real(8) function code(f, b, x)
                                  use fmin_fmax_functions
                                      real(8), intent (in) :: f
                                      real(8), intent (in) :: b
                                      real(8), intent (in) :: x
                                      real(8) :: tmp
                                      if (f <= (-1.8d-13)) then
                                          tmp = (((-0.16666666666666666d0) * (b ** 2.0d0)) - 1.0d0) / b
                                      else
                                          tmp = (-1.0d0) * (1.0d0 / ((b * (1.0d0 + (0.3333333333333333d0 * (b ** 2.0d0)))) / x))
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double F, double B, double x) {
                                  	double tmp;
                                  	if (F <= -1.8e-13) {
                                  		tmp = ((-0.16666666666666666 * Math.pow(B, 2.0)) - 1.0) / B;
                                  	} else {
                                  		tmp = -1.0 * (1.0 / ((B * (1.0 + (0.3333333333333333 * Math.pow(B, 2.0)))) / x));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(F, B, x):
                                  	tmp = 0
                                  	if F <= -1.8e-13:
                                  		tmp = ((-0.16666666666666666 * math.pow(B, 2.0)) - 1.0) / B
                                  	else:
                                  		tmp = -1.0 * (1.0 / ((B * (1.0 + (0.3333333333333333 * math.pow(B, 2.0)))) / x))
                                  	return tmp
                                  
                                  function code(F, B, x)
                                  	tmp = 0.0
                                  	if (F <= -1.8e-13)
                                  		tmp = Float64(Float64(Float64(-0.16666666666666666 * (B ^ 2.0)) - 1.0) / B);
                                  	else
                                  		tmp = Float64(-1.0 * Float64(1.0 / Float64(Float64(B * Float64(1.0 + Float64(0.3333333333333333 * (B ^ 2.0)))) / x)));
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(F, B, x)
                                  	tmp = 0.0;
                                  	if (F <= -1.8e-13)
                                  		tmp = ((-0.16666666666666666 * (B ^ 2.0)) - 1.0) / B;
                                  	else
                                  		tmp = -1.0 * (1.0 / ((B * (1.0 + (0.3333333333333333 * (B ^ 2.0)))) / x));
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[F_, B_, x_] := If[LessEqual[F, -1.8e-13], N[(N[(N[(-0.16666666666666666 * N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision], N[(-1.0 * N[(1.0 / N[(N[(B * N[(1.0 + N[(0.3333333333333333 * N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;F \leq -1.8 \cdot 10^{-13}:\\
                                  \;\;\;\;\frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;-1 \cdot \frac{1}{\frac{B \cdot \left(1 + 0.3333333333333333 \cdot {B}^{2}\right)}{x}}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if F < -1.7999999999999999e-13

                                    1. Initial program 76.2%

                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    2. Taylor expanded in F around -inf

                                      \[\leadsto \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.7

                                        \[\leadsto \frac{-1}{\sin B} \]
                                    4. Applied rewrites17.7%

                                      \[\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.6

                                        \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B} \]
                                    7. Applied rewrites10.6%

                                      \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{\color{blue}{B}} \]

                                    if -1.7999999999999999e-13 < F

                                    1. Initial program 76.2%

                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    2. Taylor expanded in F around 0

                                      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                                    3. Step-by-step derivation
                                      1. lower-*.f64N/A

                                        \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                                      2. lower-/.f64N/A

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin \color{blue}{B}} \]
                                      4. lower-cos.f64N/A

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin B} \]
                                      5. lower-sin.f6455.4

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin B} \]
                                    4. Applied rewrites55.4%

                                      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                                    5. Step-by-step derivation
                                      1. lift-/.f64N/A

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                                      2. div-flipN/A

                                        \[\leadsto -1 \cdot \frac{1}{\color{blue}{\frac{\sin B}{x \cdot \cos B}}} \]
                                      3. lower-/.f64N/A

                                        \[\leadsto -1 \cdot \frac{1}{\color{blue}{\frac{\sin B}{x \cdot \cos B}}} \]
                                      4. lift-*.f64N/A

                                        \[\leadsto -1 \cdot \frac{1}{\frac{\sin B}{x \cdot \color{blue}{\cos B}}} \]
                                      5. *-commutativeN/A

                                        \[\leadsto -1 \cdot \frac{1}{\frac{\sin B}{\cos B \cdot \color{blue}{x}}} \]
                                      6. associate-/r*N/A

                                        \[\leadsto -1 \cdot \frac{1}{\frac{\frac{\sin B}{\cos B}}{\color{blue}{x}}} \]
                                      7. lift-sin.f64N/A

                                        \[\leadsto -1 \cdot \frac{1}{\frac{\frac{\sin B}{\cos B}}{x}} \]
                                      8. lift-cos.f64N/A

                                        \[\leadsto -1 \cdot \frac{1}{\frac{\frac{\sin B}{\cos B}}{x}} \]
                                      9. tan-quotN/A

                                        \[\leadsto -1 \cdot \frac{1}{\frac{\tan B}{x}} \]
                                      10. lift-tan.f64N/A

                                        \[\leadsto -1 \cdot \frac{1}{\frac{\tan B}{x}} \]
                                      11. lower-/.f6455.4

                                        \[\leadsto -1 \cdot \frac{1}{\frac{\tan B}{\color{blue}{x}}} \]
                                    6. Applied rewrites55.4%

                                      \[\leadsto -1 \cdot \frac{1}{\color{blue}{\frac{\tan B}{x}}} \]
                                    7. Taylor expanded in B around 0

                                      \[\leadsto -1 \cdot \frac{1}{\frac{B \cdot \left(1 + \frac{1}{3} \cdot {B}^{2}\right)}{x}} \]
                                    8. Step-by-step derivation
                                      1. lower-*.f64N/A

                                        \[\leadsto -1 \cdot \frac{1}{\frac{B \cdot \left(1 + \frac{1}{3} \cdot {B}^{2}\right)}{x}} \]
                                      2. lower-+.f64N/A

                                        \[\leadsto -1 \cdot \frac{1}{\frac{B \cdot \left(1 + \frac{1}{3} \cdot {B}^{2}\right)}{x}} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto -1 \cdot \frac{1}{\frac{B \cdot \left(1 + \frac{1}{3} \cdot {B}^{2}\right)}{x}} \]
                                      4. lower-pow.f6428.7

                                        \[\leadsto -1 \cdot \frac{1}{\frac{B \cdot \left(1 + 0.3333333333333333 \cdot {B}^{2}\right)}{x}} \]
                                    9. Applied rewrites28.7%

                                      \[\leadsto -1 \cdot \frac{1}{\frac{B \cdot \left(1 + 0.3333333333333333 \cdot {B}^{2}\right)}{x}} \]
                                  3. Recombined 2 regimes into one program.
                                  4. Add Preprocessing

                                  Alternative 20: 29.7% accurate, 3.2× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.8 \cdot 10^{-13}:\\ \;\;\;\;\frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{x + -0.3333333333333333 \cdot \left({B}^{2} \cdot x\right)}{B}\\ \end{array} \end{array} \]
                                  (FPCore (F B x)
                                   :precision binary64
                                   (if (<= F -1.8e-13)
                                     (/ (- (* -0.16666666666666666 (pow B 2.0)) 1.0) B)
                                     (* -1.0 (/ (+ x (* -0.3333333333333333 (* (pow B 2.0) x))) B))))
                                  double code(double F, double B, double x) {
                                  	double tmp;
                                  	if (F <= -1.8e-13) {
                                  		tmp = ((-0.16666666666666666 * pow(B, 2.0)) - 1.0) / B;
                                  	} else {
                                  		tmp = -1.0 * ((x + (-0.3333333333333333 * (pow(B, 2.0) * x))) / B);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  module fmin_fmax_functions
                                      implicit none
                                      private
                                      public fmax
                                      public fmin
                                  
                                      interface fmax
                                          module procedure fmax88
                                          module procedure fmax44
                                          module procedure fmax84
                                          module procedure fmax48
                                      end interface
                                      interface fmin
                                          module procedure fmin88
                                          module procedure fmin44
                                          module procedure fmin84
                                          module procedure fmin48
                                      end interface
                                  contains
                                      real(8) function fmax88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmax44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmax84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmax48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmin44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmin48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                      end function
                                  end module
                                  
                                  real(8) function code(f, b, x)
                                  use fmin_fmax_functions
                                      real(8), intent (in) :: f
                                      real(8), intent (in) :: b
                                      real(8), intent (in) :: x
                                      real(8) :: tmp
                                      if (f <= (-1.8d-13)) then
                                          tmp = (((-0.16666666666666666d0) * (b ** 2.0d0)) - 1.0d0) / b
                                      else
                                          tmp = (-1.0d0) * ((x + ((-0.3333333333333333d0) * ((b ** 2.0d0) * x))) / b)
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double F, double B, double x) {
                                  	double tmp;
                                  	if (F <= -1.8e-13) {
                                  		tmp = ((-0.16666666666666666 * Math.pow(B, 2.0)) - 1.0) / B;
                                  	} else {
                                  		tmp = -1.0 * ((x + (-0.3333333333333333 * (Math.pow(B, 2.0) * x))) / B);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(F, B, x):
                                  	tmp = 0
                                  	if F <= -1.8e-13:
                                  		tmp = ((-0.16666666666666666 * math.pow(B, 2.0)) - 1.0) / B
                                  	else:
                                  		tmp = -1.0 * ((x + (-0.3333333333333333 * (math.pow(B, 2.0) * x))) / B)
                                  	return tmp
                                  
                                  function code(F, B, x)
                                  	tmp = 0.0
                                  	if (F <= -1.8e-13)
                                  		tmp = Float64(Float64(Float64(-0.16666666666666666 * (B ^ 2.0)) - 1.0) / B);
                                  	else
                                  		tmp = Float64(-1.0 * Float64(Float64(x + Float64(-0.3333333333333333 * Float64((B ^ 2.0) * x))) / B));
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(F, B, x)
                                  	tmp = 0.0;
                                  	if (F <= -1.8e-13)
                                  		tmp = ((-0.16666666666666666 * (B ^ 2.0)) - 1.0) / B;
                                  	else
                                  		tmp = -1.0 * ((x + (-0.3333333333333333 * ((B ^ 2.0) * x))) / B);
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[F_, B_, x_] := If[LessEqual[F, -1.8e-13], N[(N[(N[(-0.16666666666666666 * N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision], N[(-1.0 * N[(N[(x + N[(-0.3333333333333333 * N[(N[Power[B, 2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;F \leq -1.8 \cdot 10^{-13}:\\
                                  \;\;\;\;\frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;-1 \cdot \frac{x + -0.3333333333333333 \cdot \left({B}^{2} \cdot x\right)}{B}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if F < -1.7999999999999999e-13

                                    1. Initial program 76.2%

                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    2. Taylor expanded in F around -inf

                                      \[\leadsto \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.7

                                        \[\leadsto \frac{-1}{\sin B} \]
                                    4. Applied rewrites17.7%

                                      \[\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.6

                                        \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B} \]
                                    7. Applied rewrites10.6%

                                      \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{\color{blue}{B}} \]

                                    if -1.7999999999999999e-13 < F

                                    1. Initial program 76.2%

                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    2. Taylor expanded in F around 0

                                      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                                    3. Step-by-step derivation
                                      1. lower-*.f64N/A

                                        \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                                      2. lower-/.f64N/A

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin \color{blue}{B}} \]
                                      4. lower-cos.f64N/A

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin B} \]
                                      5. lower-sin.f6455.4

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin B} \]
                                    4. Applied rewrites55.4%

                                      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                                    5. Step-by-step derivation
                                      1. lift-/.f64N/A

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                                      2. lift-*.f64N/A

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin \color{blue}{B}} \]
                                      3. associate-/l*N/A

                                        \[\leadsto -1 \cdot \left(x \cdot \color{blue}{\frac{\cos B}{\sin B}}\right) \]
                                      4. div-flip-revN/A

                                        \[\leadsto -1 \cdot \left(x \cdot \frac{1}{\color{blue}{\frac{\sin B}{\cos B}}}\right) \]
                                      5. lift-sin.f64N/A

                                        \[\leadsto -1 \cdot \left(x \cdot \frac{1}{\frac{\sin B}{\cos \color{blue}{B}}}\right) \]
                                      6. lift-cos.f64N/A

                                        \[\leadsto -1 \cdot \left(x \cdot \frac{1}{\frac{\sin B}{\cos B}}\right) \]
                                      7. tan-quotN/A

                                        \[\leadsto -1 \cdot \left(x \cdot \frac{1}{\tan B}\right) \]
                                      8. lift-tan.f64N/A

                                        \[\leadsto -1 \cdot \left(x \cdot \frac{1}{\tan B}\right) \]
                                      9. lift-/.f64N/A

                                        \[\leadsto -1 \cdot \left(x \cdot \frac{1}{\color{blue}{\tan B}}\right) \]
                                      10. *-commutativeN/A

                                        \[\leadsto -1 \cdot \left(\frac{1}{\tan B} \cdot \color{blue}{x}\right) \]
                                      11. lower-*.f6455.3

                                        \[\leadsto -1 \cdot \left(\frac{1}{\tan B} \cdot \color{blue}{x}\right) \]
                                    6. Applied rewrites55.3%

                                      \[\leadsto -1 \cdot \left(\frac{1}{\tan B} \cdot \color{blue}{x}\right) \]
                                    7. Taylor expanded in B around 0

                                      \[\leadsto -1 \cdot \frac{x + \frac{-1}{3} \cdot \left({B}^{2} \cdot x\right)}{\color{blue}{B}} \]
                                    8. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto -1 \cdot \frac{x + \frac{-1}{3} \cdot \left({B}^{2} \cdot x\right)}{B} \]
                                      2. lower-+.f64N/A

                                        \[\leadsto -1 \cdot \frac{x + \frac{-1}{3} \cdot \left({B}^{2} \cdot x\right)}{B} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto -1 \cdot \frac{x + \frac{-1}{3} \cdot \left({B}^{2} \cdot x\right)}{B} \]
                                      4. lower-*.f64N/A

                                        \[\leadsto -1 \cdot \frac{x + \frac{-1}{3} \cdot \left({B}^{2} \cdot x\right)}{B} \]
                                      5. lower-pow.f6428.7

                                        \[\leadsto -1 \cdot \frac{x + -0.3333333333333333 \cdot \left({B}^{2} \cdot x\right)}{B} \]
                                    9. Applied rewrites28.7%

                                      \[\leadsto -1 \cdot \frac{x + -0.3333333333333333 \cdot \left({B}^{2} \cdot x\right)}{\color{blue}{B}} \]
                                  3. Recombined 2 regimes into one program.
                                  4. Add Preprocessing

                                  Alternative 21: 29.7% accurate, 3.9× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.8 \cdot 10^{-13}:\\ \;\;\;\;\frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{B}\\ \end{array} \end{array} \]
                                  (FPCore (F B x)
                                   :precision binary64
                                   (if (<= F -1.8e-13)
                                     (/ (- (* -0.16666666666666666 (pow B 2.0)) 1.0) B)
                                     (- (/ x B))))
                                  double code(double F, double B, double x) {
                                  	double tmp;
                                  	if (F <= -1.8e-13) {
                                  		tmp = ((-0.16666666666666666 * pow(B, 2.0)) - 1.0) / B;
                                  	} else {
                                  		tmp = -(x / B);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  module fmin_fmax_functions
                                      implicit none
                                      private
                                      public fmax
                                      public fmin
                                  
                                      interface fmax
                                          module procedure fmax88
                                          module procedure fmax44
                                          module procedure fmax84
                                          module procedure fmax48
                                      end interface
                                      interface fmin
                                          module procedure fmin88
                                          module procedure fmin44
                                          module procedure fmin84
                                          module procedure fmin48
                                      end interface
                                  contains
                                      real(8) function fmax88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmax44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmax84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmax48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmin44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmin48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                      end function
                                  end module
                                  
                                  real(8) function code(f, b, x)
                                  use fmin_fmax_functions
                                      real(8), intent (in) :: f
                                      real(8), intent (in) :: b
                                      real(8), intent (in) :: x
                                      real(8) :: tmp
                                      if (f <= (-1.8d-13)) then
                                          tmp = (((-0.16666666666666666d0) * (b ** 2.0d0)) - 1.0d0) / b
                                      else
                                          tmp = -(x / b)
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double F, double B, double x) {
                                  	double tmp;
                                  	if (F <= -1.8e-13) {
                                  		tmp = ((-0.16666666666666666 * Math.pow(B, 2.0)) - 1.0) / B;
                                  	} else {
                                  		tmp = -(x / B);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(F, B, x):
                                  	tmp = 0
                                  	if F <= -1.8e-13:
                                  		tmp = ((-0.16666666666666666 * math.pow(B, 2.0)) - 1.0) / B
                                  	else:
                                  		tmp = -(x / B)
                                  	return tmp
                                  
                                  function code(F, B, x)
                                  	tmp = 0.0
                                  	if (F <= -1.8e-13)
                                  		tmp = Float64(Float64(Float64(-0.16666666666666666 * (B ^ 2.0)) - 1.0) / B);
                                  	else
                                  		tmp = Float64(-Float64(x / B));
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(F, B, x)
                                  	tmp = 0.0;
                                  	if (F <= -1.8e-13)
                                  		tmp = ((-0.16666666666666666 * (B ^ 2.0)) - 1.0) / B;
                                  	else
                                  		tmp = -(x / B);
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[F_, B_, x_] := If[LessEqual[F, -1.8e-13], N[(N[(N[(-0.16666666666666666 * N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / B), $MachinePrecision], (-N[(x / B), $MachinePrecision])]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;F \leq -1.8 \cdot 10^{-13}:\\
                                  \;\;\;\;\frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;-\frac{x}{B}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if F < -1.7999999999999999e-13

                                    1. Initial program 76.2%

                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    2. Taylor expanded in F around -inf

                                      \[\leadsto \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.7

                                        \[\leadsto \frac{-1}{\sin B} \]
                                    4. Applied rewrites17.7%

                                      \[\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.6

                                        \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B} \]
                                    7. Applied rewrites10.6%

                                      \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{\color{blue}{B}} \]

                                    if -1.7999999999999999e-13 < F

                                    1. Initial program 76.2%

                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    2. Taylor expanded in F around 0

                                      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                                    3. Step-by-step derivation
                                      1. lower-*.f64N/A

                                        \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot \cos B}{\sin B}} \]
                                      2. lower-/.f64N/A

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\color{blue}{\sin B}} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin \color{blue}{B}} \]
                                      4. lower-cos.f64N/A

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin B} \]
                                      5. lower-sin.f6455.4

                                        \[\leadsto -1 \cdot \frac{x \cdot \cos B}{\sin B} \]
                                    4. Applied rewrites55.4%

                                      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                                    5. Taylor expanded in B around 0

                                      \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
                                    6. Step-by-step derivation
                                      1. lower-/.f6428.8

                                        \[\leadsto -1 \cdot \frac{x}{B} \]
                                    7. Applied rewrites28.8%

                                      \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
                                    8. Applied rewrites28.8%

                                      \[\leadsto \color{blue}{-\frac{x}{B}} \]
                                  3. Recombined 2 regimes into one program.
                                  4. Add Preprocessing

                                  Alternative 22: 10.8% accurate, 26.5× speedup?

                                  \[\begin{array}{l} \\ \frac{-1}{B} \end{array} \]
                                  (FPCore (F B x) :precision binary64 (/ -1.0 B))
                                  double code(double F, double B, double x) {
                                  	return -1.0 / B;
                                  }
                                  
                                  module fmin_fmax_functions
                                      implicit none
                                      private
                                      public fmax
                                      public fmin
                                  
                                      interface fmax
                                          module procedure fmax88
                                          module procedure fmax44
                                          module procedure fmax84
                                          module procedure fmax48
                                      end interface
                                      interface fmin
                                          module procedure fmin88
                                          module procedure fmin44
                                          module procedure fmin84
                                          module procedure fmin48
                                      end interface
                                  contains
                                      real(8) function fmax88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmax44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmax84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmax48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmin44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmin48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                      end function
                                  end module
                                  
                                  real(8) function code(f, b, x)
                                  use fmin_fmax_functions
                                      real(8), intent (in) :: f
                                      real(8), intent (in) :: b
                                      real(8), intent (in) :: x
                                      code = (-1.0d0) / b
                                  end function
                                  
                                  public static double code(double F, double B, double x) {
                                  	return -1.0 / B;
                                  }
                                  
                                  def code(F, B, x):
                                  	return -1.0 / B
                                  
                                  function code(F, B, x)
                                  	return Float64(-1.0 / B)
                                  end
                                  
                                  function tmp = code(F, B, x)
                                  	tmp = -1.0 / B;
                                  end
                                  
                                  code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \frac{-1}{B}
                                  \end{array}
                                  
                                  Derivation
                                  1. Initial program 76.2%

                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  2. Taylor expanded in F around -inf

                                    \[\leadsto \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.7

                                      \[\leadsto \frac{-1}{\sin B} \]
                                  4. Applied rewrites17.7%

                                    \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                  5. Taylor expanded in B around 0

                                    \[\leadsto \frac{-1}{B} \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites10.8%

                                      \[\leadsto \frac{-1}{B} \]
                                    2. Add Preprocessing

                                    Reproduce

                                    ?
                                    herbie shell --seed 2025142 
                                    (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))))))