VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.5% → 99.7%
Time: 7.5s
Alternatives: 28
Speedup: 1.4×

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 28 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: 77.5% 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.7% accurate, 1.0× speedup?

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

\mathbf{elif}\;F \leq 10500:\\
\;\;\;\;\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\_1\right)\\

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


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

    1. Initial program 77.5%

      \[\left(-x \cdot \frac{1}{\tan 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.5%

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

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

      if -4.5e15 < F < 10500

      1. Initial program 77.5%

        \[\left(-x \cdot \frac{1}{\tan 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.5%

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

      if 10500 < F

      1. Initial program 77.5%

        \[\left(-x \cdot \frac{1}{\tan 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.5%

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

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

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

      Alternative 2: 99.6% accurate, 1.0× speedup?

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

        1. Initial program 77.5%

          \[\left(-x \cdot \frac{1}{\tan 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.5%

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

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

          if -7e17 < F < 10500

          1. Initial program 77.5%

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

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

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

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

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

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

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

          if 10500 < F

          1. Initial program 77.5%

            \[\left(-x \cdot \frac{1}{\tan 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.5%

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

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

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

          Alternative 3: 99.1% accurate, 1.0× speedup?

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

            1. Initial program 77.5%

              \[\left(-x \cdot \frac{1}{\tan 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.5%

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

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

              if -1.5e-6 < F < 0.25

              1. Initial program 77.5%

                \[\left(-x \cdot \frac{1}{\tan 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.5%

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

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

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

                if 0.25 < F

                1. Initial program 77.5%

                  \[\left(-x \cdot \frac{1}{\tan 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.5%

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

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

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

                Alternative 4: 99.0% accurate, 1.1× speedup?

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

                  1. Initial program 77.5%

                    \[\left(-x \cdot \frac{1}{\tan 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.5%

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

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

                    if -1.05e-4 < F < 0.27000000000000002

                    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 0.27000000000000002 < F

                    1. Initial program 77.5%

                      \[\left(-x \cdot \frac{1}{\tan 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.5%

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

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

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

                    Alternative 5: 91.9% accurate, 1.3× speedup?

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

                      1. Initial program 77.5%

                        \[\left(-x \cdot \frac{1}{\tan 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.5%

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

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

                        if -1e16 < F < 4.5000000000000001e-116

                        1. Initial program 77.5%

                          \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                          \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                        5. Step-by-step derivation
                          1. Applied rewrites70.6%

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

                          if 4.5000000000000001e-116 < F < 10500

                          1. Initial program 77.5%

                            \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

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

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

                          if 10500 < F

                          1. Initial program 77.5%

                            \[\left(-x \cdot \frac{1}{\tan 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.5%

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

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

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

                          Alternative 6: 85.3% accurate, 1.4× speedup?

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

                            1. Initial program 77.5%

                              \[\left(-x \cdot \frac{1}{\tan 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.5%

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

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

                              if -1e16 < F < 4.5000000000000001e-116

                              1. Initial program 77.5%

                                \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                              5. Step-by-step derivation
                                1. Applied rewrites70.6%

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

                                if 4.5000000000000001e-116 < F < 1.45e138

                                1. Initial program 77.5%

                                  \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

                                if 1.45e138 < F

                                1. Initial program 77.5%

                                  \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                  \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                5. Step-by-step derivation
                                  1. Applied rewrites70.6%

                                    \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                  2. Taylor expanded in F around inf

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

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

                                  Alternative 7: 78.7% accurate, 1.4× speedup?

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

                                    1. Initial program 77.5%

                                      \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                      \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                    5. Step-by-step derivation
                                      1. Applied rewrites70.6%

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

                                      if -1.7600000000000001e-79 < x < 7.5000000000000006e-105

                                      1. Initial program 77.5%

                                        \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

                                    Alternative 8: 78.5% accurate, 1.4× speedup?

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

                                      1. Initial program 77.5%

                                        \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                      5. Step-by-step derivation
                                        1. Applied rewrites70.6%

                                          \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                        2. Taylor expanded in F around -inf

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

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

                                          if -1.5e-6 < F < 4.5000000000000001e-116

                                          1. Initial program 77.5%

                                            \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                            \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                          5. Step-by-step derivation
                                            1. Applied rewrites70.6%

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

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

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

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

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

                                            if 4.5000000000000001e-116 < F < 1.45e138

                                            1. Initial program 77.5%

                                              \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

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

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

                                            if 1.45e138 < F

                                            1. Initial program 77.5%

                                              \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                              \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                            5. Step-by-step derivation
                                              1. Applied rewrites70.6%

                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                              2. Taylor expanded in F around inf

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

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

                                              Alternative 9: 76.5% accurate, 1.4× speedup?

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

                                                1. Initial program 77.5%

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

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

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

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

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

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

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

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

                                                if -3.2e-50 < x < 8.5000000000000004e-105

                                                1. Initial program 77.5%

                                                  \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

                                              Alternative 10: 76.4% accurate, 1.4× speedup?

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

                                                1. Initial program 77.5%

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

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

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

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

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

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

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

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

                                                if -3.2e-50 < x < 1.6000000000000001e-100

                                                1. Initial program 77.5%

                                                  \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

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

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

                                              Alternative 11: 75.4% accurate, 1.5× speedup?

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

                                                1. Initial program 77.5%

                                                  \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                  \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                5. Step-by-step derivation
                                                  1. Applied rewrites70.6%

                                                    \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                  2. Taylor expanded in F around -inf

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

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

                                                    if -2.1499999999999999e-89 < x < 0.31

                                                    1. Initial program 77.5%

                                                      \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

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

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

                                                    if 0.31 < x

                                                    1. Initial program 77.5%

                                                      \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                      \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                    5. Step-by-step derivation
                                                      1. Applied rewrites70.6%

                                                        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                      2. Taylor expanded in F around inf

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

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

                                                      Alternative 12: 72.2% accurate, 1.5× speedup?

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

                                                        1. Initial program 77.5%

                                                          \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                          \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                        5. Step-by-step derivation
                                                          1. Applied rewrites70.6%

                                                            \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                          2. Taylor expanded in F around -inf

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

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

                                                            if -1.0999999999999999e-92 < x < 5e-80

                                                            1. Initial program 77.5%

                                                              \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

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

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

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

                                                            if 5e-80 < x

                                                            1. Initial program 77.5%

                                                              \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                              \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                            5. Step-by-step derivation
                                                              1. Applied rewrites70.6%

                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                              2. Taylor expanded in F around inf

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

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

                                                              Alternative 13: 69.2% accurate, 1.4× speedup?

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

                                                                1. Initial program 77.5%

                                                                  \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                                  \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                5. Step-by-step derivation
                                                                  1. Applied rewrites70.6%

                                                                    \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                  2. Taylor expanded in F around -inf

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

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

                                                                    if -4.3999999999999997e-27 < F < -4.6000000000000004e-277 or 1.6500000000000001e-149 < F < 0.25

                                                                    1. Initial program 77.5%

                                                                      \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      if -4.6000000000000004e-277 < F < 1.6500000000000001e-149

                                                                      1. Initial program 77.5%

                                                                        \[\left(-x \cdot \frac{1}{\tan 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 \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                                                                      3. Step-by-step derivation
                                                                        1. lower-/.f6447.8%

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

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

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

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

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

                                                                      if 0.25 < F

                                                                      1. Initial program 77.5%

                                                                        \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

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

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

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

                                                                    Alternative 14: 69.2% accurate, 1.4× speedup?

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

                                                                      1. Initial program 77.5%

                                                                        \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                                        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                      5. Step-by-step derivation
                                                                        1. Applied rewrites70.6%

                                                                          \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                        2. Taylor expanded in F around -inf

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

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

                                                                          if -4.3999999999999997e-27 < F < -4.6000000000000004e-277 or 1.6500000000000001e-149 < F < 0.25

                                                                          1. Initial program 77.5%

                                                                            \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

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

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

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

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

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

                                                                            if -4.6000000000000004e-277 < F < 1.6500000000000001e-149

                                                                            1. Initial program 77.5%

                                                                              \[\left(-x \cdot \frac{1}{\tan 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 \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                                                                            3. Step-by-step derivation
                                                                              1. lower-/.f6447.8%

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

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

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

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

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

                                                                            if 0.25 < F

                                                                            1. Initial program 77.5%

                                                                              \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

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

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

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

                                                                          Alternative 15: 69.0% accurate, 1.7× speedup?

                                                                          \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;\left|B\right| \leq 0.00072:\\ \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{\left|B\right|}\\ \mathbf{else}:\\ \;\;\;\;\left(-x \cdot \frac{1}{\tan \left(\left|B\right|\right)}\right) + \frac{F}{\left|B\right|} \cdot \frac{1}{F}\\ \end{array} \]
                                                                          (FPCore (F B x)
                                                                           :precision binary64
                                                                           (*
                                                                            (copysign 1.0 B)
                                                                            (if (<= (fabs B) 0.00072)
                                                                              (/ (- (* F (pow (+ 2.0 (fma 2.0 x (pow F 2.0))) -0.5)) x) (fabs B))
                                                                              (+ (- (* x (/ 1.0 (tan (fabs B))))) (* (/ F (fabs B)) (/ 1.0 F))))))
                                                                          double code(double F, double B, double x) {
                                                                          	double tmp;
                                                                          	if (fabs(B) <= 0.00072) {
                                                                          		tmp = ((F * pow((2.0 + fma(2.0, x, pow(F, 2.0))), -0.5)) - x) / fabs(B);
                                                                          	} else {
                                                                          		tmp = -(x * (1.0 / tan(fabs(B)))) + ((F / fabs(B)) * (1.0 / F));
                                                                          	}
                                                                          	return copysign(1.0, B) * tmp;
                                                                          }
                                                                          
                                                                          function code(F, B, x)
                                                                          	tmp = 0.0
                                                                          	if (abs(B) <= 0.00072)
                                                                          		tmp = Float64(Float64(Float64(F * (Float64(2.0 + fma(2.0, x, (F ^ 2.0))) ^ -0.5)) - x) / abs(B));
                                                                          	else
                                                                          		tmp = Float64(Float64(-Float64(x * Float64(1.0 / tan(abs(B))))) + Float64(Float64(F / abs(B)) * Float64(1.0 / F)));
                                                                          	end
                                                                          	return Float64(copysign(1.0, B) * tmp)
                                                                          end
                                                                          
                                                                          code[F_, B_, x_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[B], $MachinePrecision], 0.00072], 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] / N[Abs[B], $MachinePrecision]), $MachinePrecision], N[((-N[(x * N[(1.0 / N[Tan[N[Abs[B], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Abs[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                          
                                                                          \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
                                                                          \mathbf{if}\;\left|B\right| \leq 0.00072:\\
                                                                          \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{\left|B\right|}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\left(-x \cdot \frac{1}{\tan \left(\left|B\right|\right)}\right) + \frac{F}{\left|B\right|} \cdot \frac{1}{F}\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 2 regimes
                                                                          2. if B < 7.2000000000000005e-4

                                                                            1. Initial program 77.5%

                                                                              \[\left(-x \cdot \frac{1}{\tan 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.1%

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

                                                                            if 7.2000000000000005e-4 < B

                                                                            1. Initial program 77.5%

                                                                              \[\left(-x \cdot \frac{1}{\tan 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 \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
                                                                            3. Step-by-step derivation
                                                                              1. lower-/.f6447.8%

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

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

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

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

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

                                                                          Alternative 16: 67.7% accurate, 1.9× speedup?

                                                                          \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;\left|B\right| \leq 1.4 \cdot 10^{-12}:\\ \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{\left|B\right|}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\left|B\right|}, 1, \frac{-x}{\tan \left(\left|B\right|\right)}\right)\\ \end{array} \]
                                                                          (FPCore (F B x)
                                                                           :precision binary64
                                                                           (*
                                                                            (copysign 1.0 B)
                                                                            (if (<= (fabs B) 1.4e-12)
                                                                              (/ (- (* F (pow (+ 2.0 (fma 2.0 x (pow F 2.0))) -0.5)) x) (fabs B))
                                                                              (fma (/ 1.0 (fabs B)) 1.0 (/ (- x) (tan (fabs B)))))))
                                                                          double code(double F, double B, double x) {
                                                                          	double tmp;
                                                                          	if (fabs(B) <= 1.4e-12) {
                                                                          		tmp = ((F * pow((2.0 + fma(2.0, x, pow(F, 2.0))), -0.5)) - x) / fabs(B);
                                                                          	} else {
                                                                          		tmp = fma((1.0 / fabs(B)), 1.0, (-x / tan(fabs(B))));
                                                                          	}
                                                                          	return copysign(1.0, B) * tmp;
                                                                          }
                                                                          
                                                                          function code(F, B, x)
                                                                          	tmp = 0.0
                                                                          	if (abs(B) <= 1.4e-12)
                                                                          		tmp = Float64(Float64(Float64(F * (Float64(2.0 + fma(2.0, x, (F ^ 2.0))) ^ -0.5)) - x) / abs(B));
                                                                          	else
                                                                          		tmp = fma(Float64(1.0 / abs(B)), 1.0, Float64(Float64(-x) / tan(abs(B))));
                                                                          	end
                                                                          	return Float64(copysign(1.0, B) * tmp)
                                                                          end
                                                                          
                                                                          code[F_, B_, x_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[B], $MachinePrecision], 1.4e-12], 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] / N[Abs[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Abs[B], $MachinePrecision]), $MachinePrecision] * 1.0 + N[((-x) / N[Tan[N[Abs[B], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                          
                                                                          \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
                                                                          \mathbf{if}\;\left|B\right| \leq 1.4 \cdot 10^{-12}:\\
                                                                          \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{\left|B\right|}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\mathsf{fma}\left(\frac{1}{\left|B\right|}, 1, \frac{-x}{\tan \left(\left|B\right|\right)}\right)\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 2 regimes
                                                                          2. if B < 1.4000000000000001e-12

                                                                            1. Initial program 77.5%

                                                                              \[\left(-x \cdot \frac{1}{\tan 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.1%

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

                                                                            if 1.4000000000000001e-12 < B

                                                                            1. Initial program 77.5%

                                                                              \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                                              \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                            5. Step-by-step derivation
                                                                              1. Applied rewrites70.6%

                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                              2. Taylor expanded in F around inf

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

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

                                                                              Alternative 17: 67.7% accurate, 1.9× speedup?

                                                                              \[\begin{array}{l} t_0 := \frac{1}{\left|B\right|}\\ \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;\left|B\right| \leq 1.4 \cdot 10^{-12}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, -1 \cdot \frac{x}{\left|B\right|}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, 1, \frac{-x}{\tan \left(\left|B\right|\right)}\right)\\ \end{array} \end{array} \]
                                                                              (FPCore (F B x)
                                                                               :precision binary64
                                                                               (let* ((t_0 (/ 1.0 (fabs B))))
                                                                                 (*
                                                                                  (copysign 1.0 B)
                                                                                  (if (<= (fabs B) 1.4e-12)
                                                                                    (fma
                                                                                     t_0
                                                                                     (* (pow (fma 2.0 x (fma F F 2.0)) -0.5) F)
                                                                                     (* -1.0 (/ x (fabs B))))
                                                                                    (fma t_0 1.0 (/ (- x) (tan (fabs B))))))))
                                                                              double code(double F, double B, double x) {
                                                                              	double t_0 = 1.0 / fabs(B);
                                                                              	double tmp;
                                                                              	if (fabs(B) <= 1.4e-12) {
                                                                              		tmp = fma(t_0, (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) * F), (-1.0 * (x / fabs(B))));
                                                                              	} else {
                                                                              		tmp = fma(t_0, 1.0, (-x / tan(fabs(B))));
                                                                              	}
                                                                              	return copysign(1.0, B) * tmp;
                                                                              }
                                                                              
                                                                              function code(F, B, x)
                                                                              	t_0 = Float64(1.0 / abs(B))
                                                                              	tmp = 0.0
                                                                              	if (abs(B) <= 1.4e-12)
                                                                              		tmp = fma(t_0, Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) * F), Float64(-1.0 * Float64(x / abs(B))));
                                                                              	else
                                                                              		tmp = fma(t_0, 1.0, Float64(Float64(-x) / tan(abs(B))));
                                                                              	end
                                                                              	return Float64(copysign(1.0, B) * tmp)
                                                                              end
                                                                              
                                                                              code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Abs[B], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[B], $MachinePrecision], 1.4e-12], N[(t$95$0 * N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F), $MachinePrecision] + N[(-1.0 * N[(x / N[Abs[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * 1.0 + N[((-x) / N[Tan[N[Abs[B], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
                                                                              
                                                                              \begin{array}{l}
                                                                              t_0 := \frac{1}{\left|B\right|}\\
                                                                              \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
                                                                              \mathbf{if}\;\left|B\right| \leq 1.4 \cdot 10^{-12}:\\
                                                                              \;\;\;\;\mathsf{fma}\left(t\_0, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, -1 \cdot \frac{x}{\left|B\right|}\right)\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;\mathsf{fma}\left(t\_0, 1, \frac{-x}{\tan \left(\left|B\right|\right)}\right)\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Split input into 2 regimes
                                                                              2. if B < 1.4000000000000001e-12

                                                                                1. Initial program 77.5%

                                                                                  \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                                                  \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                                5. Step-by-step derivation
                                                                                  1. Applied rewrites70.6%

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

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

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

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

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

                                                                                  if 1.4000000000000001e-12 < B

                                                                                  1. Initial program 77.5%

                                                                                    \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                                                    \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                                  5. Step-by-step derivation
                                                                                    1. Applied rewrites70.6%

                                                                                      \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                                    2. Taylor expanded in F around inf

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

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

                                                                                    Alternative 18: 67.7% accurate, 1.9× speedup?

                                                                                    \[\begin{array}{l} t_0 := \frac{1}{\left|B\right|}\\ \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;\left|B\right| \leq 1.1 \cdot 10^{-11}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, -1 \cdot \frac{x}{\left|B\right|}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, \frac{-x}{\tan \left(\left|B\right|\right)}\right)\\ \end{array} \end{array} \]
                                                                                    (FPCore (F B x)
                                                                                     :precision binary64
                                                                                     (let* ((t_0 (/ 1.0 (fabs B))))
                                                                                       (*
                                                                                        (copysign 1.0 B)
                                                                                        (if (<= (fabs B) 1.1e-11)
                                                                                          (fma
                                                                                           t_0
                                                                                           (* (pow (fma 2.0 x (fma F F 2.0)) -0.5) F)
                                                                                           (* -1.0 (/ x (fabs B))))
                                                                                          (fma t_0 -1.0 (/ (- x) (tan (fabs B))))))))
                                                                                    double code(double F, double B, double x) {
                                                                                    	double t_0 = 1.0 / fabs(B);
                                                                                    	double tmp;
                                                                                    	if (fabs(B) <= 1.1e-11) {
                                                                                    		tmp = fma(t_0, (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) * F), (-1.0 * (x / fabs(B))));
                                                                                    	} else {
                                                                                    		tmp = fma(t_0, -1.0, (-x / tan(fabs(B))));
                                                                                    	}
                                                                                    	return copysign(1.0, B) * tmp;
                                                                                    }
                                                                                    
                                                                                    function code(F, B, x)
                                                                                    	t_0 = Float64(1.0 / abs(B))
                                                                                    	tmp = 0.0
                                                                                    	if (abs(B) <= 1.1e-11)
                                                                                    		tmp = fma(t_0, Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) * F), Float64(-1.0 * Float64(x / abs(B))));
                                                                                    	else
                                                                                    		tmp = fma(t_0, -1.0, Float64(Float64(-x) / tan(abs(B))));
                                                                                    	end
                                                                                    	return Float64(copysign(1.0, B) * tmp)
                                                                                    end
                                                                                    
                                                                                    code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Abs[B], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[B], $MachinePrecision], 1.1e-11], N[(t$95$0 * N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F), $MachinePrecision] + N[(-1.0 * N[(x / N[Abs[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * -1.0 + N[((-x) / N[Tan[N[Abs[B], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
                                                                                    
                                                                                    \begin{array}{l}
                                                                                    t_0 := \frac{1}{\left|B\right|}\\
                                                                                    \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
                                                                                    \mathbf{if}\;\left|B\right| \leq 1.1 \cdot 10^{-11}:\\
                                                                                    \;\;\;\;\mathsf{fma}\left(t\_0, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, -1 \cdot \frac{x}{\left|B\right|}\right)\\
                                                                                    
                                                                                    \mathbf{else}:\\
                                                                                    \;\;\;\;\mathsf{fma}\left(t\_0, -1, \frac{-x}{\tan \left(\left|B\right|\right)}\right)\\
                                                                                    
                                                                                    
                                                                                    \end{array}
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Split input into 2 regimes
                                                                                    2. if B < 1.1000000000000001e-11

                                                                                      1. Initial program 77.5%

                                                                                        \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                                                        \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                                      5. Step-by-step derivation
                                                                                        1. Applied rewrites70.6%

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

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

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

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

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

                                                                                        if 1.1000000000000001e-11 < B

                                                                                        1. Initial program 77.5%

                                                                                          \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                                                          \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                                        5. Step-by-step derivation
                                                                                          1. Applied rewrites70.6%

                                                                                            \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                                          2. Taylor expanded in F around -inf

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

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

                                                                                          Alternative 19: 63.8% accurate, 2.1× speedup?

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

                                                                                            1. Initial program 77.5%

                                                                                              \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

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

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

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

                                                                                            if -4.5e15 < F < 250

                                                                                            1. Initial program 77.5%

                                                                                              \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                                                              \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                                            5. Step-by-step derivation
                                                                                              1. Applied rewrites70.6%

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

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

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

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

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

                                                                                              if 250 < F

                                                                                              1. Initial program 77.5%

                                                                                                \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

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

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

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

                                                                                            Alternative 20: 57.5% accurate, 2.2× speedup?

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

                                                                                              1. Initial program 77.5%

                                                                                                \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

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

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

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

                                                                                              if -4.5e15 < F < 4.6e11

                                                                                              1. Initial program 77.5%

                                                                                                \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                                              5. Step-by-step derivation
                                                                                                1. Applied rewrites70.6%

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

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

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

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

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

                                                                                                if 4.6e11 < F

                                                                                                1. Initial program 77.5%

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

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

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

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

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

                                                                                              Alternative 21: 49.8% accurate, 2.0× speedup?

                                                                                              \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;\left|B\right| \leq 490000:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\left|B\right|}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, -1 \cdot \frac{x}{\left|B\right|}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin \left(\left|B\right|\right)}\\ \end{array} \]
                                                                                              (FPCore (F B x)
                                                                                               :precision binary64
                                                                                               (*
                                                                                                (copysign 1.0 B)
                                                                                                (if (<= (fabs B) 490000.0)
                                                                                                  (fma
                                                                                                   (/ 1.0 (fabs B))
                                                                                                   (* (pow (fma 2.0 x (fma F F 2.0)) -0.5) F)
                                                                                                   (* -1.0 (/ x (fabs B))))
                                                                                                  (/ 1.0 (sin (fabs B))))))
                                                                                              double code(double F, double B, double x) {
                                                                                              	double tmp;
                                                                                              	if (fabs(B) <= 490000.0) {
                                                                                              		tmp = fma((1.0 / fabs(B)), (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) * F), (-1.0 * (x / fabs(B))));
                                                                                              	} else {
                                                                                              		tmp = 1.0 / sin(fabs(B));
                                                                                              	}
                                                                                              	return copysign(1.0, B) * tmp;
                                                                                              }
                                                                                              
                                                                                              function code(F, B, x)
                                                                                              	tmp = 0.0
                                                                                              	if (abs(B) <= 490000.0)
                                                                                              		tmp = fma(Float64(1.0 / abs(B)), Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) * F), Float64(-1.0 * Float64(x / abs(B))));
                                                                                              	else
                                                                                              		tmp = Float64(1.0 / sin(abs(B)));
                                                                                              	end
                                                                                              	return Float64(copysign(1.0, B) * tmp)
                                                                                              end
                                                                                              
                                                                                              code[F_, B_, x_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[B], $MachinePrecision], 490000.0], N[(N[(1.0 / N[Abs[B], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F), $MachinePrecision] + N[(-1.0 * N[(x / N[Abs[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[N[Abs[B], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                              
                                                                                              \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
                                                                                              \mathbf{if}\;\left|B\right| \leq 490000:\\
                                                                                              \;\;\;\;\mathsf{fma}\left(\frac{1}{\left|B\right|}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, -1 \cdot \frac{x}{\left|B\right|}\right)\\
                                                                                              
                                                                                              \mathbf{else}:\\
                                                                                              \;\;\;\;\frac{1}{\sin \left(\left|B\right|\right)}\\
                                                                                              
                                                                                              
                                                                                              \end{array}
                                                                                              
                                                                                              Derivation
                                                                                              1. Split input into 2 regimes
                                                                                              2. if B < 4.9e5

                                                                                                1. Initial program 77.5%

                                                                                                  \[\left(-x \cdot \frac{1}{\tan 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.5%

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

                                                                                                  \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{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) \]
                                                                                                5. Step-by-step derivation
                                                                                                  1. Applied rewrites70.6%

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

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

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

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

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

                                                                                                  if 4.9e5 < B

                                                                                                  1. Initial program 77.5%

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

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

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

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

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

                                                                                                Alternative 22: 49.8% accurate, 2.1× speedup?

                                                                                                \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;\left|B\right| \leq 490000:\\ \;\;\;\;\mathsf{fma}\left({\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{1}{\left|B\right|}, F, -\frac{x}{\left|B\right|}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin \left(\left|B\right|\right)}\\ \end{array} \]
                                                                                                (FPCore (F B x)
                                                                                                 :precision binary64
                                                                                                 (*
                                                                                                  (copysign 1.0 B)
                                                                                                  (if (<= (fabs B) 490000.0)
                                                                                                    (fma
                                                                                                     (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) (/ 1.0 (fabs B)))
                                                                                                     F
                                                                                                     (- (/ x (fabs B))))
                                                                                                    (/ 1.0 (sin (fabs B))))))
                                                                                                double code(double F, double B, double x) {
                                                                                                	double tmp;
                                                                                                	if (fabs(B) <= 490000.0) {
                                                                                                		tmp = fma((pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * (1.0 / fabs(B))), F, -(x / fabs(B)));
                                                                                                	} else {
                                                                                                		tmp = 1.0 / sin(fabs(B));
                                                                                                	}
                                                                                                	return copysign(1.0, B) * tmp;
                                                                                                }
                                                                                                
                                                                                                function code(F, B, x)
                                                                                                	tmp = 0.0
                                                                                                	if (abs(B) <= 490000.0)
                                                                                                		tmp = fma(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * Float64(1.0 / abs(B))), F, Float64(-Float64(x / abs(B))));
                                                                                                	else
                                                                                                		tmp = Float64(1.0 / sin(abs(B)));
                                                                                                	end
                                                                                                	return Float64(copysign(1.0, B) * tmp)
                                                                                                end
                                                                                                
                                                                                                code[F_, B_, x_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[B], $MachinePrecision], 490000.0], N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(1.0 / N[Abs[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * F + (-N[(x / N[Abs[B], $MachinePrecision]), $MachinePrecision])), $MachinePrecision], N[(1.0 / N[Sin[N[Abs[B], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                                
                                                                                                \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
                                                                                                \mathbf{if}\;\left|B\right| \leq 490000:\\
                                                                                                \;\;\;\;\mathsf{fma}\left({\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{1}{\left|B\right|}, F, -\frac{x}{\left|B\right|}\right)\\
                                                                                                
                                                                                                \mathbf{else}:\\
                                                                                                \;\;\;\;\frac{1}{\sin \left(\left|B\right|\right)}\\
                                                                                                
                                                                                                
                                                                                                \end{array}
                                                                                                
                                                                                                Derivation
                                                                                                1. Split input into 2 regimes
                                                                                                2. if B < 4.9e5

                                                                                                  1. Initial program 77.5%

                                                                                                    \[\left(-x \cdot \frac{1}{\tan 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.4%

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

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

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

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

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

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

                                                                                                  if 4.9e5 < B

                                                                                                  1. Initial program 77.5%

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

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

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

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

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

                                                                                                Alternative 23: 33.1% accurate, 2.6× speedup?

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

                                                                                                  1. Initial program 77.5%

                                                                                                    \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

                                                                                                  if -1e-135 < F < 3.3000000000000002e-6

                                                                                                  1. Initial program 77.5%

                                                                                                    \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

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

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

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

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

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

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

                                                                                                      \[\leadsto \frac{-1}{B \cdot \left(1 + {B}^{2} \cdot \left(\frac{1}{120} \cdot {B}^{2} - \frac{1}{6}\right)\right)} \]
                                                                                                    7. lower-pow.f6410.3%

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

                                                                                                    \[\leadsto \frac{-1}{B \cdot \color{blue}{\left(1 + {B}^{2} \cdot \left(0.008333333333333333 \cdot {B}^{2} - 0.16666666666666666\right)\right)}} \]
                                                                                                  8. Taylor expanded in B around inf

                                                                                                    \[\leadsto \frac{-1}{\frac{1}{120} \cdot {B}^{\color{blue}{5}}} \]
                                                                                                  9. Step-by-step derivation
                                                                                                    1. lower-*.f64N/A

                                                                                                      \[\leadsto \frac{-1}{\frac{1}{120} \cdot {B}^{5}} \]
                                                                                                    2. lower-pow.f649.9%

                                                                                                      \[\leadsto \frac{-1}{0.008333333333333333 \cdot {B}^{5}} \]
                                                                                                  10. Applied rewrites9.9%

                                                                                                    \[\leadsto \frac{-1}{0.008333333333333333 \cdot {B}^{\color{blue}{5}}} \]

                                                                                                  if 3.3000000000000002e-6 < F

                                                                                                  1. Initial program 77.5%

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

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

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

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

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

                                                                                                Alternative 24: 25.9% accurate, 2.5× speedup?

                                                                                                \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;F \leq -1 \cdot 10^{-135}:\\ \;\;\;\;\frac{-1}{\sin \left(\left|B\right|\right)}\\ \mathbf{elif}\;F \leq 270000000000:\\ \;\;\;\;\frac{-1}{0.008333333333333333 \cdot {\left(\left|B\right|\right)}^{5}}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{1}{\left|B\right|}\right|\\ \end{array} \]
                                                                                                (FPCore (F B x)
                                                                                                 :precision binary64
                                                                                                 (*
                                                                                                  (copysign 1.0 B)
                                                                                                  (if (<= F -1e-135)
                                                                                                    (/ -1.0 (sin (fabs B)))
                                                                                                    (if (<= F 270000000000.0)
                                                                                                      (/ -1.0 (* 0.008333333333333333 (pow (fabs B) 5.0)))
                                                                                                      (fabs (/ 1.0 (fabs B)))))))
                                                                                                double code(double F, double B, double x) {
                                                                                                	double tmp;
                                                                                                	if (F <= -1e-135) {
                                                                                                		tmp = -1.0 / sin(fabs(B));
                                                                                                	} else if (F <= 270000000000.0) {
                                                                                                		tmp = -1.0 / (0.008333333333333333 * pow(fabs(B), 5.0));
                                                                                                	} else {
                                                                                                		tmp = fabs((1.0 / fabs(B)));
                                                                                                	}
                                                                                                	return copysign(1.0, B) * tmp;
                                                                                                }
                                                                                                
                                                                                                public static double code(double F, double B, double x) {
                                                                                                	double tmp;
                                                                                                	if (F <= -1e-135) {
                                                                                                		tmp = -1.0 / Math.sin(Math.abs(B));
                                                                                                	} else if (F <= 270000000000.0) {
                                                                                                		tmp = -1.0 / (0.008333333333333333 * Math.pow(Math.abs(B), 5.0));
                                                                                                	} else {
                                                                                                		tmp = Math.abs((1.0 / Math.abs(B)));
                                                                                                	}
                                                                                                	return Math.copySign(1.0, B) * tmp;
                                                                                                }
                                                                                                
                                                                                                def code(F, B, x):
                                                                                                	tmp = 0
                                                                                                	if F <= -1e-135:
                                                                                                		tmp = -1.0 / math.sin(math.fabs(B))
                                                                                                	elif F <= 270000000000.0:
                                                                                                		tmp = -1.0 / (0.008333333333333333 * math.pow(math.fabs(B), 5.0))
                                                                                                	else:
                                                                                                		tmp = math.fabs((1.0 / math.fabs(B)))
                                                                                                	return math.copysign(1.0, B) * tmp
                                                                                                
                                                                                                function code(F, B, x)
                                                                                                	tmp = 0.0
                                                                                                	if (F <= -1e-135)
                                                                                                		tmp = Float64(-1.0 / sin(abs(B)));
                                                                                                	elseif (F <= 270000000000.0)
                                                                                                		tmp = Float64(-1.0 / Float64(0.008333333333333333 * (abs(B) ^ 5.0)));
                                                                                                	else
                                                                                                		tmp = abs(Float64(1.0 / abs(B)));
                                                                                                	end
                                                                                                	return Float64(copysign(1.0, B) * tmp)
                                                                                                end
                                                                                                
                                                                                                function tmp_2 = code(F, B, x)
                                                                                                	tmp = 0.0;
                                                                                                	if (F <= -1e-135)
                                                                                                		tmp = -1.0 / sin(abs(B));
                                                                                                	elseif (F <= 270000000000.0)
                                                                                                		tmp = -1.0 / (0.008333333333333333 * (abs(B) ^ 5.0));
                                                                                                	else
                                                                                                		tmp = abs((1.0 / abs(B)));
                                                                                                	end
                                                                                                	tmp_2 = (sign(B) * abs(1.0)) * tmp;
                                                                                                end
                                                                                                
                                                                                                code[F_, B_, x_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[F, -1e-135], N[(-1.0 / N[Sin[N[Abs[B], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 270000000000.0], N[(-1.0 / N[(0.008333333333333333 * N[Power[N[Abs[B], $MachinePrecision], 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Abs[N[(1.0 / N[Abs[B], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]), $MachinePrecision]
                                                                                                
                                                                                                \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
                                                                                                \mathbf{if}\;F \leq -1 \cdot 10^{-135}:\\
                                                                                                \;\;\;\;\frac{-1}{\sin \left(\left|B\right|\right)}\\
                                                                                                
                                                                                                \mathbf{elif}\;F \leq 270000000000:\\
                                                                                                \;\;\;\;\frac{-1}{0.008333333333333333 \cdot {\left(\left|B\right|\right)}^{5}}\\
                                                                                                
                                                                                                \mathbf{else}:\\
                                                                                                \;\;\;\;\left|\frac{1}{\left|B\right|}\right|\\
                                                                                                
                                                                                                
                                                                                                \end{array}
                                                                                                
                                                                                                Derivation
                                                                                                1. Split input into 3 regimes
                                                                                                2. if F < -1e-135

                                                                                                  1. Initial program 77.5%

                                                                                                    \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

                                                                                                  if -1e-135 < F < 2.7e11

                                                                                                  1. Initial program 77.5%

                                                                                                    \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

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

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

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

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

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

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

                                                                                                      \[\leadsto \frac{-1}{B \cdot \left(1 + {B}^{2} \cdot \left(\frac{1}{120} \cdot {B}^{2} - \frac{1}{6}\right)\right)} \]
                                                                                                    7. lower-pow.f6410.3%

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

                                                                                                    \[\leadsto \frac{-1}{B \cdot \color{blue}{\left(1 + {B}^{2} \cdot \left(0.008333333333333333 \cdot {B}^{2} - 0.16666666666666666\right)\right)}} \]
                                                                                                  8. Taylor expanded in B around inf

                                                                                                    \[\leadsto \frac{-1}{\frac{1}{120} \cdot {B}^{\color{blue}{5}}} \]
                                                                                                  9. Step-by-step derivation
                                                                                                    1. lower-*.f64N/A

                                                                                                      \[\leadsto \frac{-1}{\frac{1}{120} \cdot {B}^{5}} \]
                                                                                                    2. lower-pow.f649.9%

                                                                                                      \[\leadsto \frac{-1}{0.008333333333333333 \cdot {B}^{5}} \]
                                                                                                  10. Applied rewrites9.9%

                                                                                                    \[\leadsto \frac{-1}{0.008333333333333333 \cdot {B}^{\color{blue}{5}}} \]

                                                                                                  if 2.7e11 < F

                                                                                                  1. Initial program 77.5%

                                                                                                    \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

                                                                                                      \[\leadsto \frac{-1}{B} \]
                                                                                                    2. Step-by-step derivation
                                                                                                      1. lift-/.f64N/A

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

                                                                                                        \[\leadsto \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
                                                                                                      3. metadata-evalN/A

                                                                                                        \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                                                      4. inv-powN/A

                                                                                                        \[\leadsto {\left(\mathsf{neg}\left(B\right)\right)}^{\color{blue}{-1}} \]
                                                                                                      5. pow-to-expN/A

                                                                                                        \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                      6. lower-unsound-exp.f64N/A

                                                                                                        \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                      7. lower-unsound-*.f64N/A

                                                                                                        \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                      8. lower-unsound-log.f64N/A

                                                                                                        \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                      9. lower-neg.f644.9%

                                                                                                        \[\leadsto e^{\log \left(-B\right) \cdot -1} \]
                                                                                                    3. Applied rewrites4.9%

                                                                                                      \[\leadsto e^{\log \left(-B\right) \cdot -1} \]
                                                                                                    4. Step-by-step derivation
                                                                                                      1. lift-exp.f64N/A

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

                                                                                                        \[\leadsto e^{\log \left(-B\right) \cdot -1} \]
                                                                                                      3. exp-prodN/A

                                                                                                        \[\leadsto {\left(e^{\log \left(-B\right)}\right)}^{\color{blue}{-1}} \]
                                                                                                      4. unpow-1N/A

                                                                                                        \[\leadsto \frac{1}{\color{blue}{e^{\log \left(-B\right)}}} \]
                                                                                                      5. metadata-evalN/A

                                                                                                        \[\leadsto \frac{\left|1\right|}{e^{\color{blue}{\log \left(-B\right)}}} \]
                                                                                                      6. exp-fabsN/A

                                                                                                        \[\leadsto \frac{\left|1\right|}{\left|e^{\log \left(-B\right)}\right|} \]
                                                                                                      7. lift-log.f64N/A

                                                                                                        \[\leadsto \frac{\left|1\right|}{\left|e^{\log \left(-B\right)}\right|} \]
                                                                                                      8. rem-exp-logN/A

                                                                                                        \[\leadsto \frac{\left|1\right|}{\left|-B\right|} \]
                                                                                                      9. lift-neg.f64N/A

                                                                                                        \[\leadsto \frac{\left|1\right|}{\left|\mathsf{neg}\left(B\right)\right|} \]
                                                                                                      10. fabs-negN/A

                                                                                                        \[\leadsto \frac{\left|1\right|}{\left|B\right|} \]
                                                                                                      11. fabs-divN/A

                                                                                                        \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                      12. lift-/.f64N/A

                                                                                                        \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                      13. lower-fabs.f6410.3%

                                                                                                        \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                    5. Applied rewrites10.3%

                                                                                                      \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                  7. Recombined 3 regimes into one program.
                                                                                                  8. Add Preprocessing

                                                                                                  Alternative 25: 19.7% accurate, 3.1× speedup?

                                                                                                  \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;F \leq -0.0005:\\ \;\;\;\;\frac{-0.16666666666666666 \cdot {\left(\left|B\right|\right)}^{2} - 1}{\left|B\right|}\\ \mathbf{elif}\;F \leq 270000000000:\\ \;\;\;\;\frac{-1}{0.008333333333333333 \cdot {\left(\left|B\right|\right)}^{5}}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{1}{\left|B\right|}\right|\\ \end{array} \]
                                                                                                  (FPCore (F B x)
                                                                                                   :precision binary64
                                                                                                   (*
                                                                                                    (copysign 1.0 B)
                                                                                                    (if (<= F -0.0005)
                                                                                                      (/ (- (* -0.16666666666666666 (pow (fabs B) 2.0)) 1.0) (fabs B))
                                                                                                      (if (<= F 270000000000.0)
                                                                                                        (/ -1.0 (* 0.008333333333333333 (pow (fabs B) 5.0)))
                                                                                                        (fabs (/ 1.0 (fabs B)))))))
                                                                                                  double code(double F, double B, double x) {
                                                                                                  	double tmp;
                                                                                                  	if (F <= -0.0005) {
                                                                                                  		tmp = ((-0.16666666666666666 * pow(fabs(B), 2.0)) - 1.0) / fabs(B);
                                                                                                  	} else if (F <= 270000000000.0) {
                                                                                                  		tmp = -1.0 / (0.008333333333333333 * pow(fabs(B), 5.0));
                                                                                                  	} else {
                                                                                                  		tmp = fabs((1.0 / fabs(B)));
                                                                                                  	}
                                                                                                  	return copysign(1.0, B) * tmp;
                                                                                                  }
                                                                                                  
                                                                                                  public static double code(double F, double B, double x) {
                                                                                                  	double tmp;
                                                                                                  	if (F <= -0.0005) {
                                                                                                  		tmp = ((-0.16666666666666666 * Math.pow(Math.abs(B), 2.0)) - 1.0) / Math.abs(B);
                                                                                                  	} else if (F <= 270000000000.0) {
                                                                                                  		tmp = -1.0 / (0.008333333333333333 * Math.pow(Math.abs(B), 5.0));
                                                                                                  	} else {
                                                                                                  		tmp = Math.abs((1.0 / Math.abs(B)));
                                                                                                  	}
                                                                                                  	return Math.copySign(1.0, B) * tmp;
                                                                                                  }
                                                                                                  
                                                                                                  def code(F, B, x):
                                                                                                  	tmp = 0
                                                                                                  	if F <= -0.0005:
                                                                                                  		tmp = ((-0.16666666666666666 * math.pow(math.fabs(B), 2.0)) - 1.0) / math.fabs(B)
                                                                                                  	elif F <= 270000000000.0:
                                                                                                  		tmp = -1.0 / (0.008333333333333333 * math.pow(math.fabs(B), 5.0))
                                                                                                  	else:
                                                                                                  		tmp = math.fabs((1.0 / math.fabs(B)))
                                                                                                  	return math.copysign(1.0, B) * tmp
                                                                                                  
                                                                                                  function code(F, B, x)
                                                                                                  	tmp = 0.0
                                                                                                  	if (F <= -0.0005)
                                                                                                  		tmp = Float64(Float64(Float64(-0.16666666666666666 * (abs(B) ^ 2.0)) - 1.0) / abs(B));
                                                                                                  	elseif (F <= 270000000000.0)
                                                                                                  		tmp = Float64(-1.0 / Float64(0.008333333333333333 * (abs(B) ^ 5.0)));
                                                                                                  	else
                                                                                                  		tmp = abs(Float64(1.0 / abs(B)));
                                                                                                  	end
                                                                                                  	return Float64(copysign(1.0, B) * tmp)
                                                                                                  end
                                                                                                  
                                                                                                  function tmp_2 = code(F, B, x)
                                                                                                  	tmp = 0.0;
                                                                                                  	if (F <= -0.0005)
                                                                                                  		tmp = ((-0.16666666666666666 * (abs(B) ^ 2.0)) - 1.0) / abs(B);
                                                                                                  	elseif (F <= 270000000000.0)
                                                                                                  		tmp = -1.0 / (0.008333333333333333 * (abs(B) ^ 5.0));
                                                                                                  	else
                                                                                                  		tmp = abs((1.0 / abs(B)));
                                                                                                  	end
                                                                                                  	tmp_2 = (sign(B) * abs(1.0)) * tmp;
                                                                                                  end
                                                                                                  
                                                                                                  code[F_, B_, x_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[F, -0.0005], N[(N[(N[(-0.16666666666666666 * N[Power[N[Abs[B], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / N[Abs[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 270000000000.0], N[(-1.0 / N[(0.008333333333333333 * N[Power[N[Abs[B], $MachinePrecision], 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Abs[N[(1.0 / N[Abs[B], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]), $MachinePrecision]
                                                                                                  
                                                                                                  \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
                                                                                                  \mathbf{if}\;F \leq -0.0005:\\
                                                                                                  \;\;\;\;\frac{-0.16666666666666666 \cdot {\left(\left|B\right|\right)}^{2} - 1}{\left|B\right|}\\
                                                                                                  
                                                                                                  \mathbf{elif}\;F \leq 270000000000:\\
                                                                                                  \;\;\;\;\frac{-1}{0.008333333333333333 \cdot {\left(\left|B\right|\right)}^{5}}\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;\left|\frac{1}{\left|B\right|}\right|\\
                                                                                                  
                                                                                                  
                                                                                                  \end{array}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Split input into 3 regimes
                                                                                                  2. if F < -5.0000000000000001e-4

                                                                                                    1. Initial program 77.5%

                                                                                                      \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

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

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

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

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

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

                                                                                                      \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{\color{blue}{B}} \]

                                                                                                    if -5.0000000000000001e-4 < F < 2.7e11

                                                                                                    1. Initial program 77.5%

                                                                                                      \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

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

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

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

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

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

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

                                                                                                        \[\leadsto \frac{-1}{B \cdot \left(1 + {B}^{2} \cdot \left(\frac{1}{120} \cdot {B}^{2} - \frac{1}{6}\right)\right)} \]
                                                                                                      7. lower-pow.f6410.3%

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

                                                                                                      \[\leadsto \frac{-1}{B \cdot \color{blue}{\left(1 + {B}^{2} \cdot \left(0.008333333333333333 \cdot {B}^{2} - 0.16666666666666666\right)\right)}} \]
                                                                                                    8. Taylor expanded in B around inf

                                                                                                      \[\leadsto \frac{-1}{\frac{1}{120} \cdot {B}^{\color{blue}{5}}} \]
                                                                                                    9. Step-by-step derivation
                                                                                                      1. lower-*.f64N/A

                                                                                                        \[\leadsto \frac{-1}{\frac{1}{120} \cdot {B}^{5}} \]
                                                                                                      2. lower-pow.f649.9%

                                                                                                        \[\leadsto \frac{-1}{0.008333333333333333 \cdot {B}^{5}} \]
                                                                                                    10. Applied rewrites9.9%

                                                                                                      \[\leadsto \frac{-1}{0.008333333333333333 \cdot {B}^{\color{blue}{5}}} \]

                                                                                                    if 2.7e11 < F

                                                                                                    1. Initial program 77.5%

                                                                                                      \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

                                                                                                        \[\leadsto \frac{-1}{B} \]
                                                                                                      2. Step-by-step derivation
                                                                                                        1. lift-/.f64N/A

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

                                                                                                          \[\leadsto \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
                                                                                                        3. metadata-evalN/A

                                                                                                          \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                                                        4. inv-powN/A

                                                                                                          \[\leadsto {\left(\mathsf{neg}\left(B\right)\right)}^{\color{blue}{-1}} \]
                                                                                                        5. pow-to-expN/A

                                                                                                          \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                        6. lower-unsound-exp.f64N/A

                                                                                                          \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                        7. lower-unsound-*.f64N/A

                                                                                                          \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                        8. lower-unsound-log.f64N/A

                                                                                                          \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                        9. lower-neg.f644.9%

                                                                                                          \[\leadsto e^{\log \left(-B\right) \cdot -1} \]
                                                                                                      3. Applied rewrites4.9%

                                                                                                        \[\leadsto e^{\log \left(-B\right) \cdot -1} \]
                                                                                                      4. Step-by-step derivation
                                                                                                        1. lift-exp.f64N/A

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

                                                                                                          \[\leadsto e^{\log \left(-B\right) \cdot -1} \]
                                                                                                        3. exp-prodN/A

                                                                                                          \[\leadsto {\left(e^{\log \left(-B\right)}\right)}^{\color{blue}{-1}} \]
                                                                                                        4. unpow-1N/A

                                                                                                          \[\leadsto \frac{1}{\color{blue}{e^{\log \left(-B\right)}}} \]
                                                                                                        5. metadata-evalN/A

                                                                                                          \[\leadsto \frac{\left|1\right|}{e^{\color{blue}{\log \left(-B\right)}}} \]
                                                                                                        6. exp-fabsN/A

                                                                                                          \[\leadsto \frac{\left|1\right|}{\left|e^{\log \left(-B\right)}\right|} \]
                                                                                                        7. lift-log.f64N/A

                                                                                                          \[\leadsto \frac{\left|1\right|}{\left|e^{\log \left(-B\right)}\right|} \]
                                                                                                        8. rem-exp-logN/A

                                                                                                          \[\leadsto \frac{\left|1\right|}{\left|-B\right|} \]
                                                                                                        9. lift-neg.f64N/A

                                                                                                          \[\leadsto \frac{\left|1\right|}{\left|\mathsf{neg}\left(B\right)\right|} \]
                                                                                                        10. fabs-negN/A

                                                                                                          \[\leadsto \frac{\left|1\right|}{\left|B\right|} \]
                                                                                                        11. fabs-divN/A

                                                                                                          \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                        12. lift-/.f64N/A

                                                                                                          \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                        13. lower-fabs.f6410.3%

                                                                                                          \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                      5. Applied rewrites10.3%

                                                                                                        \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                    7. Recombined 3 regimes into one program.
                                                                                                    8. Add Preprocessing

                                                                                                    Alternative 26: 19.1% accurate, 3.1× speedup?

                                                                                                    \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;F \leq -1.4 \cdot 10^{-139}:\\ \;\;\;\;\frac{-1}{\left|B\right|}\\ \mathbf{elif}\;F \leq 270000000000:\\ \;\;\;\;\frac{-1}{0.008333333333333333 \cdot {\left(\left|B\right|\right)}^{5}}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{1}{\left|B\right|}\right|\\ \end{array} \]
                                                                                                    (FPCore (F B x)
                                                                                                     :precision binary64
                                                                                                     (*
                                                                                                      (copysign 1.0 B)
                                                                                                      (if (<= F -1.4e-139)
                                                                                                        (/ -1.0 (fabs B))
                                                                                                        (if (<= F 270000000000.0)
                                                                                                          (/ -1.0 (* 0.008333333333333333 (pow (fabs B) 5.0)))
                                                                                                          (fabs (/ 1.0 (fabs B)))))))
                                                                                                    double code(double F, double B, double x) {
                                                                                                    	double tmp;
                                                                                                    	if (F <= -1.4e-139) {
                                                                                                    		tmp = -1.0 / fabs(B);
                                                                                                    	} else if (F <= 270000000000.0) {
                                                                                                    		tmp = -1.0 / (0.008333333333333333 * pow(fabs(B), 5.0));
                                                                                                    	} else {
                                                                                                    		tmp = fabs((1.0 / fabs(B)));
                                                                                                    	}
                                                                                                    	return copysign(1.0, B) * tmp;
                                                                                                    }
                                                                                                    
                                                                                                    public static double code(double F, double B, double x) {
                                                                                                    	double tmp;
                                                                                                    	if (F <= -1.4e-139) {
                                                                                                    		tmp = -1.0 / Math.abs(B);
                                                                                                    	} else if (F <= 270000000000.0) {
                                                                                                    		tmp = -1.0 / (0.008333333333333333 * Math.pow(Math.abs(B), 5.0));
                                                                                                    	} else {
                                                                                                    		tmp = Math.abs((1.0 / Math.abs(B)));
                                                                                                    	}
                                                                                                    	return Math.copySign(1.0, B) * tmp;
                                                                                                    }
                                                                                                    
                                                                                                    def code(F, B, x):
                                                                                                    	tmp = 0
                                                                                                    	if F <= -1.4e-139:
                                                                                                    		tmp = -1.0 / math.fabs(B)
                                                                                                    	elif F <= 270000000000.0:
                                                                                                    		tmp = -1.0 / (0.008333333333333333 * math.pow(math.fabs(B), 5.0))
                                                                                                    	else:
                                                                                                    		tmp = math.fabs((1.0 / math.fabs(B)))
                                                                                                    	return math.copysign(1.0, B) * tmp
                                                                                                    
                                                                                                    function code(F, B, x)
                                                                                                    	tmp = 0.0
                                                                                                    	if (F <= -1.4e-139)
                                                                                                    		tmp = Float64(-1.0 / abs(B));
                                                                                                    	elseif (F <= 270000000000.0)
                                                                                                    		tmp = Float64(-1.0 / Float64(0.008333333333333333 * (abs(B) ^ 5.0)));
                                                                                                    	else
                                                                                                    		tmp = abs(Float64(1.0 / abs(B)));
                                                                                                    	end
                                                                                                    	return Float64(copysign(1.0, B) * tmp)
                                                                                                    end
                                                                                                    
                                                                                                    function tmp_2 = code(F, B, x)
                                                                                                    	tmp = 0.0;
                                                                                                    	if (F <= -1.4e-139)
                                                                                                    		tmp = -1.0 / abs(B);
                                                                                                    	elseif (F <= 270000000000.0)
                                                                                                    		tmp = -1.0 / (0.008333333333333333 * (abs(B) ^ 5.0));
                                                                                                    	else
                                                                                                    		tmp = abs((1.0 / abs(B)));
                                                                                                    	end
                                                                                                    	tmp_2 = (sign(B) * abs(1.0)) * tmp;
                                                                                                    end
                                                                                                    
                                                                                                    code[F_, B_, x_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[F, -1.4e-139], N[(-1.0 / N[Abs[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 270000000000.0], N[(-1.0 / N[(0.008333333333333333 * N[Power[N[Abs[B], $MachinePrecision], 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Abs[N[(1.0 / N[Abs[B], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]), $MachinePrecision]
                                                                                                    
                                                                                                    \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
                                                                                                    \mathbf{if}\;F \leq -1.4 \cdot 10^{-139}:\\
                                                                                                    \;\;\;\;\frac{-1}{\left|B\right|}\\
                                                                                                    
                                                                                                    \mathbf{elif}\;F \leq 270000000000:\\
                                                                                                    \;\;\;\;\frac{-1}{0.008333333333333333 \cdot {\left(\left|B\right|\right)}^{5}}\\
                                                                                                    
                                                                                                    \mathbf{else}:\\
                                                                                                    \;\;\;\;\left|\frac{1}{\left|B\right|}\right|\\
                                                                                                    
                                                                                                    
                                                                                                    \end{array}
                                                                                                    
                                                                                                    Derivation
                                                                                                    1. Split input into 3 regimes
                                                                                                    2. if F < -1.3999999999999999e-139

                                                                                                      1. Initial program 77.5%

                                                                                                        \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

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

                                                                                                        if -1.3999999999999999e-139 < F < 2.7e11

                                                                                                        1. Initial program 77.5%

                                                                                                          \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

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

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

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

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

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

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

                                                                                                            \[\leadsto \frac{-1}{B \cdot \left(1 + {B}^{2} \cdot \left(\frac{1}{120} \cdot {B}^{2} - \frac{1}{6}\right)\right)} \]
                                                                                                          7. lower-pow.f6410.3%

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

                                                                                                          \[\leadsto \frac{-1}{B \cdot \color{blue}{\left(1 + {B}^{2} \cdot \left(0.008333333333333333 \cdot {B}^{2} - 0.16666666666666666\right)\right)}} \]
                                                                                                        8. Taylor expanded in B around inf

                                                                                                          \[\leadsto \frac{-1}{\frac{1}{120} \cdot {B}^{\color{blue}{5}}} \]
                                                                                                        9. Step-by-step derivation
                                                                                                          1. lower-*.f64N/A

                                                                                                            \[\leadsto \frac{-1}{\frac{1}{120} \cdot {B}^{5}} \]
                                                                                                          2. lower-pow.f649.9%

                                                                                                            \[\leadsto \frac{-1}{0.008333333333333333 \cdot {B}^{5}} \]
                                                                                                        10. Applied rewrites9.9%

                                                                                                          \[\leadsto \frac{-1}{0.008333333333333333 \cdot {B}^{\color{blue}{5}}} \]

                                                                                                        if 2.7e11 < F

                                                                                                        1. Initial program 77.5%

                                                                                                          \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

                                                                                                            \[\leadsto \frac{-1}{B} \]
                                                                                                          2. Step-by-step derivation
                                                                                                            1. lift-/.f64N/A

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

                                                                                                              \[\leadsto \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
                                                                                                            3. metadata-evalN/A

                                                                                                              \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                                                            4. inv-powN/A

                                                                                                              \[\leadsto {\left(\mathsf{neg}\left(B\right)\right)}^{\color{blue}{-1}} \]
                                                                                                            5. pow-to-expN/A

                                                                                                              \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                            6. lower-unsound-exp.f64N/A

                                                                                                              \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                            7. lower-unsound-*.f64N/A

                                                                                                              \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                            8. lower-unsound-log.f64N/A

                                                                                                              \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                            9. lower-neg.f644.9%

                                                                                                              \[\leadsto e^{\log \left(-B\right) \cdot -1} \]
                                                                                                          3. Applied rewrites4.9%

                                                                                                            \[\leadsto e^{\log \left(-B\right) \cdot -1} \]
                                                                                                          4. Step-by-step derivation
                                                                                                            1. lift-exp.f64N/A

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

                                                                                                              \[\leadsto e^{\log \left(-B\right) \cdot -1} \]
                                                                                                            3. exp-prodN/A

                                                                                                              \[\leadsto {\left(e^{\log \left(-B\right)}\right)}^{\color{blue}{-1}} \]
                                                                                                            4. unpow-1N/A

                                                                                                              \[\leadsto \frac{1}{\color{blue}{e^{\log \left(-B\right)}}} \]
                                                                                                            5. metadata-evalN/A

                                                                                                              \[\leadsto \frac{\left|1\right|}{e^{\color{blue}{\log \left(-B\right)}}} \]
                                                                                                            6. exp-fabsN/A

                                                                                                              \[\leadsto \frac{\left|1\right|}{\left|e^{\log \left(-B\right)}\right|} \]
                                                                                                            7. lift-log.f64N/A

                                                                                                              \[\leadsto \frac{\left|1\right|}{\left|e^{\log \left(-B\right)}\right|} \]
                                                                                                            8. rem-exp-logN/A

                                                                                                              \[\leadsto \frac{\left|1\right|}{\left|-B\right|} \]
                                                                                                            9. lift-neg.f64N/A

                                                                                                              \[\leadsto \frac{\left|1\right|}{\left|\mathsf{neg}\left(B\right)\right|} \]
                                                                                                            10. fabs-negN/A

                                                                                                              \[\leadsto \frac{\left|1\right|}{\left|B\right|} \]
                                                                                                            11. fabs-divN/A

                                                                                                              \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                            12. lift-/.f64N/A

                                                                                                              \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                            13. lower-fabs.f6410.3%

                                                                                                              \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                          5. Applied rewrites10.3%

                                                                                                            \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                        7. Recombined 3 regimes into one program.
                                                                                                        8. Add Preprocessing

                                                                                                        Alternative 27: 17.0% accurate, 7.1× speedup?

                                                                                                        \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;F \leq -6.8 \cdot 10^{-251}:\\ \;\;\;\;\frac{-1}{\left|B\right|}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{1}{\left|B\right|}\right|\\ \end{array} \]
                                                                                                        (FPCore (F B x)
                                                                                                         :precision binary64
                                                                                                         (*
                                                                                                          (copysign 1.0 B)
                                                                                                          (if (<= F -6.8e-251) (/ -1.0 (fabs B)) (fabs (/ 1.0 (fabs B))))))
                                                                                                        double code(double F, double B, double x) {
                                                                                                        	double tmp;
                                                                                                        	if (F <= -6.8e-251) {
                                                                                                        		tmp = -1.0 / fabs(B);
                                                                                                        	} else {
                                                                                                        		tmp = fabs((1.0 / fabs(B)));
                                                                                                        	}
                                                                                                        	return copysign(1.0, B) * tmp;
                                                                                                        }
                                                                                                        
                                                                                                        public static double code(double F, double B, double x) {
                                                                                                        	double tmp;
                                                                                                        	if (F <= -6.8e-251) {
                                                                                                        		tmp = -1.0 / Math.abs(B);
                                                                                                        	} else {
                                                                                                        		tmp = Math.abs((1.0 / Math.abs(B)));
                                                                                                        	}
                                                                                                        	return Math.copySign(1.0, B) * tmp;
                                                                                                        }
                                                                                                        
                                                                                                        def code(F, B, x):
                                                                                                        	tmp = 0
                                                                                                        	if F <= -6.8e-251:
                                                                                                        		tmp = -1.0 / math.fabs(B)
                                                                                                        	else:
                                                                                                        		tmp = math.fabs((1.0 / math.fabs(B)))
                                                                                                        	return math.copysign(1.0, B) * tmp
                                                                                                        
                                                                                                        function code(F, B, x)
                                                                                                        	tmp = 0.0
                                                                                                        	if (F <= -6.8e-251)
                                                                                                        		tmp = Float64(-1.0 / abs(B));
                                                                                                        	else
                                                                                                        		tmp = abs(Float64(1.0 / abs(B)));
                                                                                                        	end
                                                                                                        	return Float64(copysign(1.0, B) * tmp)
                                                                                                        end
                                                                                                        
                                                                                                        function tmp_2 = code(F, B, x)
                                                                                                        	tmp = 0.0;
                                                                                                        	if (F <= -6.8e-251)
                                                                                                        		tmp = -1.0 / abs(B);
                                                                                                        	else
                                                                                                        		tmp = abs((1.0 / abs(B)));
                                                                                                        	end
                                                                                                        	tmp_2 = (sign(B) * abs(1.0)) * tmp;
                                                                                                        end
                                                                                                        
                                                                                                        code[F_, B_, x_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[F, -6.8e-251], N[(-1.0 / N[Abs[B], $MachinePrecision]), $MachinePrecision], N[Abs[N[(1.0 / N[Abs[B], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]), $MachinePrecision]
                                                                                                        
                                                                                                        \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
                                                                                                        \mathbf{if}\;F \leq -6.8 \cdot 10^{-251}:\\
                                                                                                        \;\;\;\;\frac{-1}{\left|B\right|}\\
                                                                                                        
                                                                                                        \mathbf{else}:\\
                                                                                                        \;\;\;\;\left|\frac{1}{\left|B\right|}\right|\\
                                                                                                        
                                                                                                        
                                                                                                        \end{array}
                                                                                                        
                                                                                                        Derivation
                                                                                                        1. Split input into 2 regimes
                                                                                                        2. if F < -6.8000000000000003e-251

                                                                                                          1. Initial program 77.5%

                                                                                                            \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

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

                                                                                                            if -6.8000000000000003e-251 < F

                                                                                                            1. Initial program 77.5%

                                                                                                              \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

                                                                                                                \[\leadsto \frac{-1}{B} \]
                                                                                                              2. Step-by-step derivation
                                                                                                                1. lift-/.f64N/A

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

                                                                                                                  \[\leadsto \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
                                                                                                                3. metadata-evalN/A

                                                                                                                  \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                                                                4. inv-powN/A

                                                                                                                  \[\leadsto {\left(\mathsf{neg}\left(B\right)\right)}^{\color{blue}{-1}} \]
                                                                                                                5. pow-to-expN/A

                                                                                                                  \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                                6. lower-unsound-exp.f64N/A

                                                                                                                  \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                                7. lower-unsound-*.f64N/A

                                                                                                                  \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                                8. lower-unsound-log.f64N/A

                                                                                                                  \[\leadsto e^{\log \left(\mathsf{neg}\left(B\right)\right) \cdot -1} \]
                                                                                                                9. lower-neg.f644.9%

                                                                                                                  \[\leadsto e^{\log \left(-B\right) \cdot -1} \]
                                                                                                              3. Applied rewrites4.9%

                                                                                                                \[\leadsto e^{\log \left(-B\right) \cdot -1} \]
                                                                                                              4. Step-by-step derivation
                                                                                                                1. lift-exp.f64N/A

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

                                                                                                                  \[\leadsto e^{\log \left(-B\right) \cdot -1} \]
                                                                                                                3. exp-prodN/A

                                                                                                                  \[\leadsto {\left(e^{\log \left(-B\right)}\right)}^{\color{blue}{-1}} \]
                                                                                                                4. unpow-1N/A

                                                                                                                  \[\leadsto \frac{1}{\color{blue}{e^{\log \left(-B\right)}}} \]
                                                                                                                5. metadata-evalN/A

                                                                                                                  \[\leadsto \frac{\left|1\right|}{e^{\color{blue}{\log \left(-B\right)}}} \]
                                                                                                                6. exp-fabsN/A

                                                                                                                  \[\leadsto \frac{\left|1\right|}{\left|e^{\log \left(-B\right)}\right|} \]
                                                                                                                7. lift-log.f64N/A

                                                                                                                  \[\leadsto \frac{\left|1\right|}{\left|e^{\log \left(-B\right)}\right|} \]
                                                                                                                8. rem-exp-logN/A

                                                                                                                  \[\leadsto \frac{\left|1\right|}{\left|-B\right|} \]
                                                                                                                9. lift-neg.f64N/A

                                                                                                                  \[\leadsto \frac{\left|1\right|}{\left|\mathsf{neg}\left(B\right)\right|} \]
                                                                                                                10. fabs-negN/A

                                                                                                                  \[\leadsto \frac{\left|1\right|}{\left|B\right|} \]
                                                                                                                11. fabs-divN/A

                                                                                                                  \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                                12. lift-/.f64N/A

                                                                                                                  \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                                13. lower-fabs.f6410.3%

                                                                                                                  \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                              5. Applied rewrites10.3%

                                                                                                                \[\leadsto \left|\frac{1}{B}\right| \]
                                                                                                            7. Recombined 2 regimes into one program.
                                                                                                            8. Add Preprocessing

                                                                                                            Alternative 28: 10.4% 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 77.5%

                                                                                                              \[\left(-x \cdot \frac{1}{\tan 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.0%

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

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

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

                                                                                                              Reproduce

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