VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.0% → 99.3%
Time: 6.9s
Alternatives: 24
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 24 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.0% accurate, 1.0× speedup?

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

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

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

Alternative 1: 99.3% accurate, 0.7× speedup?

\[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -6 \cdot 10^{+16}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{-5}:\\ \;\;\;\;\left(-\frac{\frac{x}{\sin B}}{\frac{1}{\cos B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\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 -6e+16)
     (fma t_0 -1.0 t_1)
     (if (<= F 5.8e-5)
       (+
        (- (/ (/ x (sin B)) (/ 1.0 (cos B))))
        (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0)))))
       (fma t_0 1.0 t_1)))))
double code(double F, double B, double x) {
	double t_0 = 1.0 / sin(B);
	double t_1 = -x / tan(B);
	double tmp;
	if (F <= -6e+16) {
		tmp = fma(t_0, -1.0, t_1);
	} else if (F <= 5.8e-5) {
		tmp = -((x / sin(B)) / (1.0 / cos(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
	} else {
		tmp = fma(t_0, 1.0, t_1);
	}
	return tmp;
}
function code(F, B, x)
	t_0 = Float64(1.0 / sin(B))
	t_1 = Float64(Float64(-x) / tan(B))
	tmp = 0.0
	if (F <= -6e+16)
		tmp = fma(t_0, -1.0, t_1);
	elseif (F <= 5.8e-5)
		tmp = Float64(Float64(-Float64(Float64(x / sin(B)) / Float64(1.0 / cos(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0)))));
	else
		tmp = 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, -6e+16], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 5.8e-5], N[((-N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[Cos[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], 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 -6 \cdot 10^{+16}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\

\mathbf{elif}\;F \leq 5.8 \cdot 10^{-5}:\\
\;\;\;\;\left(-\frac{\frac{x}{\sin B}}{\frac{1}{\cos B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\

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


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

    1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

      if -6e16 < F < 5.8e-5

      1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.8e-5 < F

      1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -6 \cdot 10^{+16}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{-5}:\\ \;\;\;\;{\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 -6e+16)
           (fma t_0 -1.0 t_1)
           (if (<= F 5.8e-5)
             (- (* (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 <= -6e+16) {
      		tmp = fma(t_0, -1.0, t_1);
      	} else if (F <= 5.8e-5) {
      		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 <= -6e+16)
      		tmp = fma(t_0, -1.0, t_1);
      	elseif (F <= 5.8e-5)
      		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, -6e+16], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 5.8e-5], 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 -6 \cdot 10^{+16}:\\
      \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
      
      \mathbf{elif}\;F \leq 5.8 \cdot 10^{-5}:\\
      \;\;\;\;{\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 < -6e16

        1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

          if -6e16 < F < 5.8e-5

          1. Initial program 77.0%

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

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

            \[\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 5.8e-5 < F

          1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -1.2 \cdot 10^{-5}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{-5}:\\ \;\;\;\;{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(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.2e-5)
               (fma t_0 -1.0 t_1)
               (if (<= F 5.8e-5)
                 (- (* (pow (fma 2.0 x 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 <= -1.2e-5) {
          		tmp = fma(t_0, -1.0, t_1);
          	} else if (F <= 5.8e-5) {
          		tmp = (pow(fma(2.0, x, 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 <= -1.2e-5)
          		tmp = fma(t_0, -1.0, t_1);
          	elseif (F <= 5.8e-5)
          		tmp = Float64(Float64((fma(2.0, x, 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, -1.2e-5], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 5.8e-5], N[(N[(N[Power[N[(2.0 * x + 2.0), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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.2 \cdot 10^{-5}:\\
          \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
          
          \mathbf{elif}\;F \leq 5.8 \cdot 10^{-5}:\\
          \;\;\;\;{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{\tan B}\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(t\_0, 1, t\_1\right)\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if F < -1.2e-5

            1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

              if -1.2e-5 < F < 5.8e-5

              1. Initial program 77.0%

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

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

                \[\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}} \]
              4. Taylor expanded in F around 0

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

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

                if 5.8e-5 < F

                1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

                \[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -1.35 \cdot 10^{-5}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{-6}:\\ \;\;\;\;{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{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 -1.35e-5)
                     (fma t_0 -1.0 t_1)
                     (if (<= F 4.5e-6)
                       (- (* (pow (fma 2.0 x (fma F F 2.0)) -0.5) (/ F 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 <= -1.35e-5) {
                		tmp = fma(t_0, -1.0, t_1);
                	} else if (F <= 4.5e-6) {
                		tmp = (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) * (F / 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 <= -1.35e-5)
                		tmp = fma(t_0, -1.0, t_1);
                	elseif (F <= 4.5e-6)
                		tmp = Float64(Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) * Float64(F / 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, -1.35e-5], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 4.5e-6], N[(N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $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 -1.35 \cdot 10^{-5}:\\
                \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
                
                \mathbf{elif}\;F \leq 4.5 \cdot 10^{-6}:\\
                \;\;\;\;{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{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 < -1.3499999999999999e-5

                  1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

                    if -1.3499999999999999e-5 < F < 4.50000000000000011e-6

                    1. Initial program 77.0%

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

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

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

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

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

                      if 4.50000000000000011e-6 < F

                      1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

                          if -1.3499999999999999e-5 < F < 2.9e-5

                          1. Initial program 77.0%

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

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

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

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

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

                            if 2.9e-5 < F

                            1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                            Alternative 6: 79.1% accurate, 1.4× speedup?

                            \[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := -\frac{x}{B}\\ \mathbf{if}\;F \leq -6.8 \cdot 10^{+16}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 2.9 \cdot 10^{-5}:\\ \;\;\;\;{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{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 B))))
                               (if (<= F -6.8e+16)
                                 (fma t_0 -1.0 t_1)
                                 (if (<= F 2.9e-5)
                                   (- (* (pow (fma 2.0 x (fma F F 2.0)) -0.5) (/ F 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 / B);
                            	double tmp;
                            	if (F <= -6.8e+16) {
                            		tmp = fma(t_0, -1.0, t_1);
                            	} else if (F <= 2.9e-5) {
                            		tmp = (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) * (F / 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 / B))
                            	tmp = 0.0
                            	if (F <= -6.8e+16)
                            		tmp = fma(t_0, -1.0, t_1);
                            	elseif (F <= 2.9e-5)
                            		tmp = Float64(Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) * Float64(F / 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 / B), $MachinePrecision])}, If[LessEqual[F, -6.8e+16], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 2.9e-5], N[(N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $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}{B}\\
                            \mathbf{if}\;F \leq -6.8 \cdot 10^{+16}:\\
                            \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
                            
                            \mathbf{elif}\;F \leq 2.9 \cdot 10^{-5}:\\
                            \;\;\;\;{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{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 < -6.8e16

                              1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                if -6.8e16 < F < 2.9e-5

                                1. Initial program 77.0%

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

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

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

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

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

                                  if 2.9e-5 < F

                                  1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                  Alternative 7: 76.5% accurate, 1.4× speedup?

                                  \[\begin{array}{l} t_0 := -1 \cdot \frac{x \cdot \cos B}{\sin B}\\ \mathbf{if}\;x \leq -82000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 85000000000:\\ \;\;\;\;\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 -82000000.0)
                                       t_0
                                       (if (<= x 85000000000.0)
                                         (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 <= -82000000.0) {
                                  		tmp = t_0;
                                  	} else if (x <= 85000000000.0) {
                                  		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 <= -82000000.0)
                                  		tmp = t_0;
                                  	elseif (x <= 85000000000.0)
                                  		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, -82000000.0], t$95$0, If[LessEqual[x, 85000000000.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], t$95$0]]]
                                  
                                  \begin{array}{l}
                                  t_0 := -1 \cdot \frac{x \cdot \cos B}{\sin B}\\
                                  \mathbf{if}\;x \leq -82000000:\\
                                  \;\;\;\;t\_0\\
                                  
                                  \mathbf{elif}\;x \leq 85000000000:\\
                                  \;\;\;\;\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 < -8.2e7 or 8.5e10 < x

                                    1. Initial program 77.0%

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

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

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

                                    if -8.2e7 < x < 8.5e10

                                    1. Initial program 77.0%

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

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

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

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

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

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

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

                                      \[\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 8: 70.7% accurate, 1.5× speedup?

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

                                    1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                      if -1.2e-5 < F < 5.8e-5

                                      1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \color{blue}{{\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 5.8e-5 < F

                                      1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                      Alternative 9: 70.7% accurate, 1.6× speedup?

                                      \[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := -\frac{x}{B}\\ \mathbf{if}\;F \leq -1.2 \cdot 10^{-5}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{-5}:\\ \;\;\;\;t\_1 + \frac{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5}}{\sin B} \cdot F\\ \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 B))))
                                         (if (<= F -1.2e-5)
                                           (fma t_0 -1.0 t_1)
                                           (if (<= F 5.8e-5)
                                             (+ t_1 (* (/ (pow (fma 2.0 x 2.0) -0.5) (sin B)) F))
                                             (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 / B);
                                      	double tmp;
                                      	if (F <= -1.2e-5) {
                                      		tmp = fma(t_0, -1.0, t_1);
                                      	} else if (F <= 5.8e-5) {
                                      		tmp = t_1 + ((pow(fma(2.0, x, 2.0), -0.5) / sin(B)) * F);
                                      	} 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 / B))
                                      	tmp = 0.0
                                      	if (F <= -1.2e-5)
                                      		tmp = fma(t_0, -1.0, t_1);
                                      	elseif (F <= 5.8e-5)
                                      		tmp = Float64(t_1 + Float64(Float64((fma(2.0, x, 2.0) ^ -0.5) / sin(B)) * F));
                                      	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 / B), $MachinePrecision])}, If[LessEqual[F, -1.2e-5], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 5.8e-5], N[(t$95$1 + N[(N[(N[Power[N[(2.0 * x + 2.0), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] * F), $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}{B}\\
                                      \mathbf{if}\;F \leq -1.2 \cdot 10^{-5}:\\
                                      \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
                                      
                                      \mathbf{elif}\;F \leq 5.8 \cdot 10^{-5}:\\
                                      \;\;\;\;t\_1 + \frac{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5}}{\sin B} \cdot F\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\mathsf{fma}\left(t\_0, 1, t\_1\right)\\
                                      
                                      
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if F < -1.2e-5

                                        1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                          if -1.2e-5 < F < 5.8e-5

                                          1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if 5.8e-5 < F

                                          1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                          Alternative 10: 70.7% accurate, 1.6× speedup?

                                          \[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := -\frac{x}{B}\\ \mathbf{if}\;F \leq -1.2 \cdot 10^{-5}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{-5}:\\ \;\;\;\;{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{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 B))))
                                             (if (<= F -1.2e-5)
                                               (fma t_0 -1.0 t_1)
                                               (if (<= F 5.8e-5)
                                                 (- (* (pow (fma 2.0 x 2.0) -0.5) (/ F (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 / B);
                                          	double tmp;
                                          	if (F <= -1.2e-5) {
                                          		tmp = fma(t_0, -1.0, t_1);
                                          	} else if (F <= 5.8e-5) {
                                          		tmp = (pow(fma(2.0, x, 2.0), -0.5) * (F / 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 / B))
                                          	tmp = 0.0
                                          	if (F <= -1.2e-5)
                                          		tmp = fma(t_0, -1.0, t_1);
                                          	elseif (F <= 5.8e-5)
                                          		tmp = Float64(Float64((fma(2.0, x, 2.0) ^ -0.5) * Float64(F / sin(B))) - 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 / B), $MachinePrecision])}, If[LessEqual[F, -1.2e-5], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 5.8e-5], N[(N[(N[Power[N[(2.0 * x + 2.0), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $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}{B}\\
                                          \mathbf{if}\;F \leq -1.2 \cdot 10^{-5}:\\
                                          \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
                                          
                                          \mathbf{elif}\;F \leq 5.8 \cdot 10^{-5}:\\
                                          \;\;\;\;{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\mathsf{fma}\left(t\_0, 1, t\_1\right)\\
                                          
                                          
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 3 regimes
                                          2. if F < -1.2e-5

                                            1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                              if -1.2e-5 < F < 5.8e-5

                                              1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left(-\frac{x}{B}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{\sin B} \]
                                                2. metadata-eval35.6%

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

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

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

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

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

                                              if 5.8e-5 < F

                                              1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                              Alternative 11: 70.6% accurate, 1.7× speedup?

                                              \[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := -\frac{x}{B}\\ \mathbf{if}\;F \leq -1.2 \cdot 10^{-5}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{-5}:\\ \;\;\;\;t\_1 + \frac{F \cdot {2}^{-0.5}}{\sin 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 B))))
                                                 (if (<= F -1.2e-5)
                                                   (fma t_0 -1.0 t_1)
                                                   (if (<= F 5.8e-5)
                                                     (+ t_1 (/ (* F (pow 2.0 -0.5)) (sin 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 / B);
                                              	double tmp;
                                              	if (F <= -1.2e-5) {
                                              		tmp = fma(t_0, -1.0, t_1);
                                              	} else if (F <= 5.8e-5) {
                                              		tmp = t_1 + ((F * pow(2.0, -0.5)) / sin(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 / B))
                                              	tmp = 0.0
                                              	if (F <= -1.2e-5)
                                              		tmp = fma(t_0, -1.0, t_1);
                                              	elseif (F <= 5.8e-5)
                                              		tmp = Float64(t_1 + Float64(Float64(F * (2.0 ^ -0.5)) / sin(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 / B), $MachinePrecision])}, If[LessEqual[F, -1.2e-5], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 5.8e-5], N[(t$95$1 + N[(N[(F * N[Power[2.0, -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[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}{B}\\
                                              \mathbf{if}\;F \leq -1.2 \cdot 10^{-5}:\\
                                              \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
                                              
                                              \mathbf{elif}\;F \leq 5.8 \cdot 10^{-5}:\\
                                              \;\;\;\;t\_1 + \frac{F \cdot {2}^{-0.5}}{\sin B}\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;\mathsf{fma}\left(t\_0, 1, t\_1\right)\\
                                              
                                              
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if F < -1.2e-5

                                                1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                                  if -1.2e-5 < F < 5.8e-5

                                                  1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if 5.8e-5 < F

                                                  1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                                  Alternative 12: 69.3% accurate, 2.2× speedup?

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

                                                    1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                                      if -1.2e-5 < F < 4.50000000000000011e-6

                                                      1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

                                                      if 4.50000000000000011e-6 < F

                                                      1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                                      Alternative 13: 64.4% accurate, 1.8× speedup?

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

                                                        1. Initial program 77.0%

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

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

                                                        if 1.85e-8 < B

                                                        1. Initial program 77.0%

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

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

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

                                                          \[\leadsto \color{blue}{\frac{-1}{F}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
                                                        5. Step-by-step derivation
                                                          1. lower-/.f6449.4%

                                                            \[\leadsto \frac{-1}{\color{blue}{F}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
                                                        6. Applied rewrites49.4%

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

                                                          \[\leadsto \frac{-1}{F} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{\tan B} \]
                                                        8. Step-by-step derivation
                                                          1. lower-/.f6448.0%

                                                            \[\leadsto \frac{-1}{F} \cdot \frac{F}{\color{blue}{B}} - \frac{x}{\tan B} \]
                                                        9. Applied rewrites48.0%

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

                                                      Alternative 14: 54.2% accurate, 2.4× speedup?

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

                                                        1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                                          if -1.2e-5 < F

                                                          1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 15: 51.9% accurate, 2.1× speedup?

                                                        \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;\left|B\right| \leq 1.4 \cdot 10^{-5}:\\ \;\;\;\;\mathsf{fma}\left(\frac{1}{\left|B\right|}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot 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) 1.4e-5)
                                                            (fma
                                                             (/ 1.0 (fabs B))
                                                             (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) F)
                                                             (- (/ x (fabs B))))
                                                            (/ -1.0 (sin (fabs B))))))
                                                        double code(double F, double B, double x) {
                                                        	double tmp;
                                                        	if (fabs(B) <= 1.4e-5) {
                                                        		tmp = fma((1.0 / fabs(B)), (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * 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) <= 1.4e-5)
                                                        		tmp = fma(Float64(1.0 / abs(B)), Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * 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], 1.4e-5], N[(N[(1.0 / N[Abs[B], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F), $MachinePrecision] + (-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 1.4 \cdot 10^{-5}:\\
                                                        \;\;\;\;\mathsf{fma}\left(\frac{1}{\left|B\right|}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot 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 < 1.39999999999999998e-5

                                                          1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

                                                          if 1.39999999999999998e-5 < B

                                                          1. Initial program 77.0%

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

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

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

                                                        Alternative 16: 51.1% accurate, 2.5× speedup?

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

                                                          1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \mathsf{fma}\left(\frac{1 + \frac{1}{6} \cdot {B}^{2}}{B}, \frac{-1}{F} \cdot F, -\frac{x}{B}\right) \]
                                                            4. lower-pow.f6429.6%

                                                              \[\leadsto \mathsf{fma}\left(\frac{1 + 0.16666666666666666 \cdot {B}^{2}}{B}, \frac{-1}{F} \cdot F, -\frac{x}{B}\right) \]
                                                          12. Applied rewrites29.6%

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

                                                          if -1.2e-5 < F < 7.1999999999999999e140

                                                          1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \color{blue}{{\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}} \]
                                                          7. Taylor expanded in B around 0

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

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

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

                                                          if 7.1999999999999999e140 < F

                                                          1. Initial program 77.0%

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

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

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

                                                        Alternative 17: 50.2% accurate, 2.5× speedup?

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

                                                          1. Initial program 77.0%

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

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

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

                                                          if -1.02e12 < F < 7.1999999999999999e140

                                                          1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \color{blue}{{\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}} \]
                                                          7. Taylor expanded in B around 0

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

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

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

                                                          if 7.1999999999999999e140 < F

                                                          1. Initial program 77.0%

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

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

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

                                                        Alternative 18: 49.6% accurate, 2.6× speedup?

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

                                                          1. Initial program 77.0%

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

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

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

                                                          if -2.3e10 < F < 210

                                                          1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if 210 < F

                                                          1. Initial program 77.0%

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

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

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

                                                        Alternative 19: 44.7% accurate, 2.2× speedup?

                                                        \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;F \leq -23000000000:\\ \;\;\;\;\frac{-1}{\sin \left(\left|B\right|\right)}\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{+80}:\\ \;\;\;\;\left(-\frac{x}{\left|B\right|}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{\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 -23000000000.0)
                                                            (/ -1.0 (sin (fabs B)))
                                                            (if (<= F 2.1e+80)
                                                              (+ (- (/ x (fabs B))) (/ (* F (pow (+ 2.0 (* 2.0 x)) -0.5)) (fabs B)))
                                                              (fabs (/ -1.0 (fabs B)))))))
                                                        double code(double F, double B, double x) {
                                                        	double tmp;
                                                        	if (F <= -23000000000.0) {
                                                        		tmp = -1.0 / sin(fabs(B));
                                                        	} else if (F <= 2.1e+80) {
                                                        		tmp = -(x / fabs(B)) + ((F * pow((2.0 + (2.0 * x)), -0.5)) / 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 <= -23000000000.0) {
                                                        		tmp = -1.0 / Math.sin(Math.abs(B));
                                                        	} else if (F <= 2.1e+80) {
                                                        		tmp = -(x / Math.abs(B)) + ((F * Math.pow((2.0 + (2.0 * x)), -0.5)) / 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 <= -23000000000.0:
                                                        		tmp = -1.0 / math.sin(math.fabs(B))
                                                        	elif F <= 2.1e+80:
                                                        		tmp = -(x / math.fabs(B)) + ((F * math.pow((2.0 + (2.0 * x)), -0.5)) / 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 <= -23000000000.0)
                                                        		tmp = Float64(-1.0 / sin(abs(B)));
                                                        	elseif (F <= 2.1e+80)
                                                        		tmp = Float64(Float64(-Float64(x / abs(B))) + Float64(Float64(F * (Float64(2.0 + Float64(2.0 * x)) ^ -0.5)) / 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 <= -23000000000.0)
                                                        		tmp = -1.0 / sin(abs(B));
                                                        	elseif (F <= 2.1e+80)
                                                        		tmp = -(x / abs(B)) + ((F * ((2.0 + (2.0 * x)) ^ -0.5)) / 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, -23000000000.0], N[(-1.0 / N[Sin[N[Abs[B], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e+80], N[((-N[(x / N[Abs[B], $MachinePrecision]), $MachinePrecision]) + N[(N[(F * N[Power[N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Abs[B], $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 -23000000000:\\
                                                        \;\;\;\;\frac{-1}{\sin \left(\left|B\right|\right)}\\
                                                        
                                                        \mathbf{elif}\;F \leq 2.1 \cdot 10^{+80}:\\
                                                        \;\;\;\;\left(-\frac{x}{\left|B\right|}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{\left|B\right|}\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\left|\frac{-1}{\left|B\right|}\right|\\
                                                        
                                                        
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 3 regimes
                                                        2. if F < -2.3e10

                                                          1. Initial program 77.0%

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

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

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

                                                          if -2.3e10 < F < 2.10000000000000001e80

                                                          1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if 2.10000000000000001e80 < F

                                                          1. Initial program 77.0%

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

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

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

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

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

                                                              \[\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. exp-fabsN/A

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

                                                                \[\leadsto \left|e^{\log \left(-B\right) \cdot -1}\right| \]
                                                              4. lower-fabs.f644.8%

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

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

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

                                                                \[\leadsto \left|e^{\log \left(-B\right) \cdot -1}\right| \]
                                                              8. exp-to-powN/A

                                                                \[\leadsto \left|{\left(-B\right)}^{-1}\right| \]
                                                              9. unpow-1N/A

                                                                \[\leadsto \left|\frac{1}{-B}\right| \]
                                                              10. metadata-evalN/A

                                                                \[\leadsto \left|\frac{\mathsf{neg}\left(-1\right)}{-B}\right| \]
                                                              11. lift-neg.f64N/A

                                                                \[\leadsto \left|\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(B\right)}\right| \]
                                                              12. frac-2neg-revN/A

                                                                \[\leadsto \left|\frac{-1}{B}\right| \]
                                                              13. lower-/.f649.8%

                                                                \[\leadsto \left|\frac{-1}{B}\right| \]
                                                            5. Applied rewrites9.8%

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

                                                          Alternative 20: 37.5% accurate, 2.2× speedup?

                                                          \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;F \leq -70000000000000:\\ \;\;\;\;\frac{-0.16666666666666666 \cdot {\left(\left|B\right|\right)}^{2} - 1}{\left|B\right|}\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{+80}:\\ \;\;\;\;\left(-\frac{x}{\left|B\right|}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{\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 -70000000000000.0)
                                                              (/ (- (* -0.16666666666666666 (pow (fabs B) 2.0)) 1.0) (fabs B))
                                                              (if (<= F 2.1e+80)
                                                                (+ (- (/ x (fabs B))) (/ (* F (pow (+ 2.0 (* 2.0 x)) -0.5)) (fabs B)))
                                                                (fabs (/ -1.0 (fabs B)))))))
                                                          double code(double F, double B, double x) {
                                                          	double tmp;
                                                          	if (F <= -70000000000000.0) {
                                                          		tmp = ((-0.16666666666666666 * pow(fabs(B), 2.0)) - 1.0) / fabs(B);
                                                          	} else if (F <= 2.1e+80) {
                                                          		tmp = -(x / fabs(B)) + ((F * pow((2.0 + (2.0 * x)), -0.5)) / 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 <= -70000000000000.0) {
                                                          		tmp = ((-0.16666666666666666 * Math.pow(Math.abs(B), 2.0)) - 1.0) / Math.abs(B);
                                                          	} else if (F <= 2.1e+80) {
                                                          		tmp = -(x / Math.abs(B)) + ((F * Math.pow((2.0 + (2.0 * x)), -0.5)) / 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 <= -70000000000000.0:
                                                          		tmp = ((-0.16666666666666666 * math.pow(math.fabs(B), 2.0)) - 1.0) / math.fabs(B)
                                                          	elif F <= 2.1e+80:
                                                          		tmp = -(x / math.fabs(B)) + ((F * math.pow((2.0 + (2.0 * x)), -0.5)) / 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 <= -70000000000000.0)
                                                          		tmp = Float64(Float64(Float64(-0.16666666666666666 * (abs(B) ^ 2.0)) - 1.0) / abs(B));
                                                          	elseif (F <= 2.1e+80)
                                                          		tmp = Float64(Float64(-Float64(x / abs(B))) + Float64(Float64(F * (Float64(2.0 + Float64(2.0 * x)) ^ -0.5)) / 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 <= -70000000000000.0)
                                                          		tmp = ((-0.16666666666666666 * (abs(B) ^ 2.0)) - 1.0) / abs(B);
                                                          	elseif (F <= 2.1e+80)
                                                          		tmp = -(x / abs(B)) + ((F * ((2.0 + (2.0 * x)) ^ -0.5)) / 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, -70000000000000.0], 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, 2.1e+80], N[((-N[(x / N[Abs[B], $MachinePrecision]), $MachinePrecision]) + N[(N[(F * N[Power[N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Abs[B], $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 -70000000000000:\\
                                                          \;\;\;\;\frac{-0.16666666666666666 \cdot {\left(\left|B\right|\right)}^{2} - 1}{\left|B\right|}\\
                                                          
                                                          \mathbf{elif}\;F \leq 2.1 \cdot 10^{+80}:\\
                                                          \;\;\;\;\left(-\frac{x}{\left|B\right|}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{\left|B\right|}\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\left|\frac{-1}{\left|B\right|}\right|\\
                                                          
                                                          
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 3 regimes
                                                          2. if F < -7e13

                                                            1. Initial program 77.0%

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

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

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

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

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

                                                            if -7e13 < F < 2.10000000000000001e80

                                                            1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if 2.10000000000000001e80 < F

                                                            1. Initial program 77.0%

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

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

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

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

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

                                                                \[\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. exp-fabsN/A

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

                                                                  \[\leadsto \left|e^{\log \left(-B\right) \cdot -1}\right| \]
                                                                4. lower-fabs.f644.8%

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

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

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

                                                                  \[\leadsto \left|e^{\log \left(-B\right) \cdot -1}\right| \]
                                                                8. exp-to-powN/A

                                                                  \[\leadsto \left|{\left(-B\right)}^{-1}\right| \]
                                                                9. unpow-1N/A

                                                                  \[\leadsto \left|\frac{1}{-B}\right| \]
                                                                10. metadata-evalN/A

                                                                  \[\leadsto \left|\frac{\mathsf{neg}\left(-1\right)}{-B}\right| \]
                                                                11. lift-neg.f64N/A

                                                                  \[\leadsto \left|\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(B\right)}\right| \]
                                                                12. frac-2neg-revN/A

                                                                  \[\leadsto \left|\frac{-1}{B}\right| \]
                                                                13. lower-/.f649.8%

                                                                  \[\leadsto \left|\frac{-1}{B}\right| \]
                                                              5. Applied rewrites9.8%

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

                                                            Alternative 21: 17.5% accurate, 2.8× speedup?

                                                            \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;F \leq 2.6 \cdot 10^{-35}:\\ \;\;\;\;\frac{-1}{\left|B\right| \cdot \left(1 + -0.16666666666666666 \cdot {\left(\left|B\right|\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{-1}{\left|B\right|}\right|\\ \end{array} \]
                                                            (FPCore (F B x)
                                                             :precision binary64
                                                             (*
                                                              (copysign 1.0 B)
                                                              (if (<= F 2.6e-35)
                                                                (/ -1.0 (* (fabs B) (+ 1.0 (* -0.16666666666666666 (pow (fabs B) 2.0)))))
                                                                (fabs (/ -1.0 (fabs B))))))
                                                            double code(double F, double B, double x) {
                                                            	double tmp;
                                                            	if (F <= 2.6e-35) {
                                                            		tmp = -1.0 / (fabs(B) * (1.0 + (-0.16666666666666666 * pow(fabs(B), 2.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 <= 2.6e-35) {
                                                            		tmp = -1.0 / (Math.abs(B) * (1.0 + (-0.16666666666666666 * Math.pow(Math.abs(B), 2.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 <= 2.6e-35:
                                                            		tmp = -1.0 / (math.fabs(B) * (1.0 + (-0.16666666666666666 * math.pow(math.fabs(B), 2.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 <= 2.6e-35)
                                                            		tmp = Float64(-1.0 / Float64(abs(B) * Float64(1.0 + Float64(-0.16666666666666666 * (abs(B) ^ 2.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 <= 2.6e-35)
                                                            		tmp = -1.0 / (abs(B) * (1.0 + (-0.16666666666666666 * (abs(B) ^ 2.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, 2.6e-35], N[(-1.0 / N[(N[Abs[B], $MachinePrecision] * N[(1.0 + N[(-0.16666666666666666 * N[Power[N[Abs[B], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $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 2.6 \cdot 10^{-35}:\\
                                                            \;\;\;\;\frac{-1}{\left|B\right| \cdot \left(1 + -0.16666666666666666 \cdot {\left(\left|B\right|\right)}^{2}\right)}\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\left|\frac{-1}{\left|B\right|}\right|\\
                                                            
                                                            
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if F < 2.60000000000000005e-35

                                                              1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

                                                              if 2.60000000000000005e-35 < F

                                                              1. Initial program 77.0%

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

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

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

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

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

                                                                  \[\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. exp-fabsN/A

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

                                                                    \[\leadsto \left|e^{\log \left(-B\right) \cdot -1}\right| \]
                                                                  4. lower-fabs.f644.8%

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

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

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

                                                                    \[\leadsto \left|e^{\log \left(-B\right) \cdot -1}\right| \]
                                                                  8. exp-to-powN/A

                                                                    \[\leadsto \left|{\left(-B\right)}^{-1}\right| \]
                                                                  9. unpow-1N/A

                                                                    \[\leadsto \left|\frac{1}{-B}\right| \]
                                                                  10. metadata-evalN/A

                                                                    \[\leadsto \left|\frac{\mathsf{neg}\left(-1\right)}{-B}\right| \]
                                                                  11. lift-neg.f64N/A

                                                                    \[\leadsto \left|\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(B\right)}\right| \]
                                                                  12. frac-2neg-revN/A

                                                                    \[\leadsto \left|\frac{-1}{B}\right| \]
                                                                  13. lower-/.f649.8%

                                                                    \[\leadsto \left|\frac{-1}{B}\right| \]
                                                                5. Applied rewrites9.8%

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

                                                              Alternative 22: 17.4% accurate, 3.1× speedup?

                                                              \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;F \leq 2.6 \cdot 10^{-35}:\\ \;\;\;\;\frac{-0.16666666666666666 \cdot {\left(\left|B\right|\right)}^{2} - 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 2.6e-35)
                                                                  (/ (- (* -0.16666666666666666 (pow (fabs B) 2.0)) 1.0) (fabs B))
                                                                  (fabs (/ -1.0 (fabs B))))))
                                                              double code(double F, double B, double x) {
                                                              	double tmp;
                                                              	if (F <= 2.6e-35) {
                                                              		tmp = ((-0.16666666666666666 * pow(fabs(B), 2.0)) - 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 <= 2.6e-35) {
                                                              		tmp = ((-0.16666666666666666 * Math.pow(Math.abs(B), 2.0)) - 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 <= 2.6e-35:
                                                              		tmp = ((-0.16666666666666666 * math.pow(math.fabs(B), 2.0)) - 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 <= 2.6e-35)
                                                              		tmp = Float64(Float64(Float64(-0.16666666666666666 * (abs(B) ^ 2.0)) - 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 <= 2.6e-35)
                                                              		tmp = ((-0.16666666666666666 * (abs(B) ^ 2.0)) - 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, 2.6e-35], N[(N[(N[(-0.16666666666666666 * N[Power[N[Abs[B], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / 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 2.6 \cdot 10^{-35}:\\
                                                              \;\;\;\;\frac{-0.16666666666666666 \cdot {\left(\left|B\right|\right)}^{2} - 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 < 2.60000000000000005e-35

                                                                1. Initial program 77.0%

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

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

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

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

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

                                                                if 2.60000000000000005e-35 < F

                                                                1. Initial program 77.0%

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

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

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

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

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

                                                                    \[\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. exp-fabsN/A

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

                                                                      \[\leadsto \left|e^{\log \left(-B\right) \cdot -1}\right| \]
                                                                    4. lower-fabs.f644.8%

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

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

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

                                                                      \[\leadsto \left|e^{\log \left(-B\right) \cdot -1}\right| \]
                                                                    8. exp-to-powN/A

                                                                      \[\leadsto \left|{\left(-B\right)}^{-1}\right| \]
                                                                    9. unpow-1N/A

                                                                      \[\leadsto \left|\frac{1}{-B}\right| \]
                                                                    10. metadata-evalN/A

                                                                      \[\leadsto \left|\frac{\mathsf{neg}\left(-1\right)}{-B}\right| \]
                                                                    11. lift-neg.f64N/A

                                                                      \[\leadsto \left|\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(B\right)}\right| \]
                                                                    12. frac-2neg-revN/A

                                                                      \[\leadsto \left|\frac{-1}{B}\right| \]
                                                                    13. lower-/.f649.8%

                                                                      \[\leadsto \left|\frac{-1}{B}\right| \]
                                                                  5. Applied rewrites9.8%

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

                                                                Alternative 23: 17.2% accurate, 7.1× speedup?

                                                                \[\begin{array}{l} t_0 := \frac{-1}{\left|B\right|}\\ \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;F \leq 1.08 \cdot 10^{-13}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\left|t\_0\right|\\ \end{array} \end{array} \]
                                                                (FPCore (F B x)
                                                                 :precision binary64
                                                                 (let* ((t_0 (/ -1.0 (fabs B))))
                                                                   (* (copysign 1.0 B) (if (<= F 1.08e-13) t_0 (fabs t_0)))))
                                                                double code(double F, double B, double x) {
                                                                	double t_0 = -1.0 / fabs(B);
                                                                	double tmp;
                                                                	if (F <= 1.08e-13) {
                                                                		tmp = t_0;
                                                                	} else {
                                                                		tmp = fabs(t_0);
                                                                	}
                                                                	return copysign(1.0, B) * tmp;
                                                                }
                                                                
                                                                public static double code(double F, double B, double x) {
                                                                	double t_0 = -1.0 / Math.abs(B);
                                                                	double tmp;
                                                                	if (F <= 1.08e-13) {
                                                                		tmp = t_0;
                                                                	} else {
                                                                		tmp = Math.abs(t_0);
                                                                	}
                                                                	return Math.copySign(1.0, B) * tmp;
                                                                }
                                                                
                                                                def code(F, B, x):
                                                                	t_0 = -1.0 / math.fabs(B)
                                                                	tmp = 0
                                                                	if F <= 1.08e-13:
                                                                		tmp = t_0
                                                                	else:
                                                                		tmp = math.fabs(t_0)
                                                                	return math.copysign(1.0, B) * tmp
                                                                
                                                                function code(F, B, x)
                                                                	t_0 = Float64(-1.0 / abs(B))
                                                                	tmp = 0.0
                                                                	if (F <= 1.08e-13)
                                                                		tmp = t_0;
                                                                	else
                                                                		tmp = abs(t_0);
                                                                	end
                                                                	return Float64(copysign(1.0, B) * tmp)
                                                                end
                                                                
                                                                function tmp_2 = code(F, B, x)
                                                                	t_0 = -1.0 / abs(B);
                                                                	tmp = 0.0;
                                                                	if (F <= 1.08e-13)
                                                                		tmp = t_0;
                                                                	else
                                                                		tmp = abs(t_0);
                                                                	end
                                                                	tmp_2 = (sign(B) * abs(1.0)) * 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[F, 1.08e-13], t$95$0, N[Abs[t$95$0], $MachinePrecision]]), $MachinePrecision]]
                                                                
                                                                \begin{array}{l}
                                                                t_0 := \frac{-1}{\left|B\right|}\\
                                                                \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
                                                                \mathbf{if}\;F \leq 1.08 \cdot 10^{-13}:\\
                                                                \;\;\;\;t\_0\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;\left|t\_0\right|\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 2 regimes
                                                                2. if F < 1.0799999999999999e-13

                                                                  1. Initial program 77.0%

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

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

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

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

                                                                    if 1.0799999999999999e-13 < F

                                                                    1. Initial program 77.0%

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

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

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

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

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

                                                                        \[\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. exp-fabsN/A

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

                                                                          \[\leadsto \left|e^{\log \left(-B\right) \cdot -1}\right| \]
                                                                        4. lower-fabs.f644.8%

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

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

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

                                                                          \[\leadsto \left|e^{\log \left(-B\right) \cdot -1}\right| \]
                                                                        8. exp-to-powN/A

                                                                          \[\leadsto \left|{\left(-B\right)}^{-1}\right| \]
                                                                        9. unpow-1N/A

                                                                          \[\leadsto \left|\frac{1}{-B}\right| \]
                                                                        10. metadata-evalN/A

                                                                          \[\leadsto \left|\frac{\mathsf{neg}\left(-1\right)}{-B}\right| \]
                                                                        11. lift-neg.f64N/A

                                                                          \[\leadsto \left|\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(B\right)}\right| \]
                                                                        12. frac-2neg-revN/A

                                                                          \[\leadsto \left|\frac{-1}{B}\right| \]
                                                                        13. lower-/.f649.8%

                                                                          \[\leadsto \left|\frac{-1}{B}\right| \]
                                                                      5. Applied rewrites9.8%

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

                                                                    Alternative 24: 10.7% 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.0%

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

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

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

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

                                                                      Reproduce

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