VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.9% → 99.3%
Time: 7.1s
Alternatives: 22
Speedup: 1.5×

Specification

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 76.9% accurate, 1.0× speedup?

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

Alternative 1: 99.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
      11. lower-sin.f6449.8%

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
    6. Applied rewrites49.9%

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

    if -2.6999999999999999e155 < F < 8.9999999999999998e-4

    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(F, \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}\right) \]
      2. mult-flipN/A

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

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

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

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

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

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

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

    if 8.9999999999999998e-4 < F

    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
        12. lower-/.f6455.2%

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

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

    Alternative 2: 99.3% accurate, 1.2× speedup?

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

      1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
        11. lower-sin.f6449.8%

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
      6. Applied rewrites49.9%

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

      if -2.6999999999999999e155 < F < 8.9999999999999998e-4

      1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(F, \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}\right) \]
        2. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

      if 8.9999999999999998e-4 < F

      1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
          12. lower-/.f6455.2%

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

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

      Alternative 3: 92.6% accurate, 1.2× speedup?

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

        1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
          11. lower-sin.f6449.8%

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
        6. Applied rewrites49.9%

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

        if -44000 < F < -2.7e-46

        1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(F, \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}\right) \]
          2. mult-flipN/A

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(F, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \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(F, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot \frac{1}{\sin B}, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
          2. lower-/.f6457.6%

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

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

        if -2.7e-46 < F < 3.9000000000000001e-79

        1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 3.9000000000000001e-79 < F < 8.9999999999999998e-4

        1. Initial program 76.9%

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

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

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

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

        if 8.9999999999999998e-4 < F

        1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
            12. lower-/.f6455.2%

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

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

        Alternative 4: 86.1% accurate, 1.2× speedup?

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

          1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
            11. lower-sin.f6449.8%

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

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

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

              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
            2. lower-*.f6433.7%

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

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

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

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

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

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

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

              \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
          9. Applied rewrites33.7%

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

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

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

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

              \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
            5. lower-/.f6433.8%

              \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
          11. Applied rewrites33.8%

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

          if -44000 < F < -2.7e-46

          1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(F, \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}\right) \]
            2. mult-flipN/A

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(F, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \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(F, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot \frac{1}{\sin B}, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
            2. lower-/.f6457.6%

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

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

          if -2.7e-46 < F < 3.9000000000000001e-79

          1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 3.9000000000000001e-79 < F < 8.9999999999999998e-4

          1. Initial program 76.9%

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

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

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

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

          if 8.9999999999999998e-4 < F

          1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
              12. lower-/.f6455.2%

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

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

          Alternative 5: 85.0% accurate, 1.3× speedup?

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

            1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
              11. lower-sin.f6449.8%

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

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

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

                \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
              2. lower-*.f6433.7%

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

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

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

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

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

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

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

                \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
            9. Applied rewrites33.7%

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

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

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

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

                \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
              5. lower-/.f6433.8%

                \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
            11. Applied rewrites33.8%

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

            if -44000 < F < -2.7e-46

            1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(F, \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}\right) \]
              2. mult-flipN/A

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(F, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \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(F, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot \frac{1}{\sin B}, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
              2. lower-/.f6457.6%

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

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

            if -2.7e-46 < F < 6.8000000000000002e-78

            1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 6.8000000000000002e-78 < F < 8.9999999999999998e-4

            1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 8.9999999999999998e-4 < F

            1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{\tan B}} \]
                12. lower-/.f6455.2%

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

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

            Alternative 6: 79.6% accurate, 1.3× speedup?

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

              1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                11. lower-sin.f6449.8%

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

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

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

                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
                2. lower-*.f6433.7%

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

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

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

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

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

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

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

                  \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
              9. Applied rewrites33.7%

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

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

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

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

                  \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
                5. lower-/.f6433.8%

                  \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
              11. Applied rewrites33.8%

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

              if -44000 < F < -2.7e-46

              1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(F, \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}\right) \]
                2. mult-flipN/A

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(F, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \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(F, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot \frac{1}{\sin B}, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
                2. lower-/.f6457.6%

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

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

              if -2.7e-46 < F < 6.8000000000000002e-78

              1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 6.8000000000000002e-78 < F < 8.9999999999999998e-4

              1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 8.9999999999999998e-4 < F

              1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 7: 78.6% accurate, 1.3× speedup?

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

                1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                  11. lower-sin.f6449.8%

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

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

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

                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
                  2. lower-*.f6433.7%

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

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

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

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

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

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

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

                    \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
                9. Applied rewrites33.7%

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

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

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

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

                    \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
                  5. lower-/.f6433.8%

                    \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
                11. Applied rewrites33.8%

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

                if -44000 < F < -2.7e-46

                1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                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.6%

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

                  \[\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 -2.7e-46 < F < 6.8000000000000002e-78

                1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 6.8000000000000002e-78 < F < 8.9999999999999998e-4

                1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 8.9999999999999998e-4 < F

                1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 8: 78.6% accurate, 1.3× speedup?

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

                  1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                    11. lower-sin.f6449.8%

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

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

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

                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
                    2. lower-*.f6433.7%

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

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

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

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

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

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

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

                      \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
                  9. Applied rewrites33.7%

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

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

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

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

                      \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
                    5. lower-/.f6433.8%

                      \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
                  11. Applied rewrites33.8%

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

                  if -44000 < F < -1.7199999999999999e-46

                  1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                  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.6%

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

                    \[\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 -1.7199999999999999e-46 < F < 6.8000000000000002e-78

                  1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 6.8000000000000002e-78 < F < 8.9999999999999998e-4

                    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 8.9999999999999998e-4 < F

                    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 9: 78.6% accurate, 1.3× speedup?

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

                      1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                        11. lower-sin.f6449.8%

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

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

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

                          \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
                        2. lower-*.f6433.7%

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

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

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

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

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

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

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

                          \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
                      9. Applied rewrites33.7%

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

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

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

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

                          \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
                        5. lower-/.f6433.8%

                          \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
                      11. Applied rewrites33.8%

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

                      if -44000 < F < -1.7199999999999999e-46 or 3.9000000000000001e-79 < F < 8.9999999999999998e-4

                      1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                      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.6%

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

                        \[\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 -1.7199999999999999e-46 < F < 3.9000000000000001e-79

                      1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 8.9999999999999998e-4 < F

                        1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 10: 78.5% accurate, 1.5× speedup?

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

                          1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                            11. lower-sin.f6449.8%

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

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

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

                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
                            2. lower-*.f6433.7%

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

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

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

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

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

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

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

                              \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
                          9. Applied rewrites33.7%

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

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

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

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

                              \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
                            5. lower-/.f6433.8%

                              \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
                          11. Applied rewrites33.8%

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

                          if -5.8e8 < F < 0.0076

                          1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 0.0076 < F

                            1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 11: 64.6% accurate, 2.0× speedup?

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

                              1. Initial program 76.9%

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

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

                                  \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                2. lower-*.f64N/A

                                  \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                3. lower-+.f64N/A

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                4. lower-/.f64N/A

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                5. lower-*.f64N/A

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                6. lower-sin.f64N/A

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                7. lower-/.f64N/A

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                8. lower-*.f64N/A

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                9. lower-cos.f64N/A

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                10. lower-*.f64N/A

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                11. lower-sin.f6449.8%

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                              4. Applied rewrites49.8%

                                \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                              5. Taylor expanded in B around 0

                                \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{\color{blue}{B \cdot F}}\right)\right) \]
                              6. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
                                2. lower-*.f6433.7%

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right) \]
                              7. Applied rewrites33.7%

                                \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{\color{blue}{B \cdot F}}\right)\right) \]
                              8. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto \mathsf{neg}\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right) \]
                                3. lift-*.f64N/A

                                  \[\leadsto \mathsf{neg}\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right) \]
                                4. *-commutativeN/A

                                  \[\leadsto \mathsf{neg}\left(\left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot F\right) \]
                                5. distribute-rgt-neg-inN/A

                                  \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
                                6. lower-*.f64N/A

                                  \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
                              9. Applied rewrites33.7%

                                \[\leadsto \left(\frac{x}{B \cdot F} + \frac{1}{\sin B \cdot F}\right) \cdot \color{blue}{\left(-F\right)} \]
                              10. Step-by-step derivation
                                1. lift-/.f64N/A

                                  \[\leadsto \left(\frac{x}{B \cdot F} + \frac{1}{\sin B \cdot F}\right) \cdot \left(-F\right) \]
                                2. lift-*.f64N/A

                                  \[\leadsto \left(\frac{x}{B \cdot F} + \frac{1}{\sin B \cdot F}\right) \cdot \left(-F\right) \]
                                3. associate-/r*N/A

                                  \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
                                4. lift-/.f64N/A

                                  \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
                                5. lower-/.f6433.8%

                                  \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]
                              11. Applied rewrites33.8%

                                \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{\sin B}}{F}\right) \cdot \left(-F\right) \]

                              if -1.85e8 < F < 8.9999999999999998e-4

                              1. Initial program 76.9%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B}} \]
                              3. Step-by-step derivation
                                1. metadata-evalN/A

                                  \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                2. metadata-evalN/A

                                  \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                3. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{\color{blue}{B}} \]
                              4. Applied rewrites43.7%

                                \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]

                              if 8.9999999999999998e-4 < F

                              1. Initial program 76.9%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Step-by-step derivation
                                1. lift-+.f64N/A

                                  \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                2. +-commutativeN/A

                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                3. lift-*.f64N/A

                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                4. lift-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                5. associate-*l/N/A

                                  \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                6. mult-flipN/A

                                  \[\leadsto \color{blue}{\left(F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \frac{1}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                7. *-commutativeN/A

                                  \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                8. lower-fma.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                              3. Applied rewrites85.0%

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, \frac{-x}{\tan B}\right)} \]
                              4. Taylor expanded in F around inf

                                \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
                              5. Step-by-step derivation
                                1. Applied rewrites55.2%

                                  \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
                                2. Taylor expanded in B around 0

                                  \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                3. Step-by-step derivation
                                  1. lower-*.f64N/A

                                    \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
                                  2. lower-/.f6435.8%

                                    \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                                4. Applied rewrites35.8%

                                  \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                              6. Recombined 3 regimes into one program.
                              7. Add Preprocessing

                              Alternative 12: 64.6% accurate, 2.0× speedup?

                              \[\begin{array}{l} \mathbf{if}\;F \leq -185000000:\\ \;\;\;\;\left(\frac{x}{B \cdot F} + \frac{\frac{1}{F}}{\sin B}\right) \cdot \left(-F\right)\\ \mathbf{elif}\;F \leq 0.0009:\\ \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \frac{x}{B}\right)\\ \end{array} \]
                              (FPCore (F B x)
                               :precision binary64
                               (if (<= F -185000000.0)
                                 (* (+ (/ x (* B F)) (/ (/ 1.0 F) (sin B))) (- F))
                                 (if (<= F 0.0009)
                                   (/ (- (* F (pow (+ 2.0 (fma 2.0 x (pow F 2.0))) -0.5)) x) B)
                                   (fma (/ 1.0 (sin B)) 1.0 (* -1.0 (/ x B))))))
                              double code(double F, double B, double x) {
                              	double tmp;
                              	if (F <= -185000000.0) {
                              		tmp = ((x / (B * F)) + ((1.0 / F) / sin(B))) * -F;
                              	} else if (F <= 0.0009) {
                              		tmp = ((F * pow((2.0 + fma(2.0, x, pow(F, 2.0))), -0.5)) - x) / B;
                              	} else {
                              		tmp = fma((1.0 / sin(B)), 1.0, (-1.0 * (x / B)));
                              	}
                              	return tmp;
                              }
                              
                              function code(F, B, x)
                              	tmp = 0.0
                              	if (F <= -185000000.0)
                              		tmp = Float64(Float64(Float64(x / Float64(B * F)) + Float64(Float64(1.0 / F) / sin(B))) * Float64(-F));
                              	elseif (F <= 0.0009)
                              		tmp = Float64(Float64(Float64(F * (Float64(2.0 + fma(2.0, x, (F ^ 2.0))) ^ -0.5)) - x) / B);
                              	else
                              		tmp = fma(Float64(1.0 / sin(B)), 1.0, Float64(-1.0 * Float64(x / B)));
                              	end
                              	return tmp
                              end
                              
                              code[F_, B_, x_] := If[LessEqual[F, -185000000.0], N[(N[(N[(x / N[(B * F), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * (-F)), $MachinePrecision], If[LessEqual[F, 0.0009], N[(N[(N[(F * N[Power[N[(2.0 + N[(2.0 * x + N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * 1.0 + N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              \mathbf{if}\;F \leq -185000000:\\
                              \;\;\;\;\left(\frac{x}{B \cdot F} + \frac{\frac{1}{F}}{\sin B}\right) \cdot \left(-F\right)\\
                              
                              \mathbf{elif}\;F \leq 0.0009:\\
                              \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \frac{x}{B}\right)\\
                              
                              
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if F < -1.85e8

                                1. Initial program 76.9%

                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                2. Taylor expanded in F around -inf

                                  \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                3. Step-by-step derivation
                                  1. lower-*.f64N/A

                                    \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                  2. lower-*.f64N/A

                                    \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                  3. lower-+.f64N/A

                                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                  4. lower-/.f64N/A

                                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                  5. lower-*.f64N/A

                                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                  6. lower-sin.f64N/A

                                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                  7. lower-/.f64N/A

                                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                  8. lower-*.f64N/A

                                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                  9. lower-cos.f64N/A

                                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                  10. lower-*.f64N/A

                                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                  11. lower-sin.f6449.8%

                                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                4. Applied rewrites49.8%

                                  \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                5. Taylor expanded in B around 0

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{\color{blue}{B \cdot F}}\right)\right) \]
                                6. Step-by-step derivation
                                  1. lower-/.f64N/A

                                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
                                  2. lower-*.f6433.7%

                                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right) \]
                                7. Applied rewrites33.7%

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{\color{blue}{B \cdot F}}\right)\right) \]
                                8. Step-by-step derivation
                                  1. lift-*.f64N/A

                                    \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right)} \]
                                  2. mul-1-negN/A

                                    \[\leadsto \mathsf{neg}\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right) \]
                                  3. lift-*.f64N/A

                                    \[\leadsto \mathsf{neg}\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right) \]
                                  4. *-commutativeN/A

                                    \[\leadsto \mathsf{neg}\left(\left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot F\right) \]
                                  5. distribute-rgt-neg-inN/A

                                    \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
                                  6. lower-*.f64N/A

                                    \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
                                9. Applied rewrites33.7%

                                  \[\leadsto \left(\frac{x}{B \cdot F} + \frac{1}{\sin B \cdot F}\right) \cdot \color{blue}{\left(-F\right)} \]
                                10. Step-by-step derivation
                                  1. lift-/.f64N/A

                                    \[\leadsto \left(\frac{x}{B \cdot F} + \frac{1}{\sin B \cdot F}\right) \cdot \left(-F\right) \]
                                  2. lift-*.f64N/A

                                    \[\leadsto \left(\frac{x}{B \cdot F} + \frac{1}{\sin B \cdot F}\right) \cdot \left(-F\right) \]
                                  3. *-commutativeN/A

                                    \[\leadsto \left(\frac{x}{B \cdot F} + \frac{1}{F \cdot \sin B}\right) \cdot \left(-F\right) \]
                                  4. associate-/r*N/A

                                    \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{F}}{\sin B}\right) \cdot \left(-F\right) \]
                                  5. lift-/.f64N/A

                                    \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{F}}{\sin B}\right) \cdot \left(-F\right) \]
                                  6. lower-/.f6433.7%

                                    \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{F}}{\sin B}\right) \cdot \left(-F\right) \]
                                11. Applied rewrites33.7%

                                  \[\leadsto \left(\frac{x}{B \cdot F} + \frac{\frac{1}{F}}{\sin B}\right) \cdot \left(-F\right) \]

                                if -1.85e8 < F < 8.9999999999999998e-4

                                1. Initial program 76.9%

                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                2. Taylor expanded in B around 0

                                  \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B}} \]
                                3. Step-by-step derivation
                                  1. metadata-evalN/A

                                    \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                  2. metadata-evalN/A

                                    \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                  3. lower-/.f64N/A

                                    \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{\color{blue}{B}} \]
                                4. Applied rewrites43.7%

                                  \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]

                                if 8.9999999999999998e-4 < F

                                1. Initial program 76.9%

                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                2. Step-by-step derivation
                                  1. lift-+.f64N/A

                                    \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                  2. +-commutativeN/A

                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                  3. lift-*.f64N/A

                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                  4. lift-/.f64N/A

                                    \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                  5. associate-*l/N/A

                                    \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                  6. mult-flipN/A

                                    \[\leadsto \color{blue}{\left(F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \frac{1}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                  7. *-commutativeN/A

                                    \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                  8. lower-fma.f64N/A

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                                3. Applied rewrites85.0%

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, \frac{-x}{\tan B}\right)} \]
                                4. Taylor expanded in F around inf

                                  \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
                                5. Step-by-step derivation
                                  1. Applied rewrites55.2%

                                    \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
                                  2. Taylor expanded in B around 0

                                    \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                  3. Step-by-step derivation
                                    1. lower-*.f64N/A

                                      \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
                                    2. lower-/.f6435.8%

                                      \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                                  4. Applied rewrites35.8%

                                    \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                6. Recombined 3 regimes into one program.
                                7. Add Preprocessing

                                Alternative 13: 64.6% accurate, 2.0× speedup?

                                \[\begin{array}{l} \mathbf{if}\;F \leq -185000000:\\ \;\;\;\;\left(\frac{x}{B \cdot F} - \frac{-1}{\sin B \cdot F}\right) \cdot \left(-F\right)\\ \mathbf{elif}\;F \leq 0.0009:\\ \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \frac{x}{B}\right)\\ \end{array} \]
                                (FPCore (F B x)
                                 :precision binary64
                                 (if (<= F -185000000.0)
                                   (* (- (/ x (* B F)) (/ -1.0 (* (sin B) F))) (- F))
                                   (if (<= F 0.0009)
                                     (/ (- (* F (pow (+ 2.0 (fma 2.0 x (pow F 2.0))) -0.5)) x) B)
                                     (fma (/ 1.0 (sin B)) 1.0 (* -1.0 (/ x B))))))
                                double code(double F, double B, double x) {
                                	double tmp;
                                	if (F <= -185000000.0) {
                                		tmp = ((x / (B * F)) - (-1.0 / (sin(B) * F))) * -F;
                                	} else if (F <= 0.0009) {
                                		tmp = ((F * pow((2.0 + fma(2.0, x, pow(F, 2.0))), -0.5)) - x) / B;
                                	} else {
                                		tmp = fma((1.0 / sin(B)), 1.0, (-1.0 * (x / B)));
                                	}
                                	return tmp;
                                }
                                
                                function code(F, B, x)
                                	tmp = 0.0
                                	if (F <= -185000000.0)
                                		tmp = Float64(Float64(Float64(x / Float64(B * F)) - Float64(-1.0 / Float64(sin(B) * F))) * Float64(-F));
                                	elseif (F <= 0.0009)
                                		tmp = Float64(Float64(Float64(F * (Float64(2.0 + fma(2.0, x, (F ^ 2.0))) ^ -0.5)) - x) / B);
                                	else
                                		tmp = fma(Float64(1.0 / sin(B)), 1.0, Float64(-1.0 * Float64(x / B)));
                                	end
                                	return tmp
                                end
                                
                                code[F_, B_, x_] := If[LessEqual[F, -185000000.0], N[(N[(N[(x / N[(B * F), $MachinePrecision]), $MachinePrecision] - N[(-1.0 / N[(N[Sin[B], $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * (-F)), $MachinePrecision], If[LessEqual[F, 0.0009], N[(N[(N[(F * N[Power[N[(2.0 + N[(2.0 * x + N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * 1.0 + N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                
                                \begin{array}{l}
                                \mathbf{if}\;F \leq -185000000:\\
                                \;\;\;\;\left(\frac{x}{B \cdot F} - \frac{-1}{\sin B \cdot F}\right) \cdot \left(-F\right)\\
                                
                                \mathbf{elif}\;F \leq 0.0009:\\
                                \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \frac{x}{B}\right)\\
                                
                                
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if F < -1.85e8

                                  1. Initial program 76.9%

                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  2. Taylor expanded in F around -inf

                                    \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                  3. Step-by-step derivation
                                    1. lower-*.f64N/A

                                      \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                    2. lower-*.f64N/A

                                      \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                    3. lower-+.f64N/A

                                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                    4. lower-/.f64N/A

                                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                    5. lower-*.f64N/A

                                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                    6. lower-sin.f64N/A

                                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                    7. lower-/.f64N/A

                                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                    8. lower-*.f64N/A

                                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                    9. lower-cos.f64N/A

                                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                    10. lower-*.f64N/A

                                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                    11. lower-sin.f6449.8%

                                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                  4. Applied rewrites49.8%

                                    \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                  5. Taylor expanded in B around 0

                                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{\color{blue}{B \cdot F}}\right)\right) \]
                                  6. Step-by-step derivation
                                    1. lower-/.f64N/A

                                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
                                    2. lower-*.f6433.7%

                                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right) \]
                                  7. Applied rewrites33.7%

                                    \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{\color{blue}{B \cdot F}}\right)\right) \]
                                  8. Step-by-step derivation
                                    1. lift-*.f64N/A

                                      \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right)} \]
                                    2. mul-1-negN/A

                                      \[\leadsto \mathsf{neg}\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right) \]
                                    3. lift-*.f64N/A

                                      \[\leadsto \mathsf{neg}\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right) \]
                                    4. *-commutativeN/A

                                      \[\leadsto \mathsf{neg}\left(\left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot F\right) \]
                                    5. distribute-rgt-neg-inN/A

                                      \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
                                    6. lower-*.f64N/A

                                      \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
                                  9. Applied rewrites33.7%

                                    \[\leadsto \left(\frac{x}{B \cdot F} + \frac{1}{\sin B \cdot F}\right) \cdot \color{blue}{\left(-F\right)} \]
                                  10. Step-by-step derivation
                                    1. lift-+.f64N/A

                                      \[\leadsto \left(\frac{x}{B \cdot F} + \frac{1}{\sin B \cdot F}\right) \cdot \left(-\color{blue}{F}\right) \]
                                    2. add-flipN/A

                                      \[\leadsto \left(\frac{x}{B \cdot F} - \left(\mathsf{neg}\left(\frac{1}{\sin B \cdot F}\right)\right)\right) \cdot \left(-\color{blue}{F}\right) \]
                                    3. lower--.f64N/A

                                      \[\leadsto \left(\frac{x}{B \cdot F} - \left(\mathsf{neg}\left(\frac{1}{\sin B \cdot F}\right)\right)\right) \cdot \left(-\color{blue}{F}\right) \]
                                    4. lift-/.f64N/A

                                      \[\leadsto \left(\frac{x}{B \cdot F} - \left(\mathsf{neg}\left(\frac{1}{\sin B \cdot F}\right)\right)\right) \cdot \left(-F\right) \]
                                    5. lift-*.f64N/A

                                      \[\leadsto \left(\frac{x}{B \cdot F} - \left(\mathsf{neg}\left(\frac{1}{\sin B \cdot F}\right)\right)\right) \cdot \left(-F\right) \]
                                    6. *-commutativeN/A

                                      \[\leadsto \left(\frac{x}{B \cdot F} - \left(\mathsf{neg}\left(\frac{1}{F \cdot \sin B}\right)\right)\right) \cdot \left(-F\right) \]
                                    7. lift-sin.f64N/A

                                      \[\leadsto \left(\frac{x}{B \cdot F} - \left(\mathsf{neg}\left(\frac{1}{F \cdot \sin B}\right)\right)\right) \cdot \left(-F\right) \]
                                    8. distribute-neg-fracN/A

                                      \[\leadsto \left(\frac{x}{B \cdot F} - \frac{\mathsf{neg}\left(1\right)}{F \cdot \sin B}\right) \cdot \left(-F\right) \]
                                    9. metadata-evalN/A

                                      \[\leadsto \left(\frac{x}{B \cdot F} - \frac{-1}{F \cdot \sin B}\right) \cdot \left(-F\right) \]
                                    10. lower-/.f64N/A

                                      \[\leadsto \left(\frac{x}{B \cdot F} - \frac{-1}{F \cdot \sin B}\right) \cdot \left(-F\right) \]
                                    11. lift-sin.f64N/A

                                      \[\leadsto \left(\frac{x}{B \cdot F} - \frac{-1}{F \cdot \sin B}\right) \cdot \left(-F\right) \]
                                    12. *-commutativeN/A

                                      \[\leadsto \left(\frac{x}{B \cdot F} - \frac{-1}{\sin B \cdot F}\right) \cdot \left(-F\right) \]
                                    13. lift-*.f6433.7%

                                      \[\leadsto \left(\frac{x}{B \cdot F} - \frac{-1}{\sin B \cdot F}\right) \cdot \left(-F\right) \]
                                  11. Applied rewrites33.7%

                                    \[\leadsto \left(\frac{x}{B \cdot F} - \frac{-1}{\sin B \cdot F}\right) \cdot \color{blue}{\left(-F\right)} \]

                                  if -1.85e8 < F < 8.9999999999999998e-4

                                  1. Initial program 76.9%

                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  2. Taylor expanded in B around 0

                                    \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B}} \]
                                  3. Step-by-step derivation
                                    1. metadata-evalN/A

                                      \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                    2. metadata-evalN/A

                                      \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                    3. lower-/.f64N/A

                                      \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{\color{blue}{B}} \]
                                  4. Applied rewrites43.7%

                                    \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]

                                  if 8.9999999999999998e-4 < F

                                  1. Initial program 76.9%

                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  2. Step-by-step derivation
                                    1. lift-+.f64N/A

                                      \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                    2. +-commutativeN/A

                                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                    3. lift-*.f64N/A

                                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                    4. lift-/.f64N/A

                                      \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                    5. associate-*l/N/A

                                      \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                    6. mult-flipN/A

                                      \[\leadsto \color{blue}{\left(F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \frac{1}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                    7. *-commutativeN/A

                                      \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                    8. lower-fma.f64N/A

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                                  3. Applied rewrites85.0%

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, \frac{-x}{\tan B}\right)} \]
                                  4. Taylor expanded in F around inf

                                    \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
                                  5. Step-by-step derivation
                                    1. Applied rewrites55.2%

                                      \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
                                    2. Taylor expanded in B around 0

                                      \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                    3. Step-by-step derivation
                                      1. lower-*.f64N/A

                                        \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
                                      2. lower-/.f6435.8%

                                        \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                                    4. Applied rewrites35.8%

                                      \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                  6. Recombined 3 regimes into one program.
                                  7. Add Preprocessing

                                  Alternative 14: 59.0% accurate, 2.0× speedup?

                                  \[\begin{array}{l} \mathbf{if}\;F \leq -1360000:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 0.0009:\\ \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \frac{x}{B}\right)\\ \end{array} \]
                                  (FPCore (F B x)
                                   :precision binary64
                                   (if (<= F -1360000.0)
                                     (/ -1.0 (sin B))
                                     (if (<= F 0.0009)
                                       (/ (- (* F (pow (+ 2.0 (fma 2.0 x (pow F 2.0))) -0.5)) x) B)
                                       (fma (/ 1.0 (sin B)) 1.0 (* -1.0 (/ x B))))))
                                  double code(double F, double B, double x) {
                                  	double tmp;
                                  	if (F <= -1360000.0) {
                                  		tmp = -1.0 / sin(B);
                                  	} else if (F <= 0.0009) {
                                  		tmp = ((F * pow((2.0 + fma(2.0, x, pow(F, 2.0))), -0.5)) - x) / B;
                                  	} else {
                                  		tmp = fma((1.0 / sin(B)), 1.0, (-1.0 * (x / B)));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(F, B, x)
                                  	tmp = 0.0
                                  	if (F <= -1360000.0)
                                  		tmp = Float64(-1.0 / sin(B));
                                  	elseif (F <= 0.0009)
                                  		tmp = Float64(Float64(Float64(F * (Float64(2.0 + fma(2.0, x, (F ^ 2.0))) ^ -0.5)) - x) / B);
                                  	else
                                  		tmp = fma(Float64(1.0 / sin(B)), 1.0, Float64(-1.0 * Float64(x / B)));
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[F_, B_, x_] := If[LessEqual[F, -1360000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0009], N[(N[(N[(F * N[Power[N[(2.0 + N[(2.0 * x + N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * 1.0 + N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                  
                                  \begin{array}{l}
                                  \mathbf{if}\;F \leq -1360000:\\
                                  \;\;\;\;\frac{-1}{\sin B}\\
                                  
                                  \mathbf{elif}\;F \leq 0.0009:\\
                                  \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \frac{x}{B}\right)\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 3 regimes
                                  2. if F < -1.36e6

                                    1. Initial program 76.9%

                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    2. Taylor expanded in F around -inf

                                      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                    3. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                      2. lower-sin.f6417.5%

                                        \[\leadsto \frac{-1}{\sin B} \]
                                    4. Applied rewrites17.5%

                                      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                    if -1.36e6 < F < 8.9999999999999998e-4

                                    1. Initial program 76.9%

                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    2. Taylor expanded in B around 0

                                      \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B}} \]
                                    3. Step-by-step derivation
                                      1. metadata-evalN/A

                                        \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                      2. metadata-evalN/A

                                        \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                      3. lower-/.f64N/A

                                        \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{\color{blue}{B}} \]
                                    4. Applied rewrites43.7%

                                      \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]

                                    if 8.9999999999999998e-4 < F

                                    1. Initial program 76.9%

                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    2. Step-by-step derivation
                                      1. lift-+.f64N/A

                                        \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                      2. +-commutativeN/A

                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                      3. lift-*.f64N/A

                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                      4. lift-/.f64N/A

                                        \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                      5. associate-*l/N/A

                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                      6. mult-flipN/A

                                        \[\leadsto \color{blue}{\left(F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \frac{1}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                      7. *-commutativeN/A

                                        \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                      8. lower-fma.f64N/A

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                                    3. Applied rewrites85.0%

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, \frac{-x}{\tan B}\right)} \]
                                    4. Taylor expanded in F around inf

                                      \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
                                    5. Step-by-step derivation
                                      1. Applied rewrites55.2%

                                        \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
                                      2. Taylor expanded in B around 0

                                        \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                      3. Step-by-step derivation
                                        1. lower-*.f64N/A

                                          \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
                                        2. lower-/.f6435.8%

                                          \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                                      4. Applied rewrites35.8%

                                        \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                    6. Recombined 3 regimes into one program.
                                    7. Add Preprocessing

                                    Alternative 15: 59.0% accurate, 2.1× speedup?

                                    \[\begin{array}{l} \mathbf{if}\;F \leq -1360000:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 0.0009:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \frac{x}{B}\right)\\ \end{array} \]
                                    (FPCore (F B x)
                                     :precision binary64
                                     (if (<= F -1360000.0)
                                       (/ -1.0 (sin B))
                                       (if (<= F 0.0009)
                                         (+
                                          (- (/ x B))
                                          (* (/ F B) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0)))))
                                         (fma (/ 1.0 (sin B)) 1.0 (* -1.0 (/ x B))))))
                                    double code(double F, double B, double x) {
                                    	double tmp;
                                    	if (F <= -1360000.0) {
                                    		tmp = -1.0 / sin(B);
                                    	} else if (F <= 0.0009) {
                                    		tmp = -(x / B) + ((F / B) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
                                    	} else {
                                    		tmp = fma((1.0 / sin(B)), 1.0, (-1.0 * (x / B)));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(F, B, x)
                                    	tmp = 0.0
                                    	if (F <= -1360000.0)
                                    		tmp = Float64(-1.0 / sin(B));
                                    	elseif (F <= 0.0009)
                                    		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(F / B) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0)))));
                                    	else
                                    		tmp = fma(Float64(1.0 / sin(B)), 1.0, Float64(-1.0 * Float64(x / B)));
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[F_, B_, x_] := If[LessEqual[F, -1360000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0009], N[((-N[(x / B), $MachinePrecision]) + N[(N[(F / B), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * 1.0 + N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                    
                                    \begin{array}{l}
                                    \mathbf{if}\;F \leq -1360000:\\
                                    \;\;\;\;\frac{-1}{\sin B}\\
                                    
                                    \mathbf{elif}\;F \leq 0.0009:\\
                                    \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \frac{x}{B}\right)\\
                                    
                                    
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if F < -1.36e6

                                      1. Initial program 76.9%

                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      2. Taylor expanded in F around -inf

                                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                      3. Step-by-step derivation
                                        1. lower-/.f64N/A

                                          \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                        2. lower-sin.f6417.5%

                                          \[\leadsto \frac{-1}{\sin B} \]
                                      4. Applied rewrites17.5%

                                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                      if -1.36e6 < F < 8.9999999999999998e-4

                                      1. Initial program 76.9%

                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      2. Taylor expanded in B around 0

                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      3. Step-by-step derivation
                                        1. lower-/.f6462.3%

                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      4. Applied rewrites62.3%

                                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      5. Taylor expanded in B around 0

                                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      6. Step-by-step derivation
                                        1. lower-/.f6435.7%

                                          \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      7. Applied rewrites35.7%

                                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]

                                      if 8.9999999999999998e-4 < F

                                      1. Initial program 76.9%

                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      2. Step-by-step derivation
                                        1. lift-+.f64N/A

                                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                        2. +-commutativeN/A

                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                        3. lift-*.f64N/A

                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                        4. lift-/.f64N/A

                                          \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                        5. associate-*l/N/A

                                          \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                        6. mult-flipN/A

                                          \[\leadsto \color{blue}{\left(F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \frac{1}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                        7. *-commutativeN/A

                                          \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                        8. lower-fma.f64N/A

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                                      3. Applied rewrites85.0%

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, \frac{-x}{\tan B}\right)} \]
                                      4. Taylor expanded in F around inf

                                        \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
                                      5. Step-by-step derivation
                                        1. Applied rewrites55.2%

                                          \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
                                        2. Taylor expanded in B around 0

                                          \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                        3. Step-by-step derivation
                                          1. lower-*.f64N/A

                                            \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
                                          2. lower-/.f6435.8%

                                            \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                                        4. Applied rewrites35.8%

                                          \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, 1, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                      6. Recombined 3 regimes into one program.
                                      7. Add Preprocessing

                                      Alternative 16: 52.5% accurate, 2.2× speedup?

                                      \[\begin{array}{l} \mathbf{if}\;F \leq -1360000:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{+25}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                                      (FPCore (F B x)
                                       :precision binary64
                                       (if (<= F -1360000.0)
                                         (/ -1.0 (sin B))
                                         (if (<= F 2.4e+25)
                                           (+
                                            (- (/ x B))
                                            (* (/ F B) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0)))))
                                           (/ 1.0 (sin B)))))
                                      double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (F <= -1360000.0) {
                                      		tmp = -1.0 / sin(B);
                                      	} else if (F <= 2.4e+25) {
                                      		tmp = -(x / B) + ((F / B) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
                                      	} else {
                                      		tmp = 1.0 / sin(B);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      module fmin_fmax_functions
                                          implicit none
                                          private
                                          public fmax
                                          public fmin
                                      
                                          interface fmax
                                              module procedure fmax88
                                              module procedure fmax44
                                              module procedure fmax84
                                              module procedure fmax48
                                          end interface
                                          interface fmin
                                              module procedure fmin88
                                              module procedure fmin44
                                              module procedure fmin84
                                              module procedure fmin48
                                          end interface
                                      contains
                                          real(8) function fmax88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmax44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmax84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmax48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmin44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmin48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                          end function
                                      end module
                                      
                                      real(8) function code(f, b, x)
                                      use fmin_fmax_functions
                                          real(8), intent (in) :: f
                                          real(8), intent (in) :: b
                                          real(8), intent (in) :: x
                                          real(8) :: tmp
                                          if (f <= (-1360000.0d0)) then
                                              tmp = (-1.0d0) / sin(b)
                                          else if (f <= 2.4d+25) then
                                              tmp = -(x / b) + ((f / b) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
                                          else
                                              tmp = 1.0d0 / sin(b)
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (F <= -1360000.0) {
                                      		tmp = -1.0 / Math.sin(B);
                                      	} else if (F <= 2.4e+25) {
                                      		tmp = -(x / B) + ((F / B) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
                                      	} else {
                                      		tmp = 1.0 / Math.sin(B);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(F, B, x):
                                      	tmp = 0
                                      	if F <= -1360000.0:
                                      		tmp = -1.0 / math.sin(B)
                                      	elif F <= 2.4e+25:
                                      		tmp = -(x / B) + ((F / B) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
                                      	else:
                                      		tmp = 1.0 / math.sin(B)
                                      	return tmp
                                      
                                      function code(F, B, x)
                                      	tmp = 0.0
                                      	if (F <= -1360000.0)
                                      		tmp = Float64(-1.0 / sin(B));
                                      	elseif (F <= 2.4e+25)
                                      		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(F / B) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0)))));
                                      	else
                                      		tmp = Float64(1.0 / sin(B));
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(F, B, x)
                                      	tmp = 0.0;
                                      	if (F <= -1360000.0)
                                      		tmp = -1.0 / sin(B);
                                      	elseif (F <= 2.4e+25)
                                      		tmp = -(x / B) + ((F / B) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0)));
                                      	else
                                      		tmp = 1.0 / sin(B);
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[F_, B_, x_] := If[LessEqual[F, -1360000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e+25], N[((-N[(x / B), $MachinePrecision]) + N[(N[(F / B), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                                      
                                      \begin{array}{l}
                                      \mathbf{if}\;F \leq -1360000:\\
                                      \;\;\;\;\frac{-1}{\sin B}\\
                                      
                                      \mathbf{elif}\;F \leq 2.4 \cdot 10^{+25}:\\
                                      \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\frac{1}{\sin B}\\
                                      
                                      
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if F < -1.36e6

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in F around -inf

                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                        3. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                          2. lower-sin.f6417.5%

                                            \[\leadsto \frac{-1}{\sin B} \]
                                        4. Applied rewrites17.5%

                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                        if -1.36e6 < F < 2.4e25

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in B around 0

                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        3. Step-by-step derivation
                                          1. lower-/.f6462.3%

                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        4. Applied rewrites62.3%

                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        5. Taylor expanded in B around 0

                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        6. Step-by-step derivation
                                          1. lower-/.f6435.7%

                                            \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        7. Applied rewrites35.7%

                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]

                                        if 2.4e25 < F

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in F around inf

                                          \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                        3. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                                          2. lower-sin.f6416.7%

                                            \[\leadsto \frac{1}{\sin B} \]
                                        4. Applied rewrites16.7%

                                          \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                      3. Recombined 3 regimes into one program.
                                      4. Add Preprocessing

                                      Alternative 17: 52.3% accurate, 2.5× speedup?

                                      \[\begin{array}{l} \mathbf{if}\;F \leq -920000000:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{+25}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, \frac{F}{B}, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot 0.3333333333333333 - x}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                                      (FPCore (F B x)
                                       :precision binary64
                                       (if (<= F -920000000.0)
                                         (/ -1.0 (sin B))
                                         (if (<= F 2.4e+25)
                                           (fma
                                            (/ 1.0 (sqrt (fma 2.0 x (fma F F 2.0))))
                                            (/ F B)
                                            (/ (- (* (* (* B B) x) 0.3333333333333333) x) B))
                                           (/ 1.0 (sin B)))))
                                      double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (F <= -920000000.0) {
                                      		tmp = -1.0 / sin(B);
                                      	} else if (F <= 2.4e+25) {
                                      		tmp = fma((1.0 / sqrt(fma(2.0, x, fma(F, F, 2.0)))), (F / B), (((((B * B) * x) * 0.3333333333333333) - x) / B));
                                      	} else {
                                      		tmp = 1.0 / sin(B);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(F, B, x)
                                      	tmp = 0.0
                                      	if (F <= -920000000.0)
                                      		tmp = Float64(-1.0 / sin(B));
                                      	elseif (F <= 2.4e+25)
                                      		tmp = fma(Float64(1.0 / sqrt(fma(2.0, x, fma(F, F, 2.0)))), Float64(F / B), Float64(Float64(Float64(Float64(Float64(B * B) * x) * 0.3333333333333333) - x) / B));
                                      	else
                                      		tmp = Float64(1.0 / sin(B));
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[F_, B_, x_] := If[LessEqual[F, -920000000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e+25], N[(N[(1.0 / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(F / B), $MachinePrecision] + N[(N[(N[(N[(N[(B * B), $MachinePrecision] * x), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                                      
                                      \begin{array}{l}
                                      \mathbf{if}\;F \leq -920000000:\\
                                      \;\;\;\;\frac{-1}{\sin B}\\
                                      
                                      \mathbf{elif}\;F \leq 2.4 \cdot 10^{+25}:\\
                                      \;\;\;\;\mathsf{fma}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, \frac{F}{B}, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot 0.3333333333333333 - x}{B}\right)\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\frac{1}{\sin B}\\
                                      
                                      
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if F < -9.2e8

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in F around -inf

                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                        3. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                          2. lower-sin.f6417.5%

                                            \[\leadsto \frac{-1}{\sin B} \]
                                        4. Applied rewrites17.5%

                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                        if -9.2e8 < F < 2.4e25

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in B around 0

                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        3. Step-by-step derivation
                                          1. lower-/.f6462.3%

                                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        4. Applied rewrites62.3%

                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        5. Taylor expanded in B around 0

                                          \[\leadsto \color{blue}{\frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        6. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto \frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{\color{blue}{B}} + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                          2. lower--.f64N/A

                                            \[\leadsto \frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B} + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                          3. lower-*.f64N/A

                                            \[\leadsto \frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B} + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                          4. lower-*.f64N/A

                                            \[\leadsto \frac{\frac{1}{3} \cdot \left({B}^{2} \cdot x\right) - x}{B} + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                          5. lower-pow.f6435.6%

                                            \[\leadsto \frac{0.3333333333333333 \cdot \left({B}^{2} \cdot x\right) - x}{B} + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        7. Applied rewrites35.6%

                                          \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot \left({B}^{2} \cdot x\right) - x}{B}} + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        8. Applied rewrites35.6%

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, \frac{F}{B}, \frac{\left(\left(B \cdot B\right) \cdot x\right) \cdot 0.3333333333333333 - x}{B}\right)} \]

                                        if 2.4e25 < F

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in F around inf

                                          \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                        3. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                                          2. lower-sin.f6416.7%

                                            \[\leadsto \frac{1}{\sin B} \]
                                        4. Applied rewrites16.7%

                                          \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                      3. Recombined 3 regimes into one program.
                                      4. Add Preprocessing

                                      Alternative 18: 44.2% accurate, 2.6× speedup?

                                      \[\begin{array}{l} \mathbf{if}\;F \leq -370:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 9.4 \cdot 10^{+26}:\\ \;\;\;\;-1 \cdot \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                                      (FPCore (F B x)
                                       :precision binary64
                                       (if (<= F -370.0)
                                         (/ -1.0 (sin B))
                                         (if (<= F 9.4e+26) (* -1.0 (/ x B)) (/ 1.0 (sin B)))))
                                      double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (F <= -370.0) {
                                      		tmp = -1.0 / sin(B);
                                      	} else if (F <= 9.4e+26) {
                                      		tmp = -1.0 * (x / B);
                                      	} else {
                                      		tmp = 1.0 / sin(B);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      module fmin_fmax_functions
                                          implicit none
                                          private
                                          public fmax
                                          public fmin
                                      
                                          interface fmax
                                              module procedure fmax88
                                              module procedure fmax44
                                              module procedure fmax84
                                              module procedure fmax48
                                          end interface
                                          interface fmin
                                              module procedure fmin88
                                              module procedure fmin44
                                              module procedure fmin84
                                              module procedure fmin48
                                          end interface
                                      contains
                                          real(8) function fmax88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmax44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmax84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmax48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmin44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmin48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                          end function
                                      end module
                                      
                                      real(8) function code(f, b, x)
                                      use fmin_fmax_functions
                                          real(8), intent (in) :: f
                                          real(8), intent (in) :: b
                                          real(8), intent (in) :: x
                                          real(8) :: tmp
                                          if (f <= (-370.0d0)) then
                                              tmp = (-1.0d0) / sin(b)
                                          else if (f <= 9.4d+26) then
                                              tmp = (-1.0d0) * (x / b)
                                          else
                                              tmp = 1.0d0 / sin(b)
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (F <= -370.0) {
                                      		tmp = -1.0 / Math.sin(B);
                                      	} else if (F <= 9.4e+26) {
                                      		tmp = -1.0 * (x / B);
                                      	} else {
                                      		tmp = 1.0 / Math.sin(B);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(F, B, x):
                                      	tmp = 0
                                      	if F <= -370.0:
                                      		tmp = -1.0 / math.sin(B)
                                      	elif F <= 9.4e+26:
                                      		tmp = -1.0 * (x / B)
                                      	else:
                                      		tmp = 1.0 / math.sin(B)
                                      	return tmp
                                      
                                      function code(F, B, x)
                                      	tmp = 0.0
                                      	if (F <= -370.0)
                                      		tmp = Float64(-1.0 / sin(B));
                                      	elseif (F <= 9.4e+26)
                                      		tmp = Float64(-1.0 * Float64(x / B));
                                      	else
                                      		tmp = Float64(1.0 / sin(B));
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(F, B, x)
                                      	tmp = 0.0;
                                      	if (F <= -370.0)
                                      		tmp = -1.0 / sin(B);
                                      	elseif (F <= 9.4e+26)
                                      		tmp = -1.0 * (x / B);
                                      	else
                                      		tmp = 1.0 / sin(B);
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[F_, B_, x_] := If[LessEqual[F, -370.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.4e+26], N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                                      
                                      \begin{array}{l}
                                      \mathbf{if}\;F \leq -370:\\
                                      \;\;\;\;\frac{-1}{\sin B}\\
                                      
                                      \mathbf{elif}\;F \leq 9.4 \cdot 10^{+26}:\\
                                      \;\;\;\;-1 \cdot \frac{x}{B}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\frac{1}{\sin B}\\
                                      
                                      
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if F < -370

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in F around -inf

                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                        3. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                          2. lower-sin.f6417.5%

                                            \[\leadsto \frac{-1}{\sin B} \]
                                        4. Applied rewrites17.5%

                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                        if -370 < F < 9.3999999999999995e26

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in F around -inf

                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                        3. Step-by-step derivation
                                          1. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                          3. lower-+.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                          4. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                          5. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                          6. lower-sin.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                          7. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                          8. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                          9. lower-cos.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                          10. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                          11. lower-sin.f6449.8%

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                        4. Applied rewrites49.8%

                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                        5. Taylor expanded in B around 0

                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                        6. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          3. lower-+.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          4. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          5. lower-/.f6428.4%

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                        7. Applied rewrites28.4%

                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                        8. Taylor expanded in x around inf

                                          \[\leadsto -1 \cdot \frac{x}{B} \]
                                        9. Step-by-step derivation
                                          1. lower-/.f6428.8%

                                            \[\leadsto -1 \cdot \frac{x}{B} \]
                                        10. Applied rewrites28.8%

                                          \[\leadsto -1 \cdot \frac{x}{B} \]

                                        if 9.3999999999999995e26 < F

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in F around inf

                                          \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                        3. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                                          2. lower-sin.f6416.7%

                                            \[\leadsto \frac{1}{\sin B} \]
                                        4. Applied rewrites16.7%

                                          \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                      3. Recombined 3 regimes into one program.
                                      4. Add Preprocessing

                                      Alternative 19: 37.4% accurate, 2.9× speedup?

                                      \[\begin{array}{l} \mathbf{if}\;F \leq -370:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{x}{B}\\ \end{array} \]
                                      (FPCore (F B x)
                                       :precision binary64
                                       (if (<= F -370.0) (/ -1.0 (sin B)) (* -1.0 (/ x B))))
                                      double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (F <= -370.0) {
                                      		tmp = -1.0 / sin(B);
                                      	} else {
                                      		tmp = -1.0 * (x / B);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      module fmin_fmax_functions
                                          implicit none
                                          private
                                          public fmax
                                          public fmin
                                      
                                          interface fmax
                                              module procedure fmax88
                                              module procedure fmax44
                                              module procedure fmax84
                                              module procedure fmax48
                                          end interface
                                          interface fmin
                                              module procedure fmin88
                                              module procedure fmin44
                                              module procedure fmin84
                                              module procedure fmin48
                                          end interface
                                      contains
                                          real(8) function fmax88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmax44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmax84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmax48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmin44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmin48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                          end function
                                      end module
                                      
                                      real(8) function code(f, b, x)
                                      use fmin_fmax_functions
                                          real(8), intent (in) :: f
                                          real(8), intent (in) :: b
                                          real(8), intent (in) :: x
                                          real(8) :: tmp
                                          if (f <= (-370.0d0)) then
                                              tmp = (-1.0d0) / sin(b)
                                          else
                                              tmp = (-1.0d0) * (x / b)
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (F <= -370.0) {
                                      		tmp = -1.0 / Math.sin(B);
                                      	} else {
                                      		tmp = -1.0 * (x / B);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(F, B, x):
                                      	tmp = 0
                                      	if F <= -370.0:
                                      		tmp = -1.0 / math.sin(B)
                                      	else:
                                      		tmp = -1.0 * (x / B)
                                      	return tmp
                                      
                                      function code(F, B, x)
                                      	tmp = 0.0
                                      	if (F <= -370.0)
                                      		tmp = Float64(-1.0 / sin(B));
                                      	else
                                      		tmp = Float64(-1.0 * Float64(x / B));
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(F, B, x)
                                      	tmp = 0.0;
                                      	if (F <= -370.0)
                                      		tmp = -1.0 / sin(B);
                                      	else
                                      		tmp = -1.0 * (x / B);
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[F_, B_, x_] := If[LessEqual[F, -370.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      \mathbf{if}\;F \leq -370:\\
                                      \;\;\;\;\frac{-1}{\sin B}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;-1 \cdot \frac{x}{B}\\
                                      
                                      
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if F < -370

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in F around -inf

                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                        3. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                          2. lower-sin.f6417.5%

                                            \[\leadsto \frac{-1}{\sin B} \]
                                        4. Applied rewrites17.5%

                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                        if -370 < F

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in F around -inf

                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                        3. Step-by-step derivation
                                          1. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                          3. lower-+.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                          4. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                          5. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                          6. lower-sin.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                          7. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                          8. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                          9. lower-cos.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                          10. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                          11. lower-sin.f6449.8%

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                        4. Applied rewrites49.8%

                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                        5. Taylor expanded in B around 0

                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                        6. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          3. lower-+.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          4. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          5. lower-/.f6428.4%

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                        7. Applied rewrites28.4%

                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                        8. Taylor expanded in x around inf

                                          \[\leadsto -1 \cdot \frac{x}{B} \]
                                        9. Step-by-step derivation
                                          1. lower-/.f6428.8%

                                            \[\leadsto -1 \cdot \frac{x}{B} \]
                                        10. Applied rewrites28.8%

                                          \[\leadsto -1 \cdot \frac{x}{B} \]
                                      3. Recombined 2 regimes into one program.
                                      4. Add Preprocessing

                                      Alternative 20: 36.3% accurate, 9.8× speedup?

                                      \[\begin{array}{l} \mathbf{if}\;F \leq -5.2 \cdot 10^{-56}:\\ \;\;\;\;-\frac{x + 1}{B}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{x}{B}\\ \end{array} \]
                                      (FPCore (F B x)
                                       :precision binary64
                                       (if (<= F -5.2e-56) (- (/ (+ x 1.0) B)) (* -1.0 (/ x B))))
                                      double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (F <= -5.2e-56) {
                                      		tmp = -((x + 1.0) / B);
                                      	} else {
                                      		tmp = -1.0 * (x / B);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      module fmin_fmax_functions
                                          implicit none
                                          private
                                          public fmax
                                          public fmin
                                      
                                          interface fmax
                                              module procedure fmax88
                                              module procedure fmax44
                                              module procedure fmax84
                                              module procedure fmax48
                                          end interface
                                          interface fmin
                                              module procedure fmin88
                                              module procedure fmin44
                                              module procedure fmin84
                                              module procedure fmin48
                                          end interface
                                      contains
                                          real(8) function fmax88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmax44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmax84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmax48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmin44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmin48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                          end function
                                      end module
                                      
                                      real(8) function code(f, b, x)
                                      use fmin_fmax_functions
                                          real(8), intent (in) :: f
                                          real(8), intent (in) :: b
                                          real(8), intent (in) :: x
                                          real(8) :: tmp
                                          if (f <= (-5.2d-56)) then
                                              tmp = -((x + 1.0d0) / b)
                                          else
                                              tmp = (-1.0d0) * (x / b)
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (F <= -5.2e-56) {
                                      		tmp = -((x + 1.0) / B);
                                      	} else {
                                      		tmp = -1.0 * (x / B);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(F, B, x):
                                      	tmp = 0
                                      	if F <= -5.2e-56:
                                      		tmp = -((x + 1.0) / B)
                                      	else:
                                      		tmp = -1.0 * (x / B)
                                      	return tmp
                                      
                                      function code(F, B, x)
                                      	tmp = 0.0
                                      	if (F <= -5.2e-56)
                                      		tmp = Float64(-Float64(Float64(x + 1.0) / B));
                                      	else
                                      		tmp = Float64(-1.0 * Float64(x / B));
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(F, B, x)
                                      	tmp = 0.0;
                                      	if (F <= -5.2e-56)
                                      		tmp = -((x + 1.0) / B);
                                      	else
                                      		tmp = -1.0 * (x / B);
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[F_, B_, x_] := If[LessEqual[F, -5.2e-56], (-N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]), N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      \mathbf{if}\;F \leq -5.2 \cdot 10^{-56}:\\
                                      \;\;\;\;-\frac{x + 1}{B}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;-1 \cdot \frac{x}{B}\\
                                      
                                      
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if F < -5.1999999999999999e-56

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in F around -inf

                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                        3. Step-by-step derivation
                                          1. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                          3. lower-+.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                          4. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                          5. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                          6. lower-sin.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                          7. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                          8. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                          9. lower-cos.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                          10. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                          11. lower-sin.f6449.8%

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                        4. Applied rewrites49.8%

                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                        5. Taylor expanded in B around 0

                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                        6. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          3. lower-+.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          4. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          5. lower-/.f6428.4%

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                        7. Applied rewrites28.4%

                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                        8. Step-by-step derivation
                                          1. lift-*.f64N/A

                                            \[\leadsto -1 \cdot \color{blue}{\frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B}} \]
                                          2. mul-1-negN/A

                                            \[\leadsto \mathsf{neg}\left(\frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B}\right) \]
                                          3. lower-neg.f6428.4%

                                            \[\leadsto -\frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                        9. Applied rewrites29.5%

                                          \[\leadsto \color{blue}{-\frac{x + 1}{B}} \]

                                        if -5.1999999999999999e-56 < F

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in F around -inf

                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                        3. Step-by-step derivation
                                          1. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                          3. lower-+.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                          4. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                          5. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                          6. lower-sin.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                          7. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                          8. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                          9. lower-cos.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                          10. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                          11. lower-sin.f6449.8%

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                        4. Applied rewrites49.8%

                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                        5. Taylor expanded in B around 0

                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                        6. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          3. lower-+.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          4. lower-/.f64N/A

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          5. lower-/.f6428.4%

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                        7. Applied rewrites28.4%

                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                        8. Taylor expanded in x around inf

                                          \[\leadsto -1 \cdot \frac{x}{B} \]
                                        9. Step-by-step derivation
                                          1. lower-/.f6428.8%

                                            \[\leadsto -1 \cdot \frac{x}{B} \]
                                        10. Applied rewrites28.8%

                                          \[\leadsto -1 \cdot \frac{x}{B} \]
                                      3. Recombined 2 regimes into one program.
                                      4. Add Preprocessing

                                      Alternative 21: 30.2% accurate, 10.4× speedup?

                                      \[\begin{array}{l} \mathbf{if}\;F \leq -1.26 \cdot 10^{+32}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{x}{B}\\ \end{array} \]
                                      (FPCore (F B x)
                                       :precision binary64
                                       (if (<= F -1.26e+32) (/ -1.0 B) (* -1.0 (/ x B))))
                                      double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (F <= -1.26e+32) {
                                      		tmp = -1.0 / B;
                                      	} else {
                                      		tmp = -1.0 * (x / B);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      module fmin_fmax_functions
                                          implicit none
                                          private
                                          public fmax
                                          public fmin
                                      
                                          interface fmax
                                              module procedure fmax88
                                              module procedure fmax44
                                              module procedure fmax84
                                              module procedure fmax48
                                          end interface
                                          interface fmin
                                              module procedure fmin88
                                              module procedure fmin44
                                              module procedure fmin84
                                              module procedure fmin48
                                          end interface
                                      contains
                                          real(8) function fmax88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmax44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmax84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmax48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmin44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmin48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                          end function
                                      end module
                                      
                                      real(8) function code(f, b, x)
                                      use fmin_fmax_functions
                                          real(8), intent (in) :: f
                                          real(8), intent (in) :: b
                                          real(8), intent (in) :: x
                                          real(8) :: tmp
                                          if (f <= (-1.26d+32)) then
                                              tmp = (-1.0d0) / b
                                          else
                                              tmp = (-1.0d0) * (x / b)
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (F <= -1.26e+32) {
                                      		tmp = -1.0 / B;
                                      	} else {
                                      		tmp = -1.0 * (x / B);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(F, B, x):
                                      	tmp = 0
                                      	if F <= -1.26e+32:
                                      		tmp = -1.0 / B
                                      	else:
                                      		tmp = -1.0 * (x / B)
                                      	return tmp
                                      
                                      function code(F, B, x)
                                      	tmp = 0.0
                                      	if (F <= -1.26e+32)
                                      		tmp = Float64(-1.0 / B);
                                      	else
                                      		tmp = Float64(-1.0 * Float64(x / B));
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(F, B, x)
                                      	tmp = 0.0;
                                      	if (F <= -1.26e+32)
                                      		tmp = -1.0 / B;
                                      	else
                                      		tmp = -1.0 * (x / B);
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[F_, B_, x_] := If[LessEqual[F, -1.26e+32], N[(-1.0 / B), $MachinePrecision], N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      \mathbf{if}\;F \leq -1.26 \cdot 10^{+32}:\\
                                      \;\;\;\;\frac{-1}{B}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;-1 \cdot \frac{x}{B}\\
                                      
                                      
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if F < -1.26e32

                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in F around -inf

                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                        3. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                          2. lower-sin.f6417.5%

                                            \[\leadsto \frac{-1}{\sin B} \]
                                        4. Applied rewrites17.5%

                                          \[\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} \]

                                          if -1.26e32 < F

                                          1. Initial program 76.9%

                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                          2. Taylor expanded in F around -inf

                                            \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                          3. Step-by-step derivation
                                            1. lower-*.f64N/A

                                              \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                            2. lower-*.f64N/A

                                              \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                            3. lower-+.f64N/A

                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                            4. lower-/.f64N/A

                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                            5. lower-*.f64N/A

                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                            6. lower-sin.f64N/A

                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                            7. lower-/.f64N/A

                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                            8. lower-*.f64N/A

                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                            9. lower-cos.f64N/A

                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                            10. lower-*.f64N/A

                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                            11. lower-sin.f6449.8%

                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                          4. Applied rewrites49.8%

                                            \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                          5. Taylor expanded in B around 0

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                          6. Step-by-step derivation
                                            1. lower-/.f64N/A

                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                            2. lower-*.f64N/A

                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                            3. lower-+.f64N/A

                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                            4. lower-/.f64N/A

                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                            5. lower-/.f6428.4%

                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                          7. Applied rewrites28.4%

                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                          8. Taylor expanded in x around inf

                                            \[\leadsto -1 \cdot \frac{x}{B} \]
                                          9. Step-by-step derivation
                                            1. lower-/.f6428.8%

                                              \[\leadsto -1 \cdot \frac{x}{B} \]
                                          10. Applied rewrites28.8%

                                            \[\leadsto -1 \cdot \frac{x}{B} \]
                                        7. Recombined 2 regimes into one program.
                                        8. Add Preprocessing

                                        Alternative 22: 10.8% accurate, 26.5× speedup?

                                        \[\frac{-1}{B} \]
                                        (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]
                                        
                                        \frac{-1}{B}
                                        
                                        Derivation
                                        1. Initial program 76.9%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Taylor expanded in F around -inf

                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                        3. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                          2. lower-sin.f6417.5%

                                            \[\leadsto \frac{-1}{\sin B} \]
                                        4. Applied rewrites17.5%

                                          \[\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 2025193 
                                          (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))))))